/* Базовые стили для приложения "Какую ноту я пою" */

/* Общие стили */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: transparent;
    color: #333;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Стили для экранов */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Стили для заголовка */
header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

header h1 {
  font-family: 'Nunito', sans-serif; /* Применяем наш шрифт */
  font-weight: 400; /* Стандартная толщина для всей фразы */
  font-size: 26px; /* Или любой другой подходящий размер */
  color: #3399ff; /* Цвет текста */
  text-align: center;
}

/* Стиль для выделенного слова "ноту" */
h1 .highlight-note {
  font-weight: 800; /* Делаем этот фрагмент жирным */
  font-size: 1.4em; /* Увеличиваем шрифт в 1.5 раза */
  color: #ff9900; /* Задаем оранжевый цвет */
  display: inline-flex; /* Используем flex для выравнивания */
  align-items: center; /* Выравниваем по центру */
}

.note-svg {
  height: 0.5em; /* Подбираем высоту под шрифт */
  width: auto; /* Автоматическая ширина */
  fill: #ff9900; /* Задаем оранжевый цвет для SVG */
  transform: translateY(0.1em); /* Сдвигаем ноту вниз */
}

/* Стили для кнопки "Назад" */
.back-button {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: #0077b6;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 15px;
    font-size: 1.2em;
    cursor: pointer;
    transition: background-color 0.3s;
}

.back-button:hover {
    background-color: #005a8c;
}

/* Главный экран */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 300px;
    margin: 0 auto;
}

.menu-button {
    padding: 15px 20px;
    font-size: 1.2em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background-color: #0077b6;
    color: white;
    transition: background-color 0.3s;
}

.menu-button:hover {
    background-color: #005a8c;
}

#game-btn {
    display: none;
}

/* Экран определения ноты */
.note-container {
    text-align: center;
    font-size: 1.5em;
    margin: 30px 0;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.note-label {
    font-size: 1.2em;
    margin: 0 0 10px 0;
}

.note-value {
    font-size: 3em;
    font-weight: bold;
    color: #0077b6;
    margin: 10px 0;
}

.note-english {
    font-size: 1.5em;
    color: #666;
    margin: 10px 0 0 0;
}

.note-octave, .target-octave {
    font-size: 1.2em;
    color: #888;
    margin: 5px 0 0 0;
    font-style: italic;
}

#visualization {
    text-align: center;
    margin: 30px 0;
}

#audio-visualization {
    width: 100%;
    height: 150px;
    background-color: #0a1a0a; /* Темно-зеленый фон */
    border-radius: 10px;
    display: block;
    background-image:
        linear-gradient(rgba(0, 255, 0, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.2) 1px, transparent 1px);
    background-size: 20px 20px; /* Размер ячеек сетки */
    border: 2px solid rgba(0, 255, 0, 0.3);
}

.visualization-info {
    display: none; /* Скрываем подпись */
}

#note-controls {
    text-align: center;
    margin: 20px 0;
}

#note-controls button {
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0077b6;
    color: white;
}

#note-controls button:hover {
    background-color: #005a8c;
}

#note-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Экран тренировки */
.target-note-container {
    text-align: center;
    margin: 20px 0;
}

.target-label {
    font-size: 1.2em;
    margin: 0 0 10px 0;
}

.target-note {
    font-size: 3em;
    font-weight: bold;
    color: #0077b6;
    margin: 10px 0;
}

.current-note-indicator {
    margin: 30px 0;
}

.indicator {
    width: 100%;
    height: 50px;
    background-color: #eee;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    margin: 20px 0;
}

.indicator-bar {
    position: absolute;
    top: 0;
    left: 50%;
    width: 10px;
    height: 100%;
    background-color: #0077b6;
    transform: translateX(-50%);
    transition: background-color 0.3s;
}

.indicator.correct .indicator-bar {
    background-color: #4CAF50;
}

.indicator.incorrect .indicator-bar {
    background-color: #F44336;
}

.direction-arrows {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.arrow {
    font-size: 2em;
    background: none;
    border: none;
    cursor: pointer;
    color: #0077b6;
}

.arrow:hover {
    color: #005a8c;
}

.arrow:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.success-animation {
    text-align: center;
    margin: 30px 0;
}

.success-animation.hidden {
    display: none;
}

.confetti {
    width: 20px;
    height: 20px;
    background-color: #4CAF50;
    position: absolute;
    border-radius: 50%;
    animation: confetti-fall 2s ease-in-out;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100px) rotate(360deg);
        opacity: 0;
    }
}

.success-text {
    font-size: 2em;
    font-weight: bold;
    color: #4CAF50;
    margin: 20px 0;
}

#repeat-training-btn {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    margin-top: 20px;
}

#repeat-training-btn:hover {
    background-color: #3d8b40;
}

#training-controls {
    text-align: center;
    margin: 20px 0;
}

#training-controls button {
    padding: 10px 20px;
    margin: 0 10px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0077b6;
    color: white;
}

#training-controls button:hover {
    background-color: #005a8c;
}

#training-controls button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Экран настроек диапазона */
.range-instructions {
    text-align: center;
    margin: 15px 0; /* Уменьшаем отступы */
    padding: 15px; /* Уменьшаем отступы */
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 1.3em;
    display: flex;
    flex-direction: column; /* Изменено на column */
    justify-content: center;
    align-items: center;
    min-height: 80px; /* Примерная высота для выравнивания */
    gap: 15px; /* Добавлен отступ между элементами */
}

#microphone-check-text p {
    font-size: 1.5em; /* Увеличенный шрифт */
    font-weight: bold; /* Жирный шрифт */
    color: #555; /* Немного темнее */
}

.range-controls {
    display: flex;
    flex-direction: row;
    gap: 15px;
    width: 100%; /* Растягиваем на всю ширину карточки */
    padding: 0 20px;
    box-sizing: border-box; /* Учитываем padding в ширине */
}

.range-controls button {
    padding: 15px 20px;
    font-size: 0.9em; /* Уменьшаем шрифт */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background-color: #0077b6;
    color: white;
    flex: 1;
}

.range-controls button:hover {
    background-color: #005a8c;
}

.range-controls button:disabled {
    background-color: #cccccc;
    color: #666666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.range-display {
    text-align: center;
    font-size: 1.5em;
    margin: 30px 0;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.range-indicator {
    text-align: center;
    margin: 30px 0;
}

.range-indicator.hidden {
    display: none;
}

.range-progress-bar {
    width: 100%;
    height: 30px;
    background-color: #eee;
    border-radius: 15px;
    overflow: hidden;
    margin: 20px 0;
}

.range-progress {
    height: 100%;
    background-color: #0077b6;
    width: 0%;
    transition: width 0.3s;
}

/* Экран игры */
.game-section {
    display: none;
}

.game-section.active {
    display: block;
}

.difficulty-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 350px;
    margin: 30px auto;
}

.difficulty-btn {
    padding: 20px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    background-color: #0077b6;
    color: white;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.3);
}

.difficulty-btn:hover {
    background-color: #005a8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 119, 182, 0.4);
}

.difficulty-name {
    display: block;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 5px;
}

.difficulty-info {
    display: block;
    font-size: 0.9em;
    opacity: 0.9;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-size: 1.1em;
    margin: 20px 0 15px 0;
    padding: 15px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.4em;
    font-weight: bold;
    color: #0077b6;
}

.stat-value.timer {
    color: #e74c3c;
}

.game-progress {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin: 10px 0 20px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.game-feedback {
    margin: 10px 0;
}

#game-timer {
    font-weight: bold;
    color: #0077b6;
}

#game-success-animation {
    position: relative;
}

#game-arrows .arrow:disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Дополнительные стили для игровых элементов */
.game-section h2 {
    text-align: center;
    color: #4a4a4a;
    margin-bottom: 20px;
}

.difficulty-info {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin: 10px 0;
}

.game-progress {
    width: 100%;
    height: 8px;
    background-color: #eee;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.game-progress-bar {
    height: 100%;
    background-color: #0077b6;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.win-condition {
    font-size: 0.9em;
    color: #666;
    text-align: center;
    margin: 10px 0;
    padding: 10px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

#game-instructions {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#game-instructions button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    margin-top: 20px;
}

#game-instructions button:hover {
    background-color: #3d8b40;
}

#game-controls {
    text-align: center;
    margin: 20px 0;
}

#game-controls button {
    padding: 10px 20px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #F44336;
    color: white;
}

#game-controls button:hover {
    background-color: #d32f2f;
}

#round-stats {
    margin: 20px 0;
    padding: 25px;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.round-stats-content {
    margin-bottom: 25px;
}

.main-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
}

.main-stats p {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-stats .stat-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
}

.main-stats .stat-value {
    font-size: 1.8em;
    font-weight: bold;
    color: #0077b6;
}

.detailed-stats {
    margin-top: 20px;
    padding: 15px;
    background-color: #f1f3f4;
    border-radius: 8px;
    text-align: left;
}

.detailed-stats p {
    margin: 8px 0;
    font-size: 0.95em;
}

.round-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
    padding: 12px 24px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.primary-btn {
    background-color: #4CAF50;
    color: white;
}

.primary-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-1px);
}

.secondary-btn {
    background-color: #0077b6;
    color: white;
}

.secondary-btn:hover {
    background-color: #005a8c;
    transform: translateY(-1px);
}
/* Стили для двойного слайдера диапазона */
.range-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px 0; /* Уменьшаем отступы */
    padding: 10px 0; /* Уменьшаем отступы */
}

.divider-arrow {
    font-size: 2.5em;
    color: #0077b6;
    margin-bottom: 10px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.divider-text {
    font-size: 1.1em;
    color: #666;
    text-align: center;
    font-weight: 500;
}

/* Контейнер двойного слайдера */
.dual-range-controls {
    background-color: white;
    border-radius: 20px;
    padding: 30px 25px; /* Добавляем горизонтальные отступы для компенсации */
    margin: 20px 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    position: relative;
}

.dual-slider-container {
    width: 100%;
}

.dual-slider-wrapper {
    position: relative;
    margin: 40px 0; /* Убираем отступы, чтобы трек занимал всю ширину */
}

/* Основной трек слайдера */
.dual-slider-track {
    position: relative;
    height: 12px;
    background: linear-gradient(90deg, #e8e8e8 0%, #f5f5f5 100%);
    border-radius: 8px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

/* Активная область между ползунками */
.dual-slider-range {
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(90deg, #0077b6 0%, #4a9eff 100%);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 119, 182, 0.3);
}

/* Октавные метки */
.octave-markers {
    position: absolute;
    top: -35px;
    left: 0; /* Начинаем от левого края */
    right: 0; /* Растягиваем до правого края */
    height: 25px;
    pointer-events: none; /* Чтобы не мешать кликам по треку */
}

.octave-marker {
    position: absolute;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75em;
    color: #666;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}

.octave-marker .tick {
    width: 2px;
    height: 6px;
    background-color: #ccc;
    border-radius: 1px;
    position: absolute;
    bottom: -8px; /* Позиционируем относительно трека */
    left: 0; /* Выравниваем по левому краю контейнера */
    transform: translateX(-50%); /* Центрируем саму черту */
}

.octave-marker .label {
    transform: translateX(-50%); /* Центрируем текст по умолчанию */
}

.octave-marker:first-child .label {
    transform: translateX(0); /* Сдвигаем текст первой метки вправо */
}

/* Ползунки */
.dual-slider-thumb {
    position: absolute;
    top: 50%;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: grab;
    transform: translate(-50%, -50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 3px solid white;
    outline: none;
    z-index: 10;
}

.dual-slider-thumb:active {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(1.1);
}

.dual-slider-thumb:focus {
    box-shadow: 0 0 0 4px rgba(0, 119, 182, 0.2), 0 4px 12px rgba(0,0,0,0.15);
}

/* Левый ползунок (минимум) - темная схема */
.dual-slider-thumb-min {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    z-index: 11;
}

.dual-slider-thumb-min:hover {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.4);
}

.dual-slider-thumb-min::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Правый ползунок (максимум) - светлая схема */
.dual-slider-thumb-max {
    background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
    z-index: 12;
}

.dual-slider-thumb-max:hover {
    background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%);
    box-shadow: 0 6px 20px rgba(116, 185, 255, 0.4);
}

.dual-slider-thumb-max::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Отображение значений */
.dual-slider-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 25px;
    padding: 0 15px;
}

.dual-slider-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.value-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.value-display {
    font-size: 1.2em;
    font-weight: bold;
    padding: 8px 16px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-width: 100px;
}

.dual-slider-value-min .value-display {
    color: #2c3e50;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    border: 2px solid #34495e;
}

.dual-slider-value-max .value-display {
    color: #0984e3;
    background: linear-gradient(135deg, #dff6ff 0%, #b6e5ff 100%);
    border: 2px solid #74b9ff;
}

.value-display.updated {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Блок отображения вокального диапазона */
.vocal-range-display {
    background: linear-gradient(135deg, #6a82fb 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 25px;
    margin: 30px 0;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.vocal-range-display::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(0%) translateY(0%) rotate(180deg); }
}

.range-title {
    font-size: 1.4em;
    font-weight: 600;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    position: relative;
    z-index: 1;
}

.range-result {
    position: relative;
    z-index: 1;
}

.range-notes {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

.range-info {
    display: block;
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 500;
}

.range-result.updated .range-notes {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Стили для UI определения самой низкой ноты */
#range-detection-controls {
    display: none; /* По умолчанию скрыт */
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sing-prompt {
    font-size: 1.5em;
    color: #333;
    margin: 0 0 20px 0;
}

.detection-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cancel-btn, .save-btn {
    padding: 12px 25px;
    font-size: 1em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s, transform 0.2s;
}

.cancel-btn {
    background-color: #0077b6; /* Синий */
}

.cancel-btn:hover {
    background-color: #005a8c;
    transform: translateY(-1px);
}

.save-btn {
    background-color: #4CAF50; /* Зеленый */
}

.save-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-1px);
}

.hidden {
    display: none !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 600px) {
    #app {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
        padding: 0 10px; /* Уменьшаем горизонтальные отступы */
    }

    #range-settings-screen h1 {
        font-size: 1.3em; /* Увеличиваем шрифт в 1.3 раза */
    }

    #range-settings-screen .range-instructions {
        margin: 5px 0; /* Уменьшаем отступы */
    }

    #range-settings-screen #microphone-check-text p {
        font-size: 1.0em; /* Уменьшаем шрифт */
    }

    #range-settings-screen .range-controls button {
        font-size: 0.7em; /* Уменьшаем шрифт */
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
    }

    #range-settings-screen .preset-btn {
        flex-basis: calc(33.333% - 7px) !important; /* Фиксируем ширину кнопок */
        padding: 10px 5px; /* Корректируем padding для высоты */
    }

    #range-settings-screen .preset-btn:nth-child(5) {
        font-size: 0.8em; /* Уменьшаем шрифт на 20% */
    }

    #range-settings-screen .dual-slider-values {
        flex-direction: row; /* Кнопки в ряд */
        gap: 5px;
    }

    #range-settings-screen .dual-slider-value {
        width: 30%; /* Уменьшаем ширину */
    }

    #range-settings-screen .range-divider {
        margin: 10px 0; /* Уменьшаем отступы */
    }

    #range-settings-screen .divider-arrow {
        display: none; /* Скрываем стрелку */
    }
    
    .menu-buttons,
    #tip-of-the-day-container,
    #learn-more-btn {
        max-width: 100%;
    }
    
    .note-value {
        font-size: 2em;
    }
    
    .target-note {
        font-size: 2em;
    }
    
    .difficulty-buttons {
        max-width: 100%;
    }
    
    .game-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        justify-content: space-between;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .main-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .round-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .primary-btn, .secondary-btn {
        min-width: auto;
        width: 100%;
    }
    
    .difficulty-buttons {
        max-width: 100%;
    }
    
    .range-controls {
        flex-direction: row;
        max-width: 100%;
        padding: 0 10px;
        gap: 10px;
    }
    
    .range-controls button {
        flex: 1;
    }
    
    /* Адаптация двойного слайдера для мобильных устройств */
    .dual-range-controls {
        padding: 25px 15px;
        margin: 15px 0;
    }
    
    .dual-slider-wrapper {
        margin: 35px 0;
    }
    
    .dual-slider-track {
        height: 16px;
    }
    
    .dual-slider-thumb {
        width: 36px;
        height: 36px;
    }
    
    .octave-markers {
        top: -30px;
        padding: 0 10px;
    }
    
    .octave-marker {
        font-size: 0.7em;
    }
    
    .dual-slider-values {
        flex-direction: row; /* Кнопки в ряд */
        gap: 10px; /* Отступ между кнопками */
        margin-top: 20px;
        padding: 0 5px; /* Отступы по бокам */
        justify-content: space-between;
    }
    
    .dual-slider-value {
        flex: 1; /* Растягиваем на доступное место */
        min-width: 0; /* Позволяем кнопкам сжиматься */
    }
    
    .value-display {
        font-size: 0.8em; /* Уменьшаем шрифт (примерно на 30%) */
        min-width: auto;
        width: 100%;
        white-space: nowrap; /* Запрещаем перенос строк */
        padding: 10px 8px; /* Адаптируем внутренние отступы */
        box-sizing: border-box; /* Учитываем padding в ширине */
    }
    
    .value-label {
        font-size: 0.8em;
    }
    
    .divider-arrow {
        font-size: 2em;
    }
    
    .divider-text {
        font-size: 1em;
    }
    
    /* Адаптивность для карточек режима тренировки */
    /* Эти стили больше не нужны внутри медиа-запроса, так как станут базовыми */

    /* Эти стили больше не нужны внутри медиа-запроса, так как станут базовыми */
}
/* Стили для кнопок-пресетов голосов */
#voice-presets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.preset-btn {
    padding: 12px 18px;
    font-size: 1em;
    color: white;
    background-color: #ccc; /* Фоновый цвет по умолчанию */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.preset-btn:hover {
    filter: brightness(1.2);
}

.preset-btn.active {
    border: 2px solid #00c6ff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 10px #00c6ff;
    transform: scale(1.05);
}

/* Градиентная палитра для кнопок */
.preset-btn:nth-child(1) { background-color: #8B0000; } /* Бас - тёмно-красный */
.preset-btn:nth-child(2) { background-color: #FF8C00; } /* Баритон - тёмно-оранжевый */
.preset-btn:nth-child(3) { background-color: #FFD700; } /* Тенор - насыщенный жёлтый */
.preset-btn:nth-child(4) { background-color: #006400; } /* Контральто - тёмно-зелёный */
.preset-btn:nth-child(5) { background-color: #00008B; } /* Меццо-сопрано - тёмно-синий */
.preset-btn:nth-child(6) { background-color: #87CEEB; } /* Сопрано - голубой */

/* Адаптивная верстка для кнопок-пресетов */
@media (max-width: 768px) {
    .preset-btn {
        flex-basis: calc(33.333% - 10px);
    }
}

/* Стили для режима тренировки вокала */
#vocal-training-mode {
    display: none;
    /* padding: 20px; убираем лишний отступ */
}

#vocal-training-mode main {
    text-align: center;
}

#vocal-training-mode.active {
    display: block;
}

#vocal-training-mode header {
    width: 100%;
}

#vocal-training-mode header {
    width: 100%; /* Stretch header to full width */
}

#vocal-training-mode #vocal-training-display {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.vocal-section {
    flex: 1;
    background-color: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

/* Убрана анимация при наведении */
/* .vocal-section:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
} */

.vocal-section h3 {
    color: #4a4a4a;
    font-size: 1.1em;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.note-display, .feedback-display {
    font-size: 1.4em;
    font-weight: bold;
    color: #0077b6;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: white;
    padding: 10px;
    margin-top: 10px;
}

.feedback-display {
    font-size: 1em;
    font-weight: normal;
    line-height: 1.4;
}

/* Осциллограф на новой строке */
#vocal-training-mode #audio-visualization {
    width: 100%;
    height: 100px;
    margin-top: 5px; /* Уменьшаем отступ сверху до минимума */
    display: block;
    background-color: #0a1a0a;
    border-radius: 10px;
    background-image:
        linear-gradient(rgba(0, 255, 0, 0.2) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 0, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
    border: 2px solid rgba(0, 255, 0, 0.3);
}

#vocal-training-mode #target-note,
#vocal-training-mode #user-note,
#vocal-training-mode #feedback {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    width: 200px;
}

#vocal-training-mode #training-controls {
    display: flex;
    justify-content: center;
    gap: 8px; /* Уменьшаем отступ между кнопками */
    flex-wrap: wrap;
    text-align: center;
}

#vocal-training-mode button {
    padding: 10px 5px; /* Уменьшаем горизонтальный паддинг для компактности */
    border: none;
    border-radius: 5px;
    background-color: #0077b6;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
    flex: 1; /* Делаем кнопки одинаковой ширины */
    white-space: nowrap; /* Запрещаем перенос текста */
    font-size: 0.9em; /* Немного уменьшаем шрифт на кнопках */
}

#vocal-training-mode button:hover {
    background-color: #005a8c;
}

#vocal-training-mode button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Кнопка "Начать тренировку" зеленая по умолчанию, но НЕ когда disabled */
#start-training:not(:disabled) {
    background-color: #4CAF50 !important;
}

#start-training:not(:disabled):hover {
    background-color: #3d8b40 !important;
}

#vocal-training-mode #oscilloscope {
    border: 1px solid #ccc;
}

/* Стили для фиксации успешного попадания в ноту */
.vocal-section .note-display.success-hit {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
    border: 3px solid #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
    transform: scale(1.05);
    transition: all 0.5s ease;
}

.vocal-section .note-display.success-hit::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: #4CAF50;
    border: 2px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    color: white;
    animation: checkmark-bounce 0.6s ease;
}

@keyframes checkmark-bounce {
    0% { transform: scale(0) rotate(0deg); }
    50% { transform: scale(1.2) rotate(180deg); }
    100% { transform: scale(1) rotate(360deg); }
}

.vocal-section {
    position: relative;
}

.vocal-section .note-display {
    position: relative;
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .preset-btn {
        flex: 1;
    }
}

/* Стили для кнопки "Назад" на мобильных устройствах */
@media (max-width: 600px) {
    .back-button {
        padding: 8px 12px; /* Уменьшаем padding для компактности */
        font-size: 1.5em; /* Увеличиваем стрелку */
    }

    .back-button-text {
        display: none; /* Скрываем текст */
    }
    /* Адаптивность для карточек режима тренировки */
    #vocal-training-mode #vocal-training-display {
        flex-direction: column;
        gap: 5px; /* Уменьшаем отступ между карточками */
    }
    
    .vocal-section {
        padding: 5px 15px; /* Значительно уменьшаем вертикальные отступы */
        margin-bottom: 0;
    }
    
    .vocal-section h3 {
        font-size: 0.9em; /* Уменьшаем шрифт заголовка */
        margin: 0 0 5px 0; /* Уменьшаем отступ снизу */
    }
    
    .note-display, .feedback-display {
        font-size: 1em; /* Уменьшаем шрифт контента */
        min-height: auto; /* Убираем минимальную высоту */
        padding: 2px; /* Уменьшаем внутренний отступ */
        margin-top: 0;
    }
}

/* Стили для выбора типа нот в режиме тренировки */
.vocal-card {
    background-color: white;
    border-radius: 15px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.vocal-card h4 {
    margin: 0 0 10px 0;
    color: #4a4a4a;
    font-size: 1em;
}

.note-type-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#note-type-selection .note-type-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #0077b6; /* Базовый синий, который будет переопределен */
    color: white;
}

#note-type-selection .note-type-btn:disabled {
    background-color: #ccc !important; /* Серый цвет для неактивной */
    color: white !important;
    font-weight: bold;
    box-shadow: none;
    cursor: not-allowed;
}

#note-type-selection .note-type-btn:not(:disabled) {
    background-color: #4CAF50 !important; /* Зеленый цвет для активной */
    color: white !important;
    box-shadow: 0 2px 5px rgba(76, 175, 80, 0.4);
}
/* Стили для падающих нот */
#notes-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: #f5f5f5;
}

.note {
    position: absolute;
    color: rgba(0, 0, 0, 0.2);
    opacity: 0;
    font-size: 24px; /* Можно настроить размер нот */
    user-select: none;
    animation: fall 5s linear infinite;
}

@keyframes fall {
    0% {
        transform: translateY(-100px);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}
/* Стили для "Совета дня" */
#tip-of-the-day-container {
    margin: 30px auto;
    padding: 15px;
    max-width: 300px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    box-sizing: border-box; /* Учитываем padding и border в ширине */
}

#tip-of-the-day-text {
    font-style: italic;
    color: #555;
    text-align: center;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Стили для новой кнопки */
#learn-more-btn {
    background-color: #ff9900; /* Оранжевый цвет, как у "НОТУ" */
    margin: 0 auto 20px; /* Центрирование и отступ снизу */
    display: block; /* Чтобы margin: auto сработало */
    max-width: 300px; /* Такая же ширина, как у контейнера кнопок */
    box-sizing: border-box; /* Учитываем padding и border в ширине */
}

#learn-more-btn:hover {
    background-color: #e68a00; /* Более темный оранжевый при наведении */
}