/* Extreme Game Container */
.extreme-game-section {
    position: relative;
    padding: 50px 0;
    background: black;
    border-top: 5px double var(--gold);
    text-align: center;
    overflow: hidden;
}

.luxury-title {
    color: var(--gold);
    font-size: 2.5rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 30px;
    text-shadow: 0 0 10px rgba(197, 160, 89, 0.8), 0 0 20px rgba(197, 160, 89, 0.4);
    background: linear-gradient(to right, transparent, rgba(197, 160, 89, 0.1), transparent);
}

#extreme-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    /* Standard Rhythm Game Width */
    height: 800px;
    margin: 0 auto;
    background: linear-gradient(to bottom, #050505, #1a1a1a);
    border: 3px solid var(--gold);
    border-radius: 10px;
    perspective: 1000px;
    display: flex;
    overflow: hidden;
    touch-action: none;
    /* Critical for mobile */
    touch-action: none;
    /* Critical for mobile */
}

/* FAKE FULLSCREEN MODE (For Mobile Reliability) */
#extreme-container.fullscreen-active {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    z-index: 99999;
    border: none;
    border-radius: 0;
    margin: 0;
    background: #000;
    /* Ensure black background */
}

/* Lanes */
.lane {
    flex: 1;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.lane:last-child {
    border-right: none;
}

/* Hit Zone (Bottom Button) */
.hit-zone {
    width: 100%;
    height: 120px;
    /* Tall hit zone for easy tapping */
    border-top: 2px solid rgba(255, 255, 255, 0.5);
    background: linear-gradient(to bottom, transparent, rgba(197, 160, 89, 0.2));
    position: absolute;
    bottom: 0;
    z-index: 10;
    pointer-events: none;
    /* Clicks handled by lane */
}

.lane:active .hit-zone,
.lane.active .hit-zone {
    background: linear-gradient(to bottom, transparent, rgba(197, 160, 89, 0.6));
    border-top: 2px solid white;
    box-shadow: 0 0 20px var(--gold);
}

/* Notes */
.note-extreme {
    position: absolute;
    width: 100%;
    /* Full lane width */
    height: 40px;
    background: linear-gradient(to right, #ff0055, #ff5500);
    box-shadow: 0 0 10px #ff0055;
    border-radius: 4px;
    z-index: 20;
    pointer-events: none;
    will-change: top;
}

/* BLUE GOD NOTE (TRAP) */
.note-extreme.blue {
    background: linear-gradient(to right, #00f3ff, #0066ff);
    box-shadow: 0 0 15px #00f3ff;
    border: 2px solid white;
}

/* Key Guide */
.key-guide {
    position: absolute;
    bottom: 10px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 1.2rem;
    font-weight: bold;
    pointer-events: none;
}

/* UI Elements */
#extreme-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

#extreme-start-screen,
#extreme-result {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    /* Force flex */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    z-index: 200;
    /* Higher than UI container */
    gap: 30px;
}

.neon-text {
    color: #fff;
    font-size: 2rem;
    text-shadow: 0 0 5px #fff, 0 0 10px #fff, 0 0 20px #ff00de, 0 0 30px #ff00de;
    animation: pulsate 1.5s infinite alternate;
}

.glitch-btn {
    padding: 20px 50px;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    background: transparent;
    border: 2px solid #00f3ff;
    box-shadow: 0 0 10px #00f3ff, inset 0 0 10px #00f3ff;
    text-shadow: 0 0 5px #00f3ff;
    cursor: pointer;
    transition: all 0.1s;
}

.glitch-btn:active {
    background: #00f3ff;
    color: black;
}

#extreme-hud {
    position: absolute;
    top: 20%;
    /* Move up from center */
    width: 100%;
    text-align: center;
    pointer-events: none;
}

.time-box {
    font-size: 2rem;
    color: var(--gold);
    text-shadow: 0 0 10px var(--gold);
    margin-top: 10px;
}

.combo-box {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    text-shadow: 0 0 20px cyan;
    transform: scale(1);
    transition: transform 0.1s;
}

.combo-box.pulse {
    transform: scale(1.3);
}

.combo-label {
    display: block;
    font-size: 1rem;
    letter-spacing: 5px;
    color: cyan;
}

#judgement-display {
    height: 50px;
    font-size: 2.5rem;
    font-weight: bold;
    margin-top: 10px;
    opacity: 0;
    transform: translateY(10px);
}

.judgement-perfect {
    color: #ffd700;
    /* Gold */
    text-shadow: 0 0 10px orange;
    animation: judge-pop 0.3s forwards;
}

.judgement-good {
    color: #00ff00;
    /* Green */
    text-shadow: 0 0 10px lime;
    animation: judge-pop 0.3s forwards;
}

.judgement-bad {
    color: #ff0000;
    /* Red */
    text-shadow: 0 0 10px darkred;
    animation: judge-pop 0.3s forwards;
}

@keyframes judge-pop {
    0% {
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translateY(-5px) scale(1.2);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px) scale(1.0);
    }
}

@keyframes pulsate {
    100% {
        text-shadow: 0 0 4px #fff, 0 0 11px #fff, 0 0 19px #fff, 0 0 40px #ff00de, 0 0 80px #ff00de;
    }
}

/* FINALE EVENT */
#extreme-finale-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 500;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

#god-img-1 {
    position: absolute;
    max-width: 80%;
    max-height: 50%;
    border: 5px solid var(--gold);
    box-shadow: 0 0 50px var(--gold);
    animation: fadeIn 0.5s forwards;
}

#god-img-2 {
    position: absolute;
    top: -100%;
    /* Start above */
    max-width: 90%;
    max-height: 70%;
    border: 10px solid white;
    box-shadow: 0 0 100px white;
    filter: drop-shadow(0 0 20px gold);
    z-index: 510;
}

.god-descend {
    animation: descendGod 3s forwards ease-out;
}

@keyframes descendGod {
    0% {
        top: -100%;
        opacity: 0;
        transform: scale(0.5);
    }

    100% {
        top: 15%;
        opacity: 1;
        transform: scale(1.0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}