/* ============================================= */
/*          СТИЛИ СТРАНИЦЫ "ТОНГЕНЕРАТОР"        */
/* ============================================= */

/* --- Общие стили страницы --- */
main.tone-generator-page {
    padding-top: 70px;
    padding-bottom: 40px;
    display: flex;
    align-items: center;
    min-height: calc(100vh - 70px);
}
.page-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}
.page-title-section {
    text-align: center;
    margin-bottom: 30px;
}
.page-title-section h1 { font-size: 2.8rem; font-weight: 700; }
.page-title-section p { font-size: 1.1rem; color: #6c757d; }

/* --- Обертка генератора --- */
.generator-wrapper {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* --- Визуализатор --- */
.visualizer-container {
    background-color: #f8f9fa;
    padding: 20px;
}
#visualizer {
    width: 100%;
    height: 150px;
    display: block;
}

/* --- Панель управления --- */
.controls-panel {
    padding: 30px;
    display: grid;
    gap: 25px;
}
.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.control-group label {
    font-weight: 600;
    font-size: 1rem;
}

/* --- Слайдеры --- */
.slider-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}
.slider-wrapper i {
    color: #6c757d;
}
input[type="range"] {
    flex-grow: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e9ecef;
    border-radius: 5px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #0d6efd;
    border-radius: 50%;
    cursor: pointer;
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #0d6efd;
    border-radius: 50%;
    cursor: pointer;
}
#frequency-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    text-align: center;
}

/* --- Выбор формы волны --- */
.wave-type-selector {
    display: flex;
    gap: 10px;
}
.wave-btn {
    flex: 1;
    padding: 10px;
    font-size: 1.2rem;
    border: 1px solid #ced4da;
    background-color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.wave-btn:hover {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}
.wave-btn.active {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* --- Кнопки Play/Stop --- */
.playback-controls {
    margin-top: 10px;
}
.play-btn {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background-color: #28a745;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.2s;
}
.play-btn.playing {
    background-color: #dc3545;
}
.play-btn:hover {
    background-color: #218838;
}
.play-btn.playing:hover {
    background-color: #c82333;
}

/* ============================================= */
/*          АДАПТАЦИЯ ДЛЯ ТЕМНОЙ ТЕМЫ            */
/* ============================================= */
.dark-theme .page-title-section p { color: #a0a0a0; }
.dark-theme .generator-wrapper {
    background-color: #2c2c2e;
    border-color: #444;
}
.dark-theme .visualizer-container { background-color: #1c1c1e; }
.dark-theme .control-group label { color: #f2f2f7; }
.dark-theme .slider-wrapper i, .dark-theme #frequency-input + span { color: #a0a0a0; }
.dark-theme input[type="range"] { background: #1c1c1e; }
.dark-theme input[type="range"]::-webkit-slider-thumb { background: #58a6ff; }
.dark-theme input[type="range"]::-moz-range-thumb { background: #58a6ff; }
.dark-theme #frequency-input {
    background-color: #1c1c1e;
    border-color: #555;
    color: #fff;
}
.dark-theme .wave-btn {
    background-color: #3a3a3c;
    border-color: #555;
    color: #f2f2f7;
}
.dark-theme .wave-btn.active {
    background-color: #58a6ff;
    border-color: #58a6ff;
    color: #fff;
}