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

body {
    background: #0a0a1a;
    overflow: hidden;
    font-family: 'Press Start 2P', monospace;
    color: #fff;
}

#game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#scene-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#scene-container canvas {
    display: block;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 26, 0.95);
    z-index: 100;
    padding: 20px;
    text-align: center;
}

.hidden {
    display: none !important;
}

.title {
    font-size: clamp(1.5rem, 5vw, 3rem);
    color: #ff6b6b;
    text-shadow: 
        0 0 10px #ff6b6b,
        0 0 20px #ff6b6b,
        0 0 40px #ff0000,
        4px 4px 0 #000;
    margin-bottom: 30px;
    line-height: 1.4;
}

.wobble {
    animation: wobble 2s ease-in-out infinite;
}

@keyframes wobble {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

.pixel-art-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    align-items: center;
}

.start-car {
    width: 128px;
    height: 128px;
    image-rendering: pixelated;
    animation: bounce 1s ease-in-out infinite;
}

.start-beer {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    animation: bounce 1s ease-in-out infinite 0.5s;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.disclaimer {
    font-size: clamp(0.6rem, 2vw, 0.9rem);
    color: #ff4444;
    background: rgba(255, 0, 0, 0.2);
    padding: 15px 25px;
    border: 2px solid #ff4444;
    margin: 20px 0;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pixel-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: clamp(0.7rem, 2.5vw, 1rem);
    padding: 20px 40px;
    background: #44ff44;
    color: #000;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 
        4px 4px 0 #22aa22,
        8px 8px 0 #000;
    transition: all 0.1s;
    margin-top: 20px;
}

.pixel-btn:hover {
    background: #66ff66;
    transform: translate(-2px, -2px);
    box-shadow: 
        6px 6px 0 #22aa22,
        10px 10px 0 #000;
}

.pixel-btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

/* HUD */
#hud {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    pointer-events: none;
    z-index: 50;
}

#drunk-meter {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 3px solid #ff6b6b;
}

.meter-label {
    font-size: 0.6rem;
    margin-bottom: 5px;
    color: #ff6b6b;
}

.meter-container {
    width: 150px;
    height: 25px;
    background: #222;
    border: 2px solid #444;
    position: relative;
}

#meter-fill {
    height: 100%;
    width: 0%;
    background: #44ff44;
    transition: width 0.3s, background 0.3s;
}

#meter-status {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.5rem;
    text-shadow: 1px 1px 0 #000;
}

#stats {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 3px solid #44ff44;
    text-align: right;
}

#distance {
    font-size: 1.2rem;
    color: #44ff44;
    text-shadow: 0 0 10px #44ff44;
}

#crashes {
    font-size: 0.8rem;
    color: #ff6b6b;
    margin-top: 5px;
}

/* Game Over */
.gameover-title {
    font-size: clamp(2rem, 6vw, 4rem);
    color: #ff4444;
    text-shadow: 
        0 0 20px #ff0000,
        6px 6px 0 #000;
    margin-bottom: 30px;
}

#final-stats {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 30px;
    border: 3px solid #666;
    margin-bottom: 20px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    font-size: clamp(0.5rem, 2vw, 0.8rem);
    padding: 8px 0;
    border-bottom: 1px solid #333;
}

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

.rating {
    font-size: clamp(0.8rem, 3vw, 1.2rem);
    color: #ffaa00;
    text-shadow: 0 0 15px #ffaa00;
    margin: 20px 0;
    padding: 15px 25px;
    background: rgba(255, 170, 0, 0.1);
    border: 2px solid #ffaa00;
}

/* Mobile Controls */
#mobile-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    display: flex;
    z-index: 50;
    pointer-events: auto;
}

.control-zone {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.control-zone:active {
    background: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Press Start 2P', monospace;
    font-size: 0.5rem;
    color: #666;
    z-index: 200;
    text-align: center;
    white-space: nowrap;
}

footer a {
    color: #ff6b6b;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
    .meter-container {
        width: 100px;
    }
    
    #hud {
        padding: 10px;
    }
    
    footer {
        display: none;
    }
}

@media (max-height: 500px) {
    .pixel-art-container {
        display: none;
    }
    
    .title {
        margin-bottom: 10px;
    }
}