/* Container SRS specifico */
#op7srs-controls {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap; /* Desktop: tutti sulla stessa riga */
    gap: 10px;
    width: 100%;
}

/* Stile specifico per i pulsanti SRS basato sul tuo buttons.css */
#op7srs-controls .button {
    flex: 1; /* Distribuisce lo spazio equamente */
    margin: 5px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

/* Stato bloccato/disabilitato */
#op7srs-controls .button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0 !important;
    color: #999 !important;
    border: 1px solid #ccc !important;
}

/* Media query per schermi verticali (Smartphone) */
@media only screen and (max-width: 767px) and (orientation: portrait) {
    #op7srs-controls {
        flex-direction: column; /* Trasforma in tre righe */
        align-items: center;
    }
    
    #op7srs-controls .button {
        width: 100%; /* Occupa tutta la larghezza disponibile */
        margin: 5px 0;
    }
}

.allenatori-buttons-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.allenatori-button-item {
    display: flex;
    flex-direction: column;
}

.home_testo {
    margin-bottom: 8px;
    font-size: 1rem;
}

.palestra_button {
    display: block;
    padding: 12px 15px;
    text-align: center;
    background: #0074d9;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.1rem;
}

/* Мобильный экран с вертикальной ориентацией: одна кнопка в ряд */
@media (max-width: 767px) and (orientation: portrait) {
    .allenatori-buttons-wrapper {
        grid-template-columns: 1fr;
    }
}




.epub-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 12px;
  padding: 5px;
}

.epub-controls button {
  background: linear-gradient(to bottom, #a8c1d6, #96b0c5);
  border: 1px solid #7a94a8;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
}

.epub-controls button:hover {
  background: linear-gradient(to bottom, #b5ccde, #9cb8cd);
  box-shadow: 0 5px 8px rgba(0,0,0,0.25);
}

.epub-controls button:active {
  background: linear-gradient(to bottom, #90a9bd, #7f98ac);
  box-shadow: inset 0 3px 5px rgba(0,0,0,0.3);
  transform: translateY(2px);
}

.epub-controls button#fontSmaller {
  font-size: 12px;
}

.epub-controls button#fontBigger {
  font-size: 16px;
}




.btn_pdf {
    background-color: #007bff; /* современный синий */
    color: white;
    padding: 10px 20px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.btn_pdf:hover {
    background-color: #0056b3; /* темнее при наведении */
}

.btn_pdf:active {
    transform: scale(0.97); /* лёгкое нажатие */
}

.btn_pdf:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}




#difficolta-slider {
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  -webkit-appearance: none;
  background: linear-gradient(to right, #4CAF50 20%, #ccc 20%);
  height: 8px;
  border-radius: 4px;
  outline: none;
  transition: background 0.3s ease;
  touch-action: pan-y;
}

#difficolta-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #888;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
  transition: background 0.3s ease;
}

#difficolta-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #888;
  cursor: pointer;
  box-shadow: 0 0 2px rgba(0,0,0,0.3);
}

#difficolta-labels {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding-top: 6px;
  color: #666;
}


.round-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #999;
  background-color: #f0f0f0;
  cursor: pointer;
  transition: background-color 0.3s, border-color 0.3s, transform 0.2s ease;
}

.round-button:hover {
  transform: scale(1.1);
}

.round-button.inactive {
  background-color: #f0f0f0;
  border-color: #999;
  cursor: default;
  pointer-events: auto;
}

.round-button.correct {
  background-color: #4CAF50; /* зеленый */
  border-color: #388E3C;
  color: white;
}

.round-button.incorrect {
  background-color: #f44336; /* красный */
  border-color: #d32f2f;
  color: white;
}



.hidden-button {
  display: none;
}

/**** SILLABE DIVIDERE ****/

/* Основной контейнер */
.sillabe-container {
    display: flex;
    align-items: center;
    gap: 8px; /* Расстояние между полем и кнопкой */
    max-width: 100%;
    flex-wrap: wrap; /* Позволяет кнопке и полю переноситься на новую строку */
}

/* Поле ввода */
#sillabe_field {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    flex-grow: 1; /* Поле ввода занимает всю доступную ширину */
    min-width: 180px; /* Минимальная ширина для удобства */
}

/* Кнопка */
.sillabe-button {
    padding: 10px 20px;
    background-color: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sillabe-button-icon {
    margin-right: 5px;
}

/* Эффект наведения для кнопки */
.sillabe-button:hover {
    background-color: #0056b3;
}

/* Адаптация для мобильных устройств */
@media (max-width: 600px) {
    .sillabe-container {
        flex-direction: column; /* Перевод на вертикальное расположение */
        align-items: stretch; /* Растягивает элементы на всю ширину */
    }

    #sillabe_field, .sillabe-button {
        width: 100%; /* Поле и кнопка занимают всю ширину контейнера */
        margin: 0; /* Убираем промежуток, чтобы все элементы были компактными */
    }
}




/* Общий стиль для контейнера кнопок */
.button-containerSimulatore {
    display: flex;
    justify-content: center;
    gap: 30px; /* Увеличенное расстояние между кнопками */
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Стили для активной кнопки */
.btn_active {
    background-color: #0056b3 !important; /* Синий цвет для активной кнопки */
    color: #fff !important; /* Убедитесь, что цвет текста остается белым */
    font-weight: 500;
    pointer-events: none; /* Отключаем события для активной кнопки */
    opacity: 1; /* Полная непрозрачность для активной кнопки */
}


/* Стили для неактивной кнопки */
.btn_custom {
    padding: 15px 30px;
    background-color: #ccc; /* Серый цвет для неактивной кнопки */
    color: #1a1a1a; /* Белый цвет текста */
    font-size: 1.1em; /* Размер шрифта */
    font-weight: 500;
    border: none; /* Убираем границу */
    border-radius: 8px; /* Закругленные углы */
    cursor: pointer; /* Указатель при наведении */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Плавное изменение цвета и масштабирование */
}

/* Эффект при наведении */
.btn_custom:hover {
    background-color: #a6a6a6; /* Более темный серый цвет для неактивной кнопки при наведении */
    transform: scale(1.05); /* Легкое увеличение */
}

/* Адаптивные стили для мобильных устройств */
@media (max-width: 768px) {
    .btn_custom {
        font-size: 16px; /* Уменьшение размера шрифта */
        padding: 12px 25px;
    }
}

@media (max-width: 480px) {
    .btn_custom {
        width: 90%; /* Ширина кнопки на маленьких экранах */
        font-size: 14px; /* Еще меньше размер шрифта */
        padding: 10px 20px;
    }

    .button-containerSimulatore {
        flex-direction: column;
        align-items: center;
        gap: 20px; /* Увеличенное расстояние между кнопками на маленьких экранах */
    }
}





/* Стили для контейнера кнопки */
.btn_start-container {
    width: 75%;
    max-width: 400px; /* ограничение, чтобы на больших экранах не раздувалось */
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Анимация пульсации */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Стили для кнопки */
.btn_start {
    width: 100%;
    aspect-ratio: 1 / 1; /* делает кнопку квадратной */
    background-color: #28a745;
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    animation: pulse 3s infinite;
    transition: background-color 0.3s ease;
}

/* Стили при наведении */
.btn_start:hover {
    background-color: #218838; /* Более темный зеленый цвет */
}

/* Адаптивные стили для мобильных устройств */
@media (orientation: portrait) {
    .btn_start {
        width: 80vw; /* ширина кнопки — 80% ширины экрана */
        max-width: 350px;
        font-size: 20px;
        font-weight: 500;
    }
}


.letter_button_container {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 10px;
            margin-bottom: 20px;
            direction: ltr; /* Устанавливаем направление текста слева направо */
        }

        .letter-button {
            padding: 10px 15px;
            font-size: 1.2rem;
            cursor: pointer;
            border: 1px solid #ccc;
            border-radius: 5px;
            background-color: #f0f0f0;
            transition: background-color 0.3s, color 0.3s, transform 0.3s;
            flex: 1 0 calc(100% / 7 - 10px);
            font-weight: 500;
            color: #30638d;
        }

        .letter-button:hover {
            background-color: #1e64b0;
            color: white;
            transform: scale(1.05);
        }

        .letter-button.active {
            background-color: #1e64b0;
            color: white;
        }

        /* Для кнопки {ALL_LETTERS} */
        .letter-button.all-letters {
            width: 100%;
            flex-basis: 100%;
            text-align: center;
        }

        @media (max-width: 768px) {
            .letter-button {
                font-size: 1rem;
            }
        }

        @media (max-width: 480px) {
            .letter-button {
                font-size: 0.9rem;
                padding: 8px 12px;
            }
        }

.homepage_button {
        display: flex;
        flex-direction: column;
        width: 100%;
 
        margin: 5px;
        padding: 15px 30px;
        font-size: 1.1em;
        cursor: pointer;
    }

    .homepage_button a {
        flex: 1; /* Занимает равную долю в родительском контейнере */
        display: flex;
        justify-content: center; /* Центрирует текст по горизонтали */
        align-items: center; /* Центрирует текст по вертикали */
        padding: 15px; /* Отступы внутри кнопки */
        margin: 5px 0; /* Отступы между кнопками */
        text-decoration: none; /* Убирает подчеркивание текста */
        color: white; /* Цвет текста */
        background-color: #007BFF; /* Цвет фона кнопки */
        font-size: 1.5em; /* Размер шрифта */
        transition: background-color 0.3s; /* Плавный переход цвета фона */
        border: none;
        border-radius: 15px;
    }

    .homepage_button a:hover {
        background-color: #0056b3; /* Цвет фона при наведении */
    }

    @media (max-width: 600px) {
        .homepage_button a {
            font-size: 1em; /* Размер шрифта для мобильных устройств */
        }
    }


.coniugazione-button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.coniugazione_button {
    margin: 5px;
    padding: 15px 30px;
    font-size: 1.1em;
    cursor: pointer;
    border: none;
    border-radius: 15px;
    background-color: #007BFF;
    color: white;
    transition: background-color 0.3s;
    font-weight: 500;
}

.coniugazione_button.active {
    background-color: #336600;
    font-size: 20px; /* Увеличиваем размер для активной кнопки */
    color: white;
}

.coniugazione_button:hover {
    background-color: #0056b3;
}

@media (max-width: 600px) {
    .coniugazione_button {
        flex: 1 1 calc(33.333% - 10px); /* 3 кнопки в ряд на мобильных устройствах */
    }
}

@media (min-width: 601px) {
    .coniugazione_button {
        flex: 1 1 calc(20% - 10px); /* 5 кнопок в ряд на компьютере */
    }
}




.button-container {
    display: flex; /* Располагаем кнопки в ряд */
    justify-content: center; /* Центрируем кнопки */
    gap: 0px; /* Добавляем расстояние между кнопками */
    padding: 0px; /* Внутренние отступы */
    margin: 10px 0px; /* 40px сверху/снизу и 0px слева/справа */
  /*  background: linear-gradient(135deg, #f0f0f0, #e0e0e0); */
    background: rgba(0,0,0,0.2); 
    border-radius: 12px; /* Закругленные углы */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Легкая тень для объема */
  /*  border: 1px solid #ddd;  */
}

#mood-buttons {
    display: flex; /* Располагаем кнопки в ряд */
    justify-content: center; /* Центрируем кнопки */
    gap: 0px; /* Добавляем расстояние между кнопками */
    padding: 0px; /* Внутренние отступы */
    margin: 10px 0px; /* 40px сверху/снизу и 0px слева/справа */
    background: rgba(0,0,0,0.2); 
    border-radius: 12px; /* Закругленные углы */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Легкая тень для объема */
    border: 0px solid #ddd; /* Легкая граница */
}






.btn_main {
    background-color: #009900; /* Зеленый цвет */
    border: none; /* Убираем стандартную границу */
    color: white; /* Белый цвет текста */
    padding: 10px 20px; /* Отступы внутри кнопки */
    text-align: center; /* Выравнивание текста по центру */
    text-decoration: none; /* Убираем подчеркивание текста */
    display: inline-block; /* Делает кнопку блочным элементом для правильного отображения отступов */
    font-size: 1.3em; /* Размер шрифта */
    font-weight: 500;
    border-radius: 15px; /* Скругление углов */
    cursor: pointer; /* Изменяет курсор на указатель */
    transition: background-color 0.3s ease; /* Плавный переход цвета фона */
    width: 100%; /* Ширина кнопки */
}

/* Адаптивные стили для мобильных устройств */
@media (orientation: portrait) {
    .btn_main {
        width: 100%; /* ширина кнопки — 80% ширины экрана */
/*        max-width: 350px; */
        font-size: 20px;
        font-weight: 500;
    }
}

.btn_main:hover {
    background-color: #218838; /* Темно-зеленый цвет при наведении */
}

.btn_coniugazione {
    background-color: #2563eb; /* Синий (blue-600) */
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.btn_coniugazione:hover {
    background-color: #1d4ed8; /* Синий темнее (blue-700) */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}


#floating-button-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

#floating-button {
    background-color: rgba(0, 0, 0, 0.67);
    color: #ffca18;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 10px; /* Закругленные углы */
    transition: all 0.3s ease; /* Плавный переход для всех свойств */
}

/* Стили для кнопки при наведении мыши */
#floating-button:hover {
    background-color: #ffca18; /* Ярко-желтый цвет */
    border: 2px dashed #ee0000; /* граница толщиной 2px и типом dashed */
    color: #000000; /* Черный текст для лучшего контраста */
}

#overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
}


/* Родительский блок */
#op7pause-play {
    display: flex;
    justify-content: center;   /* центрируем кнопки */
    flex-wrap: wrap;           /* перенос на новую строку при узком экране */
    gap: 10px;                 /* расстояние между кнопками */
}

.buttonPalestriA1B2 {
    display: block;
    padding: 12px 15px;
    text-align: center;
    background: #0074d9;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.1rem;
  
}

/* Общие стили кнопки */
#op7pause-play .button {
    flex: 1 1 40%;             /* адаптивная ширина: минимум 40% */
    margin: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 15px;       /* закругленные углы */
    box-sizing: border-box;    /* учитываем паддинг и бордер в ширину */
}

/* Активная кнопка */
#op7pause-play .button.active {
    background-color: #009900;
    border: 1px solid #009900;
    color: white;
    font-weight: 500;
}


#op2essere-avere .button,
#op2trainer-type .button,
#op2verb-type .button,
#op2reflexivity .button,
#trainer-type .button,
#verb-type .button,
#reflexivity .button,
#mood .button,
#mood-b1 .button,
#mood-buttons .button {
    display: inline-block;
    width: 20%;
    margin: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ccc;
    background-color: #f9f9f9;
    border-radius: 15px; /* Закругленные углы */
    box-sizing: border-box; /* Учитываем паддинг и бордер в ширину */
}

#op2essere-avere .button.active,
#op2trainer-type .button.active,
#op2verb-type .button.active,
#op2reflexivity .button.active,
#trainer-type .button.active,
#verb-type .button.active,
#reflexivity .button.active,
#mood .button.active,
#mood-buttons .button.active {
    background-color: #009900;
    border: 1px solid #009900;
    color: white;
    font-weight: 500;
}

#mood-buttons {
    margin-top: 20px;

}

/* Стили для мобильных экранов */
@media only screen and (max-width: 767px) and (orientation: portrait) {
    #op2essere-avere, 
    #op2pause-play, 
    #op2trainer-type,
    #op2verb-type,
    #op2reflexivity,
    #trainer-type,
    #verb-type,
    #reflexivity,
    #mood,
    #mood-buttons {
        display: flex;
        flex-wrap: wrap;
    }
    #op2essere-avere .button,
    #op2trainer-type .button,
    #op2verb-type .button,
    #op2reflexivity .button,
    #trainer-type .button,
    #verb-type .button,
    #reflexivity .button,
    #mood .button,
    #mood-buttons .button {
        width: 45%; /* Две кнопки в ряду */
        margin: 5px 2.5%; /* Отступы для создания промежутков */
        box-sizing: border-box; /* Учитываем паддинг и бордер в ширину */
    }
}





@media only screen and (max-width: 767px) and (orientation: portrait) {
    #banner-messages {
        display: none; /* Скрыть контейнер сообщений на мобильных устройствах с вертикальной ориентацией */
    }
}

/*   Palesttre */

#celi_palestre {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;

    width: 100%;
    margin: 20px 0;
    padding: 20px;

    background: rgba(0,0,0,0.05);
    border-radius: 12px;
}

/* кнопки */
#celi_palestre .button {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 14px 10px;
    border-radius: 14px;

    background: linear-gradient(145deg, #2f80ed, #1c5fd4);
    color: #fff;
    text-decoration: none;

    font-size: 1.1rem;
    font-weight: 600;

    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transition: all 0.25s ease;

    user-select: none;
}

/* hover */
#celi_palestre .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.2);
    background: linear-gradient(145deg, #3b8cff, #2269e0);
}

/* click */
#celi_palestre .button:active {
    transform: scale(0.97);
}

/* 📱 планшеты */
@media (max-width: 768px) {
    #celi_palestre {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 📱 телефоны */
@media (max-width: 420px) {
    #celi_palestre {
        grid-template-columns: 1fr;
    }

    #celi_palestre .button {
        font-size: 1rem;
        padding: 12px;
    }
}
