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

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

#game-container {
    position: relative;
    width: 800px;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

#gameCanvas {
    display: block;
    background: linear-gradient(180deg, #0c1445 0%, #1a237e 40%, #283593 70%, #3949ab 100%);
}

#menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.95) 0%, rgba(22, 33, 62, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    color: white;
}

#menu h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 20px rgba(255, 0, 0, 0.5); }
    to { text-shadow: 0 0 30px rgba(255, 215, 0, 0.8); }
}

.subtitle {
    color: #aaa;
    margin-bottom: 20px;
}

#high-score {
    background: rgba(255, 215, 0, 0.2);
    padding: 10px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
    color: #ffd700;
}

#start-btn, #restart-btn {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 10px;
}

#start-btn:hover, #restart-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(198, 40, 40, 0.6);
}

.controls-info {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    text-align: center;
}

.controls-info p {
    margin: 5px 0;
    color: #ccc;
}

#game-ui {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
    color: white;
    font-size: 1.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

#game-ui > div {
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 15px;
    border-radius: 20px;
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    color: white;
    z-index: 20;
    border: 2px solid #c62828;
}

#game-over h2 {
    color: #ff5252;
    font-size: 2em;
    margin-bottom: 20px;
}

#game-over p {
    margin: 10px 0;
    font-size: 1.2em;
}

.hidden {
    display: none !important;
}

/* Snowflakes animation */
@keyframes fall {
    0% { transform: translateY(-10px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(410px) rotate(360deg); opacity: 0.3; }
}

/* Responsive */
@media (max-width: 850px) {
    #game-container {
        width: 100vw;
        height: 50vh;
        border-radius: 0;
    }

    #menu h1 {
        font-size: 1.8em;
    }
}
