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

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #1a472a 0%, #0d2818 100%);
    color: #fff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.home-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(196, 30, 58, 0.9);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
    z-index: 1000;
    transition: all 0.3s;
}

.home-button:hover {
    background: rgba(160, 23, 41, 0.9);
    transform: scale(1.05);
}

.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.snowflake {
    position: absolute;
    top: -10%;
    color: #fff;
    font-size: 1.5em;
    opacity: 0.8;
    animation: fall linear infinite;
}

.snowflake:nth-child(1) { left: 15%; animation-duration: 10s; animation-delay: 0s; }
.snowflake:nth-child(2) { left: 30%; animation-duration: 12s; animation-delay: 2s; }
.snowflake:nth-child(3) { left: 45%; animation-duration: 9s; animation-delay: 4s; }
.snowflake:nth-child(4) { left: 60%; animation-duration: 11s; animation-delay: 1s; }
.snowflake:nth-child(5) { left: 75%; animation-duration: 13s; animation-delay: 3s; }
.snowflake:nth-child(6) { left: 90%; animation-duration: 10s; animation-delay: 5s; }

@keyframes fall {
    0% { top: -10%; opacity: 0.8; }
    100% { top: 110%; opacity: 0.3; }
}

.container {
    max-width: 700px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 20px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background: rgba(187, 173, 160, 0.5);
    padding: 10px 20px;
    border-radius: 8px;
    min-width: 80px;
}

.stat-label {
    font-size: 0.8em;
    text-transform: uppercase;
    color: #eee4da;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5em;
    font-weight: bold;
}

.button {
    background: #c41e3a;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1em;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.button:hover {
    background: #a01729;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#game-canvas {
    background: linear-gradient(180deg, #87ceeb 0%, #e0f6ff 100%);
    border-radius: 10px;
    display: block;
    cursor: crosshair;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.instructions-game {
    margin-top: 15px;
    font-size: 1.1em;
    color: #ddd;
}

.instructions {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 0.9em;
    line-height: 1.8;
}

.instructions p {
    margin-bottom: 10px;
}

.game-over {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.game-over-content {
    background: linear-gradient(135deg, #c41e3a 0%, #8b1528 100%);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s;
    max-width: 500px;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.game-over-content h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.game-over-content p {
    font-size: 1.3em;
    margin-bottom: 15px;
}

.final-score-display {
    font-size: 4em;
    font-weight: bold;
    margin: 20px 0;
    color: #ffd700;
}

#result-message {
    font-size: 1.5em;
    margin: 20px 0;
    font-style: italic;
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    h1 { font-size: 2em; }
    .stats { flex-wrap: wrap; }
    #game-canvas {
        width: 100% !important;
        height: auto !important;
    }
}
