*, *::before, *::after { 
    box-sizing: border-box; 
}

body { 
    background: #020617; 
    color: #fff; 
    font-family: 'Inter', sans-serif; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    min-height: 100vh; 
    margin: 0; 
    text-align: center; 
    overflow: hidden; 
    user-select: none; 
    cursor: none; 
}

.back-home { 
    position: fixed; 
    top: 20px; 
    left: 24px; 
    font-size: 0.85rem; 
    color: #475569; 
    text-decoration: none; 
    transition: color 0.2s; 
    z-index: 10; 
    cursor: auto; 
}

.back-home:hover { 
    color: #fff; 
}

/* Lava Floor */
.lava {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0;
    height: 80px;
    background: linear-gradient(to top, #dc2626, #f97316);
    z-index: 2;
    transition: height 0.3s ease;
}

.lava::before {
    content: '';
    position: absolute; 
    top: -20px; 
    left: 0; 
    right: 0; 
    height: 24px;
    background: radial-gradient(ellipse 60px 20px at 10% 100%, #f97316 40%, transparent 70%),
                radial-gradient(ellipse 60px 20px at 35% 100%, #ef4444 40%, transparent 70%),
                radial-gradient(ellipse 60px 20px at 60% 100%, #f97316 40%, transparent 70%),
                radial-gradient(ellipse 60px 20px at 85% 100%, #ef4444 40%, transparent 70%);
    animation: lavaBubble 1.5s ease-in-out infinite alternate;
}

@keyframes lavaBubble { 
    0%   { transform: scaleY(1); } 
    100% { transform: scaleY(1.3); } 
}

/* Custom Cursor */
.cursor {
    position: fixed; 
    width: 28px; 
    height: 28px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 20;
    transform: translate(-50%, -50%);
    transition: background 0.2s;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.cursor.danger { 
    background: #fbbf24; 
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.5); 
}

/* Main UI Layout */
.container { 
    position: relative; 
    z-index: 3; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 40px 24px; 
    max-width: 580px; 
    width: 100%; 
    pointer-events: none; 
}

h1 { 
    font-family: 'Syne', sans-serif; 
    font-size: clamp(2rem, 8vw, 3rem); 
    font-weight: 900; 
    margin: 0 0 6px; 
    letter-spacing: -2px; 
}

.subtitle { 
    font-size: 0.95rem; 
    color: #64748b; 
    margin-bottom: 36px; 
}

.timer-big {
    font-family: 'Syne', sans-serif;
    font-size: clamp(5rem, 18vw, 8rem);
    font-weight: 900; 
    line-height: 1; 
    letter-spacing: -4px;
    color: #f8fafc; 
    margin-bottom: 6px;
    transition: color 0.3s;
}

.timer-big.danger { 
    color: #fbbf24; 
}

.timer-unit { 
    font-size: 0.8rem; 
    color: #475569; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    margin-bottom: 32px; 
}

.info-box {
    background: rgba(15, 23, 42, 0.7); 
    border: 1px solid rgba(51, 65, 85, 0.6);
    border-radius: 16px; 
    padding: 18px 24px;
    backdrop-filter: blur(14px); 
    width: 100%;
}

.info-row { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 0.9rem; 
    padding: 6px 0; 
    border-bottom: 1px solid rgba(51, 65, 85, 0.3); 
}

.info-row:last-child { 
    border-bottom: none; 
}

.info-label { 
    color: #64748b; 
}

.info-val { 
    font-family: 'Syne', sans-serif; 
    font-weight: 700; 
    color: #60a5fa; 
}

.start-hint { 
    font-size: 1rem; 
    color: #64748b; 
    margin-top: 24px; 
}

/* Lava Warning Banner */
.rising-warn {
    position: fixed; 
    bottom: 90px; 
    left: 50%; 
    transform: translateX(-50%);
    font-family: 'Syne', sans-serif; 
    font-size: 1rem; 
    font-weight: 700;
    color: #f97316; 
    z-index: 5; 
    opacity: 0;
    transition: opacity 0.3s; 
    pointer-events: none;
    white-space: nowrap;
}

.rising-warn.show { 
    opacity: 1; 
}

/* Game Over Overlay */
.gameover { 
    position: fixed; 
    inset: 0; 
    background: rgba(2, 6, 23, 0.92); 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    z-index: 50; 
    opacity: 0; 
    pointer-events: none; 
    transition: opacity 0.4s; 
    backdrop-filter: blur(8px); 
}

.gameover.show { 
    opacity: 1; 
    pointer-events: all; 
    cursor: auto; 
}

.go-emoji { 
    font-size: 4rem; 
    margin-bottom: 12px; 
}

.go-title { 
    font-family: 'Syne', sans-serif; 
    font-size: clamp(1.8rem, 7vw, 2.8rem); 
    font-weight: 900; 
    margin: 0 0 8px; 
    color: #f97316; 
}

.go-sub { 
    color: #64748b; 
    font-size: 1rem; 
    margin-bottom: 28px; 
}

.go-sub span { 
    color: #60a5fa; 
    font-weight: 700; 
}

.go-btn { 
    padding: 13px 36px; 
    background: rgba(239, 68, 68, 0.25); 
    border: 1.5px solid rgba(239, 68, 68, 0.5); 
    border-radius: 999px; 
    color: #fff; 
    font-family: 'Syne', sans-serif; 
    font-size: 1rem; 
    font-weight: 700; 
    cursor: pointer; 
    transition: background 0.2s; 
}

.go-btn:hover { 
    background: rgba(239, 68, 68, 0.4); 
}
