/* MAXSOUND Simulator - EXACT match to real app (from MainWindow.cpp) */

/* ===== SIMULATOR SECTION ===== */
.simulator-section {
    padding: 4rem 2rem;
    background: #0a0a0a;
}

.simulator-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: #fff;
}

.section-subtitle {
    text-align: center;
    color: #707070;
    margin-bottom: 2rem;
}

.simulator-container {
    max-width: 360px;
    margin: 0 auto;
}

.simulator {
    background: #0a0a0a;
    border-radius: 20px;
    padding: 1.5rem 2rem 2rem;
    border: 1px solid #1a1a1a;
}

.simple-view {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== MAXSOUND TITLE ===== */
/* 3D embossed gold metallic - matches real app */
.app-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.4em;
    margin-bottom: 1.5rem;
    /* Muted gold with emboss effect */
    background: linear-gradient(180deg,
        #7a6b52 0%,
        #5a4d3a 30%,
        #4a4030 50%,
        #5a4d3a 70%,
        #6a5b45 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 0 rgba(100, 90, 70, 0.3);
}

/* ===== SPEAKER ASSEMBLY ===== */
.speaker-assembly {
    position: relative;
    width: 260px;
    height: 260px;
    margin-bottom: 1.5rem;
}

/* Outer chrome/metal frame - MainWindow.cpp lines 469-497 */
.speaker-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    /* Chrome frame gradient - top-to-bottom as in JUCE */
    background: linear-gradient(180deg,
        #606060 0%,
        #505050 15%,
        #3a3a3a 30%,
        #252525 50%,
        #1a1a1a 70%,
        #101010 100%
    );
    box-shadow:
        /* Drop shadow behind frame */
        0 8px 30px rgba(0, 0, 0, 0.8),
        /* Top highlight */
        inset 0 1px 0 rgba(128, 128, 128, 0.3),
        /* Bottom dark edge */
        inset 0 -2px 0 rgba(0, 0, 0, 0.5);
}

/* Rubber surround ring - MainWindow.cpp lines 499-522 */
.speaker-surround {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(100% - 12px);
    height: calc(100% - 12px);
    border-radius: 50%;
    background: linear-gradient(180deg,
        #282828 0%,
        #222222 40%,
        #1e1e1e 60%,
        #181818 100%
    );
    box-shadow:
        /* Inner shadow for depth */
        inset 0 4px 10px rgba(0, 0, 0, 0.6),
        /* Highlight on inner edge */
        inset 0 1px 0 rgba(58, 58, 58, 0.5);
}

/* Paper cone - MainWindow.cpp lines 524-558 */
.speaker-cone {
    position: absolute;
    top: 16px;
    left: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    border-radius: 50%;
    /* Radial gradient - lighter center, darker edge */
    background: radial-gradient(circle at 50% 50%,
        #2a2a2a 0%,
        #252525 30%,
        #1a1a1a 60%,
        #121212 85%,
        #0e0e0e 100%
    );
    box-shadow:
        inset 0 4px 20px rgba(0, 0, 0, 0.7),
        inset 0 -2px 10px rgba(40, 40, 40, 0.2);
}

/* Cone texture - subtle radial lines like paper cone */
.speaker-cone::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: repeating-conic-gradient(
        from 0deg,
        transparent 0deg,
        transparent 14deg,
        rgba(255, 255, 255, 0.015) 14.5deg,
        transparent 15deg
    );
    pointer-events: none;
}

/* Inner edge highlight where cone meets button */
.speaker-cone::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 1px solid rgba(58, 58, 58, 0.5);
    pointer-events: none;
}

/* Subtle accent ring - gold/amber hint */
.speaker-accent-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(180, 150, 80, 0.15);
    box-shadow: 0 0 10px rgba(180, 150, 80, 0.08);
    pointer-events: none;
}

/* ===== POWER BUTTON ===== */
/* Brushed metal button - MainWindow.cpp lines 1031-1107 */
.power-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 10;

    /* Main metal surface gradient - top to bottom */
    background: linear-gradient(180deg,
        #383838 0%,
        #444444 15%,
        #303030 40%,
        #222222 70%,
        #181818 100%
    );

    box-shadow:
        /* Deep shadow */
        0 6px 25px rgba(0, 0, 0, 0.9),
        /* Outer bezel - dark ring */
        0 0 0 5px #2a2a2a,
        /* Bezel gradient simulation */
        0 0 0 6px #1a1a1a,
        /* Top highlight on bezel */
        inset 0 2px 1px rgba(96, 96, 96, 0.3),
        /* Bottom shadow on button */
        inset 0 -3px 6px rgba(0, 0, 0, 0.5);
}

/* Brushed metal texture rings - MainWindow.cpp lines 1067-1075 */
.power-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background:
        /* Concentric rings for brushed metal effect */
        repeating-radial-gradient(
            circle at center,
            transparent 0px,
            transparent 6px,
            rgba(255, 255, 255, 0.015) 6.5px,
            transparent 7px,
            transparent 10px,
            rgba(255, 255, 255, 0.02) 10.5px,
            transparent 11px
        );
    pointer-events: none;
}

/* Inner recess - MainWindow.cpp lines 1077-1087 */
.power-button::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border-radius: 50%;
    /* Inner gradient - slightly raised center */
    background: radial-gradient(circle at 50% 30%,
        #323232 0%,
        #2a2a2a 30%,
        #161616 100%
    );
    /* Dark edge ring */
    box-shadow:
        inset 0 3px 10px rgba(0, 0, 0, 0.7),
        0 0 0 1.5px #0e0e0e;
    pointer-events: none;
}

/* Power icon - green glow when active */
.power-button svg {
    position: relative;
    z-index: 2;
    width: 42px;
    height: 42px;
    color: #00ff44;
    filter:
        drop-shadow(0 0 4px rgba(0, 255, 68, 0.5))
        drop-shadow(0 0 8px rgba(0, 255, 68, 0.4))
        drop-shadow(0 0 12px rgba(0, 255, 68, 0.3));
    transition: color 0.2s, filter 0.2s;
}

/* Power OFF state - dark grey icon, no glow */
.simulator:not(.active) .power-button svg {
    color: #333333;
    filter: none;
}

/* ===== ANIMATION RINGS ===== */
.animation-rings {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.simulator.playing .animation-rings {
    opacity: 1;
}

/* Red pulsing rings - MainWindow.cpp lines 711-751 */
.anim-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(255, 0, 0, 0.7);
    opacity: 0;
    pointer-events: none;
}

.simulator.playing .anim-ring {
    animation: ringPulse 1.5s ease-out infinite;
}

.anim-ring:nth-child(1) { animation-delay: 0s; }
.anim-ring:nth-child(2) { animation-delay: 0.3s; }
.anim-ring:nth-child(3) { animation-delay: 0.6s; }
.anim-ring:nth-child(4) { animation-delay: 0.9s; }
.anim-ring:nth-child(5) { animation-delay: 1.2s; }

@keyframes ringPulse {
    0% {
        width: 120px;
        height: 120px;
        opacity: 0.8;
        border-width: 4px;
        border-color: rgba(255, 0, 0, 0.8);
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
        border-width: 1px;
        border-color: rgba(255, 0, 0, 0);
    }
}

/* Green glow effect container - added dynamically */
.green-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle,
        rgba(0, 255, 80, 0.5) 0%,
        rgba(0, 200, 60, 0.2) 25%,
        rgba(0, 100, 30, 0.05) 50%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.1s;
}

/* Dynamic bass ring - created by JS */
.dynamic-ring {
    pointer-events: none;
}

/* Electric spark - created by JS */
.electric-spark {
    position: absolute;
    pointer-events: none;
    stroke: #78b4ff;
    stroke-width: 1.5;
    fill: none;
    filter: drop-shadow(0 0 3px rgba(120, 180, 255, 0.8));
}

/* ===== BLEND SLIDER ===== */
.blend-control {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    margin-bottom: 0.5rem;
}

.blend-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.blend-label-original {
    color: #6a6a6a;
    min-width: 55px;
    text-align: right;
}

.blend-label-max {
    color: #c9a030;
    min-width: 35px;
    text-align: left;
}

.blend-track {
    flex: 1;
    position: relative;
}

.blend-slider {
    width: 100%;
    height: 14px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg,
        #1a1a1a 0%,
        #2a2515 20%,
        #4a4020 40%,
        #6a5a28 60%,
        #8a7830 80%,
        #a89038 100%
    );
    border-radius: 7px;
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.blend-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(160deg,
        #d4c060 0%,
        #c9a030 40%,
        #a08020 70%,
        #806015 100%
    );
    cursor: pointer;
    box-shadow:
        0 3px 8px rgba(0, 0, 0, 0.5),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    border: none;
}

.blend-slider::-moz-range-thumb {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(160deg,
        #d4c060 0%,
        #c9a030 40%,
        #a08020 70%,
        #806015 100%
    );
    cursor: pointer;
    border: none;
}

/* ===== STATUS TEXT ===== */
.status-text {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg,
        #c9a040 0%,
        #a08030 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ===== PLAYBACK CONTROLS ===== */
.playback-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    max-width: 300px;
    margin-bottom: 1.25rem;
}

.play-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #00ff50;
    border: none;
    color: #0a0a0a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s, box-shadow 0.15s;
}

.play-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 80, 0.5);
}

.play-button svg {
    width: 22px;
    height: 22px;
}

.play-button .hidden {
    display: none;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #1a1a1a;
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: #00ff50;
    transition: width 0.1s linear;
}

/* ===== ADVANCED BUTTON ===== */
.advanced-toggle,
.simple-toggle {
    width: 100%;
    max-width: 300px;
    background: #121212;
    border: 1px solid #2a2a2a;
    color: #707070;
    padding: 0.85rem 2rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
}

.advanced-toggle:hover,
.simple-toggle:hover {
    border-color: #c9a030;
    color: #c9a030;
}

/* ===== ADVANCED VIEW ===== */
.advanced-view {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.advanced-view.hidden {
    display: none;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.control-item {
    background: #0f0f0f;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid #1a1a1a;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.control-name {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: #707070;
}

.info-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: #c9a030;
    font-size: 0.55rem;
    font-weight: 700;
    cursor: pointer;
}

.control-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #2a2a2a;
    border-radius: 2px;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c9a030;
    cursor: not-allowed;
}

.control-slider:disabled {
    opacity: 0.5;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 400px) {
    .simulator-container {
        max-width: 320px;
    }

    .speaker-assembly {
        width: 220px;
        height: 220px;
    }

    .power-button {
        width: 100px;
        height: 100px;
    }

    .speaker-accent-ring {
        width: 115px;
        height: 115px;
    }

    .speaker-cone::after {
        width: 110px;
        height: 110px;
    }

    .app-title {
        font-size: 1.4rem;
        letter-spacing: 0.3em;
    }
}
