/* ========================================
   Cyberpunk Sound Effects System
   Digital Audio Feedback for UI Interactions
   ======================================== */

/* ========== Sound Configuration ========== */
:root {
    --sound-enabled: 0; /* 0 = disabled, 1 = enabled */
    --sound-volume: 0.3; /* Default volume 30% */
}

/* ========== Web Audio API Integration ========== */
.cyber-sound-system {
    display: none; /* Hidden utility class */
}

/* ========== Sound Toggle Button ========== */
.sound-toggle {
    position: fixed;
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    clip-path: polygon(
        0 6px, 6px 0,
        calc(100% - 6px) 0, 100% 6px,
        100% calc(100% - 6px), calc(100% - 6px) 100%,
        6px 100%, 0 calc(100% - 6px)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-digital);
    z-index: 1000;
}

.sound-toggle:hover {
    border-color: var(--neon-green);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.sound-toggle.active {
    border-color: var(--neon-green);
    background: rgba(0, 255, 136, 0.1);
}

.sound-toggle i {
    color: var(--fg-muted);
    font-size: 1.25rem;
    transition: color var(--duration-fast) var(--ease-digital);
}

.sound-toggle.active i {
    color: var(--neon-green);
}

/* ========== Audio Visualizer (Optional) ========== */
.audio-visualizer {
    position: fixed;
    bottom: calc(var(--space-lg) + 56px);
    right: var(--space-lg);
    display: flex;
    gap: 2px;
    align-items: flex-end;
    height: 24px;
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-digital);
    pointer-events: none;
}

.audio-visualizer.active {
    opacity: 1;
}

.audio-bar {
    width: 3px;
    background: var(--neon-green);
    animation: audio-pulse 0.5s ease-in-out infinite alternate;
}

.audio-bar:nth-child(1) { height: 8px; animation-delay: 0s; }
.audio-bar:nth-child(2) { height: 12px; animation-delay: 0.1s; }
.audio-bar:nth-child(3) { height: 16px; animation-delay: 0.2s; }
.audio-bar:nth-child(4) { height: 10px; animation-delay: 0.3s; }
.audio-bar:nth-child(5) { height: 14px; animation-delay: 0.4s; }

@keyframes audio-pulse {
    0% { transform: scaleY(0.5); }
    100% { transform: scaleY(1); }
}

/* ========== Reduced Motion Support ========== */
@media (prefers-reduced-motion: reduce) {
    .audio-visualizer {
        display: none;
    }
    
    .audio-bar {
        animation: none;
    }
}
