/* Ambience Page - Standalone styling (ignores theme system) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.ambience-page {
    font-family: 'Courier New', monospace;
    background: #0a0a0f;
    color: #c4d4e0;
    min-height: 100vh;
    overflow: hidden;
}

/* Full-screen canvas */
#ambienceCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ==================== SELECTOR SCREEN ==================== */

.ambience-selector {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    background: rgba(10, 10, 15, 0.95);
}

.selector-title {
    font-size: 48px;
    font-weight: normal;
    color: #7b9eb8;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 8px;
}

.selector-subtitle {
    font-size: 16px;
    color: #5a6a7a;
    margin-bottom: 50px;
}

.ambience-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    max-width: 900px;
    width: 100%;
}

.ambience-option {
    background: rgba(30, 35, 45, 0.8);
    border: 2px solid #3a4a58;
    border-radius: 12px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #c4d4e0;
    font-family: inherit;
}

.ambience-option:hover {
    border-color: #7b9eb8;
    background: rgba(40, 50, 65, 0.9);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.option-icon {
    margin-bottom: 15px;
}

.option-icon pre {
    font-size: 12px;
    line-height: 1.2;
    color: #7b9eb8;
    margin: 0;
}

.option-label {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #e0f0ff;
}

.option-desc {
    font-size: 13px;
    color: #6a7a8a;
}

.back-link {
    margin-top: 50px;
    color: #5a6a7a;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #7b9eb8;
}

/* ==================== PLAYER SCREEN ==================== */

.ambience-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.ambience-player.active {
    display: flex;
}

.ambience-player > * {
    pointer-events: auto;
}

/* Play/Pause Button */
.play-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(30, 40, 55, 0.7);
    border: 3px solid rgba(123, 158, 184, 0.5);
    color: #c4d4e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.play-btn:hover {
    background: rgba(40, 55, 75, 0.8);
    border-color: #7b9eb8;
    transform: scale(1.05);
}

.play-btn svg {
    width: 50px;
    height: 50px;
}

.play-btn .play-icon {
    margin-left: 8px;
}

/* Pulsing ring animation */
.pulse-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(123, 158, 184, 0.3);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
}

.pulse-ring.active {
    animation: pulse 3s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

/* Ambience Label */
.ambience-label {
    margin-top: 30px;
    font-size: 24px;
    color: #7b9eb8;
    text-transform: uppercase;
    letter-spacing: 4px;
}

/* Volume Control */
.volume-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 40px;
    padding: 15px 25px;
    background: rgba(20, 25, 35, 0.7);
    border-radius: 30px;
    border: 1px solid rgba(60, 70, 85, 0.5);
}

.volume-icon {
    width: 20px;
    height: 20px;
    color: #6a7a8a;
    flex-shrink: 0;
}

.volume-slider {
    width: 150px;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(60, 70, 85, 0.8);
    border-radius: 3px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #7b9eb8;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    background: #9bb8d0;
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #7b9eb8;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Player Controls */
.player-controls {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.control-btn {
    padding: 12px 25px;
    background: rgba(30, 40, 55, 0.6);
    border: 1px solid #3a4a58;
    border-radius: 8px;
    color: #8a9bab;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: rgba(40, 55, 75, 0.8);
    border-color: #7b9eb8;
    color: #c4d4e0;
}

/* ==================== AMBIENCE-SPECIFIC THEMES ==================== */

/* Rain Theme */
body.ambience-rain {
    background: linear-gradient(to bottom, #0d1015, #151820, #1a1e24);
}

body.ambience-rain .play-btn {
    border-color: rgba(100, 140, 180, 0.5);
}

body.ambience-rain .pulse-ring {
    border-color: rgba(100, 140, 180, 0.3);
}

body.ambience-rain .ambience-label {
    color: #9bb8d0;
}

/* Space Theme */
body.ambience-space {
    background: linear-gradient(to bottom, #0a0510, #0d0820, #050510);
}

body.ambience-space .play-btn {
    border-color: rgba(150, 100, 200, 0.5);
}

body.ambience-space .pulse-ring {
    border-color: rgba(150, 100, 200, 0.3);
}

body.ambience-space .ambience-label {
    color: #b090d0;
}

/* Forest Theme */
body.ambience-forest {
    background: linear-gradient(to bottom, #0a100a, #101810, #0a140a);
}

body.ambience-forest .play-btn {
    border-color: rgba(100, 180, 100, 0.5);
}

body.ambience-forest .pulse-ring {
    border-color: rgba(100, 180, 100, 0.3);
}

body.ambience-forest .ambience-label {
    color: #90c090;
}

/* Ocean Theme */
body.ambience-ocean {
    background: linear-gradient(to bottom, #0a1520, #0d1825, #051015);
}

body.ambience-ocean .play-btn {
    border-color: rgba(80, 160, 200, 0.5);
}

body.ambience-ocean .pulse-ring {
    border-color: rgba(80, 160, 200, 0.3);
}

body.ambience-ocean .ambience-label {
    color: #70b0d0;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 600px) {
    .selector-title {
        font-size: 32px;
        letter-spacing: 4px;
    }

    .ambience-options {
        grid-template-columns: 1fr;
    }

    .play-btn {
        width: 100px;
        height: 100px;
    }

    .play-btn svg {
        width: 40px;
        height: 40px;
    }

    .pulse-ring {
        width: 100px;
        height: 100px;
    }

    .ambience-label {
        font-size: 18px;
    }

    .volume-slider {
        width: 100px;
    }

    .player-controls {
        flex-direction: column;
        gap: 10px;
    }
}
