
:root {
    --primary-color: #3498db;
    --secondary-color: #e74c3c;
    --background-color: #ecf0f1;
    --dark-chocolate: #5f2c10;
    --light-chocolate: #7a451a;
    --text-color: #333;
    --white-color: #fff;
}

body {
    font-family: 'Poppins', sans-serif;
    text-align: center;
    background-color: var(--background-color);
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
                      linear-gradient(-45deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%),
                      linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%),
                      linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.05) 75%);
    background-size: 20px 20px;
    margin: 0;
    touch-action: manipulation;
}

h1 {
    color: var(--primary-color);
    font-size: 3em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#game-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 80vh;
    border: 5px solid var(--primary-color);
    border-radius: 15px;
    margin: 20px auto;
    overflow: hidden;
    background: linear-gradient(to bottom, #bdc3c7, #2c3e50);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2), 0 6px 6px rgba(0,0,0,0.2);
}

#score {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2em;
    color: var(--white-color);
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

#game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--white-color);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#game-over h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: var(--secondary-color);
}

#restart-btn {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1.2em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

#restart-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.6);
    filter: brightness(1.1);
}

.hidden {
    display: none;
}

player-avatar {
    position: absolute;
    bottom: 10px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #4CAF50, #2E8B57);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(76, 175, 80, 0.7), 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.1s ease;
}

falling-chocolate {
    position: absolute;
    width: 35px;
    height: 45px;
    background: linear-gradient(145deg, var(--light-chocolate), var(--dark-chocolate));
    border-radius: 8px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    animation: fall linear;
}

@keyframes fall {
    from { transform: translateY(-50px) rotate(0deg); }
    to { transform: translateY(calc(80vh + 50px)) rotate(360deg); }
}

