/* ============================================
   STEVE LE BEBE - STYLE.CSS
   ============================================ */

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

body {
    background: #0a0a12;
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    user-select: none;
}

#gameContainer {
    position: relative;
    width: 100vw;
    height: 100vh;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    position: absolute;
    z-index: 1;
}

/* ============================================
   HUD
   ============================================ */
#hud {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    z-index: 10;
    min-width: 340px;
    text-align: center;
}

.gauge-container {
    width: 300px;
    height: 34px;
    border-radius: 17px;
    overflow: hidden;
    position: relative;
    margin: 4px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.75);
    border: 2px solid #4CAF50;
    transition: border-color 0.4s;
}

#survivalGauge {
    border-color: #ff0055;
    animation: survivalPulse 0.9s infinite;
    display: none;
}

.gauge-fill {
    position: absolute;
    left: 0; top: 0;
    height: 100%;
    width: 100%;
    border-radius: 14px;
    transition: width 0.25s, background 0.4s;
    background: linear-gradient(90deg, #2e7d32, #66bb6a, #cddc39);
}

#survivalFill {
    background: linear-gradient(90deg, #880033, #ff0055);
}

.gauge-label {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.95);
    white-space: nowrap;
    letter-spacing: 1px;
    z-index: 2;
    pointer-events: none;
}

.score-display {
    color: #ffd700;
    font-size: 15px;
    font-weight: bold;
    margin-top: 6px;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.9);
    letter-spacing: 1px;
}

@keyframes survivalPulse {
    0%, 100% { border-color: #ff0055; box-shadow: 0 0 10px rgba(255,0,85,0.5); }
    50%       { border-color: #ff6699; box-shadow: 0 0 20px rgba(255,0,85,0.8); }
}

/* ============================================
   Screens
   ============================================ */
.screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 20;
    background: linear-gradient(180deg, #0d1020 0%, #080a14 100%);
}

.screen h1 {
    color: #ffd700;
    font-size: 48px;
    margin-bottom: 6px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(255,215,0,0.5), 2px 2px 4px rgba(0,0,0,0.8);
}

.screen h2 {
    color: #ff6600;
    font-size: 20px;
    margin-bottom: 28px;
    font-weight: 400;
    letter-spacing: 1px;
}

.instructions {
    color: #aab0c8;
    font-size: 14px;
    line-height: 2;
    text-align: center;
    margin-bottom: 8px;
    border: 1px solid rgba(255,215,0,0.15);
    padding: 14px 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.03);
}

.menuBtn {
    padding: 14px 52px;
    font-size: 20px;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    border: 2px solid #ffd700;
    background: rgba(255,215,0,0.1);
    color: #ffd700;
    cursor: pointer;
    margin-top: 24px;
    border-radius: 6px;
    transition: all 0.25s;
    letter-spacing: 3px;
}

.menuBtn:hover {
    background: rgba(255,215,0,0.28);
    transform: scale(1.06);
    box-shadow: 0 0 18px rgba(255,215,0,0.3);
}

/* ============================================
   Game Over Screen
   ============================================ */
#startScreen    { display: none; }
#gameOverScreen { background: rgba(6,0,0,0.97); display: none; }
#winScreen      { background: rgba(0,6,0,0.97); display: none; }
#win2Screen     { background: rgba(0,4,10,0.97); display: none; }

#gameOverScreen h1 {
    color: #ff0055;
    font-size: 52px;
    margin-bottom: 24px;
    text-shadow: 0 0 20px rgba(255,0,85,0.6);
    letter-spacing: 3px;
}

.score-value   { color: #ffd700; font-size: 26px; font-weight: bold; margin: 8px 0; }
.beers-value   { color: #ff8c00; font-size: 20px; margin: 6px 0; }
.time-value    { color: #8899aa; font-size: 16px; margin: 6px 0; }
.win-subtitle  { color: #90e870; font-size: 18px; margin: 4px 0 18px; letter-spacing: 1px; }

#winScreen h1 {
    color: #ffd700;
    font-size: 52px;
    margin-bottom: 8px;
    text-shadow: 0 0 24px rgba(255,215,0,0.7), 2px 2px 4px rgba(0,0,0,0.8);
    letter-spacing: 3px;
}

/* ============================================
   Mobile Controls
   ============================================ */
#mobileControls {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    display: none;
    z-index: 15;
    gap: 18px;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.mobile-btn {
    width: 64px;
    height: 64px;
    background: rgba(0,0,0,0.35);
    border: 2px solid rgba(255,215,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: #ffd700;
    user-select: none;
    touch-action: none;
    transition: background 0.1s;
}

.mobile-btn:active {
    background: rgba(255,215,0,0.45);
}

@media (pointer: coarse) {
    #mobileControls { display: flex; }

    #hud {
        top: 6px;
        min-width: 260px;
    }

    .gauge-container { width: 220px; height: 26px; }
    .gauge-label     { font-size: 9px; }
    .score-display   { font-size: 12px; }

    .screen h1  { font-size: 30px; }
    .screen h2  { font-size: 14px; }
    .instructions { font-size: 12px; padding: 10px 16px; }
    .menuBtn    { font-size: 15px; padding: 12px 28px; letter-spacing: 1px; }
}
