/* =========================================================
   Модальное окно настроек упрощения (DrumSong)
   ========================================================= */

/* === Оверлей === */
.simplify-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px 0;
}

/* === Контейнер окна === */
.simplify-modal-content {
    position: relative;
    background-color: whitesmoke;
    margin: auto;
    padding: 20px 30px 25px;
    border-radius: 10px;
    box-shadow: 0 0 5px gray;
    width: 92%;
    max-width: 1200px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    font-family: Arial, Helvetica, sans-serif;
    color: black;
}

/* === Заголовки === */
.simplify-modal-title {
    text-align: center;
    font-size: 28px;
    font-weight: normal;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    /* border-bottom: 1px solid gray; */
}

.simplify-modal-subtitle {
    font-size: 20px;
    color: #444;
    margin: 8px 0 6px 0;
    font-weight: normal;
}

/* === Кнопка закрытия === */
.simplify-modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #ff0000;
    cursor: pointer;
    border-radius: 5px;
    transition: 0.3s;
    z-index: 6;
}

.simplify-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #000;
    box-shadow: 0 0 10px #d35d57c9;
}

/* === Двухколоночная сетка === */
.simplify-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.simplify-modal-col {
    display: flex;
    flex-direction: column;
}

@media (max-width: 800px) {
    .simplify-modal-grid {
        grid-template-columns: 1fr;
    }
}

/* === Разделитель === */
.simplify-divider {
    height: 1px;
    background: gray;
    margin: 12px 0;
    opacity: 0.5;
}

/* =========================================================
   Базовый режим (global-mode)
   ========================================================= */
.global-mode-group {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.global-mode-option {
    flex: 1;
    min-width: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    background: whitesmoke;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 19px;
    cursor: pointer;
    transition: 0.3s;
    box-sizing: border-box;
    min-height: 44px;
}

.global-mode-option:hover {
    box-shadow: 0 0 10px #d35d57c9;
}

.global-mode-option.selected,
.global-mode-option:has(input:checked) {
    background: rgba(144, 238, 144, 0.635);
}

.global-mode-option input[type="radio"] {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: hwb(113 64% 0%);
    cursor: pointer;
}

/* =========================================================
   Общие стили для строк с элементами управления
   (хэт-радио и инструмент-чекбоксы)
   ========================================================= */
.hat-option,
.simplify-checkbox-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin: 4px 0;
    background: whitesmoke;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 20px;
    line-height: 24px;
    cursor: pointer;
    transition: 0.3s;
    box-sizing: border-box;
    min-height: 44px;
}

.hat-option:hover,
.simplify-checkbox-option:hover {
    box-shadow: 0 0 10px #d35d57c9;
}

.hat-option.selected,
.hat-option:has(input:checked),
.simplify-checkbox-option.checked {
    background: rgba(144, 238, 144, 0.635);
}

/* === Одинаковый размер контролов (радио = чекбокс) === */
.hat-option input[type="radio"],
.simplify-checkbox-option input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: hwb(113 64% 0%);
    cursor: pointer;
    flex-shrink: 0;
}

/* === Текст внутри опций === */
.hat-option-title,
.simplify-checkbox-option .checkbox-title {
    font-size: 20px;
    line-height: 24px;
    font-weight: normal;
}

.hat-option-desc,
.simplify-checkbox-option .checkbox-desc {
    font-size: 14px;
    color: #555;
    margin-top: 1px;
}

/* === Контейнер для чекбоксов (столбец) === */
.simplify-checkbox-group {
    display: flex;
    flex-direction: column;
}

/* === Инфо-блок чекбокса === */
.simplify-checkbox-option .checkbox-info {
    display: flex;
    flex-direction: column;
}

/* === Подсказки === */
.simplify-hint {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px 0;
}

/* =========================================================
   Футер и кнопки
   ========================================================= */
.simplify-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    /* border-top: 1px solid gray;
    padding-top: 12px; */
    margin-top: 15px;
}

.simplify-modal-btn {
    touch-action: pan-x pan-y;
    min-width: 150px;
    height: 55px;
    background: whitesmoke;
    margin: 0;
    padding: 0 20px;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 22px;
    color: black;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: 0.3s;
}

.simplify-modal-btn:hover {
    border: 1px solid gray;
    box-shadow: 0 0 10px #d35d57c9;
}

.simplify-modal-btn:active {
    background-color: #d35d5783;
}

.simplify-modal-btn.primary {
    background: rgba(144, 238, 144, 0.635);
}

/* =========================================================
   Блок управления звуком (в модальном окне упрощения)
   ========================================================= */

/* === Обёртка блока звука === */
.simplify-volume-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid gray;
}

.simplify-volume-title {
    font-size: 20px;
    color: #444;
    margin: 0 0 10px 0;
    font-weight: normal;
}

/* === Группа кнопок Mute === */
.simplify-mute-group {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.simplify-mute-btn {
    flex: 1;
    min-width: 140px;
    height: 45px;
    background: whitesmoke;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: 0.3s;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: black;
    touch-action: pan-x pan-y;
}

.simplify-mute-btn:hover {
    box-shadow: 0 0 10px #d35d57c9;
}

/* Заглушенная кнопка — красноватый фон (в стиле приложения) */
.simplify-mute-btn.muted {
    background: #d35d5783;
    color: white;
}

.simplify-mute-btn .mute-icon {
    font-size: 18px;
}

/* === Слайдер громкости === */
.simplify-volume-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.simplify-volume-slider-wrap .volume-label {
    font-size: 18px;
    color: #444;
    white-space: nowrap;
    min-width: 160px;
}

/* Сам ползунок — в стиле volume-control из основного CSS */
.simplify-volume-slider {
    flex: 1;
    height: 40px;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid gray;
    border-radius: 5px;
    background: whitesmoke;
    outline: none;
    transition: 0.3s;
}

.simplify-volume-slider:hover {
    box-shadow: 0 0 10px #d35d57c9;
}

.simplify-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 40px;
    background: #d35d57ab;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0;
}

.simplify-volume-slider::-moz-range-thumb {
    width: 20px;
    height: 40px;
    background: #d35d57ab;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.simplify-volume-slider::-webkit-slider-runnable-track {
    height: 40px;
    border-radius: 5px;
}

.simplify-volume-slider::-moz-range-track {
    height: 40px;
    border-radius: 5px;
}

.simplify-volume-value {
    font-size: 16px;
    color: #666;
    min-width: 50px;
    text-align: right;
    font-family: Arial, Helvetica, sans-serif;
}

/* === Информационный блок про минусовку === */
.simplify-info-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: 12px 0 18px 0;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid #ffc107;
    border-radius: 5px;
    font-size: 18px;
    color: #444;
    flex-wrap: wrap;
}

.simplify-info-block .info-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.simplify-info-block .info-text {
    flex: 1;
    min-width: 200px;
}

.simplify-info-block .info-text strong {
    color: #d35d57;
    font-weight: 500;
}

.simplify-info-block .minus-toggle-btn {
    touch-action: pan-x pan-y;
    min-width: 180px;
    height: 45px;
    background: whitesmoke;
    border: 1px solid gray;
    border-radius: 5px;
    font-size: 18px;
    font-family: Arial, Helvetica, sans-serif;
    color: black;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}

.simplify-info-block .minus-toggle-btn:hover {
    box-shadow: 0 0 10px #d35d57c9;
}

.simplify-info-block .minus-toggle-btn.active {
    background: rgba(144, 238, 144, 0.635);
    border: 1px solid gray;
    cursor: default;
}

.simplify-info-block .minus-toggle-btn.active:hover {
    box-shadow: none;
}

.simplify-generation-mode-section {
    margin-top: 15px;
    /* padding-top: 15px;
    border-top: 1px solid gray; */
}


/* ============================================
   🥁 ПРОГРЕСС-БАР ГЕНЕРАЦИИ БАРАБАНОВ
   ============================================ */

.drum-progress-modal {
    display: flex;
    position: fixed;
    z-index: 2500;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
    font-family: Arial, Helvetica, sans-serif;
}

.drum-progress-modal.visible {
    opacity: 1;
}

.drum-progress-content {
    background: whitesmoke;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid gray;
    width: 90%;
    max-width: 550px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.drum-progress-modal.visible .drum-progress-content {
    transform: translateY(0) scale(1);
}

/* === Заголовок === */
.drum-progress-header {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.drum-progress-icon {
    font-size: 40px;
    line-height: 1;
    animation: drumBounce 1.5s ease-in-out infinite;
}

@keyframes drumBounce {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-4px) rotate(-5deg);
    }
    75% {
        transform: translateY(-4px) rotate(5deg);
    }
}

.drum-progress-title {
    font-size: 28px;
    font-weight: normal;
    color: #293133;
}

/* === Сообщение о статусе === */
.drum-progress-message {
    font-size: 18px;
    color: #555;
    margin-bottom: 25px;
    min-height: 24px;
    text-align: center;
}

/* === Трек прогресс-бара === */
.drum-progress-bar-track {
    width: 100%;
    height: 60px;
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid gray;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
}

/* === Заполнение прогресс-бара === */
.drum-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(
        90deg,
        rgba(144, 238, 144, 0.635) 0%,
        rgba(111, 214, 111, 0.8) 50%,
        rgba(144, 238, 144, 0.635) 100%
    );
    background-size: 200% 100%;
    border-radius: 8px;
    transition: width 0.3s ease;
    position: relative;
    animation: progressShine 2s linear infinite;
}

@keyframes progressShine {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* === Нижняя часть === */
.drum-progress-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 5px;
}

.drum-progress-percent {
    font-size: 22px;
    font-weight: bold;
    color: #293133;
    min-width: 60px;
}

.drum-progress-hint {
    font-size: 14px;
    color: #888;
    font-style: italic;
}

/* === Мобильная адаптация === */
@media (max-width: 600px) {
    .drum-progress-content {
        padding: 30px 25px;
        max-width: 95%;
    }
    
    .drum-progress-title {
        font-size: 22px;
    }
    
    .drum-progress-message {
        font-size: 16px;
    }
    
    .drum-progress-icon {
        font-size: 32px;
    }
    
    .drum-progress-bar-track {
        height: 18px;
    }
}

/* =========================================================
   💡 ПАНЕЛЬ ИНСТРУКЦИИ (Help Panel) для модалки генерации
   ========================================================= */

/* Строка заголовка: title + кнопка ? */
.simplify-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-right: 40px; /* чтобы не налезало на кнопку закрытия */
}

/* Круглая кнопка со знаком вопроса */
.simplify-help-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid gray;
    background: whitesmoke;
    color: #555;
    font-size: 18px;
    font-weight: bold;
    font-family: Arial, Helvetica, sans-serif;
    cursor: pointer;
    transition: 0.3s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    touch-action: pan-x pan-y;
}

.simplify-help-btn:hover {
    background: rgba(144, 238, 144, 0.635);
    color: #000;
    box-shadow: 0 0 10px #d35d57c9;
    border-color: gray;
}

.simplify-help-btn.active {
    background: rgba(144, 238, 144, 0.635);
    color: #000;
    transform: rotate(180deg);
}

/* Панель-раскладушка */
.simplify-help-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
}

.simplify-help-panel.open {
    max-height: 800px; /* с запасом, контент сам растянет */
    margin-bottom: 12px;
    overflow-y: auto;
}

/* Содержимое инструкции */
.simplify-help-content {
    background: rgba(144, 238, 144, 0.1);
    border: 1px solid rgba(144, 238, 144, 0.5);
    border-radius: 8px;
    padding: 18px 22px;
    font-size: 15px;
    line-height: 1.55;
    color: #333;
    font-family: Arial, Helvetica, sans-serif;
}

.simplify-help-content h4 {
    margin: 14px 0 6px 0;
    color: #293133;
    font-size: 17px;
    font-weight: 600;
}

.simplify-help-content h4:first-child {
    margin-top: 0;
}

.simplify-help-content p {
    margin: 6px 0;
}

.simplify-help-content ul {
    margin: 6px 0 10px 0;
    padding-left: 22px;
}

.simplify-help-content li {
    margin: 4px 0;
}

.simplify-help-content code {
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    color: #d35d57;
}

.simplify-help-content strong {
    color: #000;
    font-weight: 600;
}

/* Мобильная адаптация */
@media (max-width: 600px) {
    .simplify-help-content {
        font-size: 14px;
        padding: 14px 16px;
    }
    .simplify-help-content h4 {
        font-size: 15px;
    }
    .simplify-help-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
}