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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.game-container {
    position: relative;
    width: 80vw;
    height: 80vh;
    background: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 30%, #E0FFFF 60%, #F0FFFF 100%);
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    border-radius: 15px;
}

/* Snow overlay effect */
.snow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 90px 40px, white, transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1px 1px at 160px 120px, white, transparent);
    background-size: 200px 200px;
    animation: snowfall 8s linear infinite;
    opacity: 0.6;
}

@keyframes snowfall {
    0% { background-position: 0 0; }
    100% { background-position: 100px 800px; }
}

/* Menu Screen */
.menu-screen, .game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, 
        rgba(135, 206, 235, 0.95) 0%, 
        rgba(176, 224, 230, 0.95) 50%, 
        rgba(240, 255, 255, 0.95) 100%);
    z-index: 10;
    padding: 20px;
    text-align: center;
}

.menu-screen h1 {
    font-size: 2.5rem;
    color: #1a5276;
    text-shadow: 3px 3px 0 #fff, 4px 4px 0 rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #2874a6;
    margin-bottom: 30px;
}

.instructions {
    background: rgba(255, 255, 255, 0.7);
    padding: 20px 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.instructions p {
    color: #1a5276;
    margin: 10px 0;
    font-size: 1rem;
}

.start-btn {
    background: linear-gradient(180deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    border: none;
    padding: 15px 50px;
    font-size: 1.3rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 0 #922b21, 0 8px 20px rgba(0,0,0,0.2);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 2px;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 #922b21, 0 12px 25px rgba(0,0,0,0.25);
}

.start-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 #922b21, 0 4px 10px rgba(0,0,0,0.2);
}

.back-link {
    margin-top: 25px;
    color: #1a5276;
    text-decoration: none;
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.back-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Game Screen */
.game-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.game-screen.active {
    display: block;
}

#gameCanvas {
    width: 100%;
    height: 100%;
    display: block;
    background: linear-gradient(180deg, #87CEEB 0%, #B0E0E6 50%, #E0FFFF 100%);
}

/* HUD */
.hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 50;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.score, .distance {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    color: #1a5276;
    font-size: 1rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.health-bar {
    width: 100px;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.5);
}

.health-fill {
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #27ae60, #2ecc71);
    transition: width 0.3s ease;
    border-radius: 8px;
}

.health-fill.warning {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.health-fill.danger {
    background: linear-gradient(90deg, #e74c3c, #c0392b);
}

/* Game Over Screen */
.game-over-screen {
    display: none;
}

.game-over-screen.active {
    display: flex;
}

.game-over-screen h2 {
    font-size: 2.5rem;
    color: #c0392b;
    text-shadow: 3px 3px 0 #fff;
    margin-bottom: 30px;
}

.final-stats {
    background: rgba(255, 255, 255, 0.8);
    padding: 25px 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.final-stats p {
    font-size: 1.2rem;
    color: #1a5276;
    margin: 12px 0;
}

.final-stats span {
    font-weight: bold;
    color: #e74c3c;
}

.hidden {
    display: none !important;
}

/* Mobile touch area indicator */
@media (max-width: 600px) {
    .menu-screen h1 {
        font-size: 2rem;
    }
    
    .instructions p {
        font-size: 0.9rem;
    }
    
    .start-btn {
        padding: 12px 40px;
        font-size: 1.1rem;
    }
}
