/* ============================================================================
   Shared audio-controls panel — used by addition? no; subtraction, multiplication, division.
   Each page sets its own accent via CSS variables on :root:
       --audio-accent       primary accent (e.g. #3498db)
       --audio-accent-dark  darker accent for gradients (e.g. #2980b9)
       --audio-accent-rgb   the accent as "r, g, b" for rgba() shadows (e.g. 52, 152, 219)
   The panel itself is a light treatment (white panel, grey mute button); only the
   accent changes per operation. Extracted 2026-06-02 from 3 near-identical inline copies.
   ============================================================================ */

.audio-controls-toggle {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 1001;
    background: linear-gradient(135deg, var(--audio-accent) 0%, var(--audio-accent-dark) 100%);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 4px 15px rgba(var(--audio-accent-rgb), 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.audio-controls-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(var(--audio-accent-rgb), 0.6);
}
.audio-controls-toggle.muted {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.audio-controls-panel {
    position: fixed;
    top: 65px;
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 250px;
    display: none;
    animation: slideIn 0.3s ease;
}
.audio-controls-panel.show { display: block; }
@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.audio-controls-panel h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.volume-control { margin-bottom: 15px; }
.volume-control label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
    font-weight: 600;
}
.volume-control label .icon { font-size: 1.2rem; }
.volume-slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}
.volume-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, var(--audio-accent) 0%, var(--audio-accent) var(--value), #e0e0e0 var(--value), #e0e0e0 100%);
    outline: none;
}
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--audio-accent) 0%, var(--audio-accent-dark) 100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.volume-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--audio-accent) 0%, var(--audio-accent-dark) 100%);
    cursor: pointer;
    border: none;
}
.volume-value {
    min-width: 40px;
    text-align: right;
    font-weight: bold;
    color: var(--audio-accent);
    font-size: 0.9rem;
}

.audio-btn-row { display: flex; gap: 10px; margin-top: 15px; }
.audio-btn {
    flex: 1;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.audio-btn.mute-btn { background: #f0f0f0; color: #555; }
.audio-btn.mute-btn:hover { background: #e0e0e0; }
.audio-btn.mute-btn.active { background: #e74c3c; color: white; }
.audio-btn.music-btn {
    background: linear-gradient(135deg, var(--audio-accent) 0%, var(--audio-accent-dark) 100%);
    color: white;
}
.audio-btn.music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--audio-accent-rgb), 0.4);
}
.audio-btn.music-btn.playing {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}
