body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #ffffff;
    touch-action: none;
}

#game-container {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

#track {
    width: 80%;
    height: 60px;
    background-color: #cccccc;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#circle {
    width: 50px;
    height: 50px;
    background-color: black;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 50px;
    z-index: 1;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    animation: waveShape 1s ease-in-out infinite;
}

@keyframes waveShape {
    0%, 100% {
        border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    }
    12.5% {
        border-radius: 30% 70% 80% 20% / 30% 30% 70% 60%;
    }
    25% {
        border-radius: 70% 30% 20% 80% / 60% 70% 30% 30%;
    }
    37.5% {
        border-radius: 20% 80% 30% 70% / 30% 40% 40% 70%;
    }
    50% {
        border-radius: 40% 60% 70% 30% / 40% 40% 60% 50%;
    }
    62.5% {
        border-radius: 60% 40% 30% 70% / 50% 60% 40% 40%;
    }
    75% {
        border-radius: 30% 70% 40% 60% / 40% 50% 50% 60%;
    }
    87.5% {
        border-radius: 70% 30% 60% 40% / 50% 50% 40% 50%;
    }
}

.circle-body {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background-color: black;
    z-index: -1;
}

.eye-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.eye {
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    position: relative;
    margin: 0 3px;
    overflow: hidden;
}

.pupil {
    width: 8px;
    height: 8px;
    background-color: black;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.eyelid {
    width: 100%;
    height: 100%;
    background-color: black;
    position: absolute;
    top: -100%;
    left: 0;
    transition: top 0.1s;
    z-index: 2;
}

.obstacle {
    width: 20px;
    height: 20px;
    background-color: white;
    border: 2px solid black;
    border-radius: 50%;
    position: absolute;
    z-index: 1;
    overflow: hidden;
}

.obstacle::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: black;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(calc(-50% + var(--eyeX, 0px)), calc(-50% + var(--eyeY, 0px)));
    z-index: 2;
}

.obstacle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: black;
    top: -100%;
    left: 0;
    animation: blink 1.5s infinite;
    z-index: 1;
}

@keyframes blink {
    0%, 85%, 100% {
        transform: translateY(0);
    }
    90% {
        transform: translateY(100%);
    }
}

.food {
    width: 20px;
    height: 20px;
    background-color: black;
    border: 2px solid white;
    border-radius: 50%;
    position: absolute;
    z-index: 1;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.food::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: #000000;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    filter: blur(1px);
    opacity: 1;
    z-index: -1;
    animation: foodOuterParticleFade 0.5s ease-out infinite;
}

.food::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 50%;
    background: #000000;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    filter: blur(1px);
    opacity: 1;
    z-index: -1;
    animation: foodParticleFade 0.5s ease-out infinite;
}

@keyframes foodOuterParticleFade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(0, -40px) scale(0.2);
        opacity: 0;
    }
}

@keyframes foodParticleFade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    20% {
        transform: translate(0, -8px) scale(0.8);
        opacity: 0.9;
    }
    40% {
        transform: translate(0, -16px) scale(0.6);
        opacity: 0.8;
    }
    60% {
        transform: translate(0, -24px) scale(0.4);
        opacity: 0.6;
    }
    80% {
        transform: translate(0, -32px) scale(0.2);
        opacity: 0.3;
    }
    100% {
        transform: translate(0, -40px) scale(0.1);
        opacity: 0;
    }
}

#game-over {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: 100;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 40px;
}

#game-over-text {
    color: black;
    font-size: 32px;
    font-family: Arial, sans-serif;
    font-weight: bold;
}

#final-score {
    color: black;
    font-size: 120px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    }
}

#restart-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: white;
    border: 3px solid black;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: pulse 2s infinite;
}

#restart-button::before {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 20px;
    border-color: transparent transparent transparent black;
    transform: rotate(0deg);
    margin-left: 5px;
}

#restart-button:hover {
    animation: none;
    transform: scale(1.1);
    background-color: #f0f0f0;
}

#restart-button:active {
    transform: scale(0.95);
}

#score {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    font-family: Arial, sans-serif;
    color: #000000;
    z-index: 10;
    font-weight: 900;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: #000000;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 0;
}

.particle.large {
    box-shadow: 0 0 6px #000000;
}

.particle.tiny {
    box-shadow: 0 0 2px #000000;
}

.particle.wavy {
    animation: wave 1s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% {
        transform: translateX(0) translateY(0);
    }
    50% {
        transform: translateX(2px) translateY(2px);
    }
}

@keyframes outerParticleFade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--moveX), var(--moveY)) scale(0.2);
        opacity: 0;
    }
}

@keyframes particleFade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    20% {
        transform: translate(calc(var(--moveX) * 0.2), calc(var(--moveY) * 0.2)) scale(0.8);
        opacity: 0.9;
    }
    40% {
        transform: translate(calc(var(--moveX) * 0.4), calc(var(--moveY) * 0.4)) scale(0.6);
        opacity: 0.8;
    }
    60% {
        transform: translate(calc(var(--moveX) * 0.6), calc(var(--moveY) * 0.6)) scale(0.4);
        opacity: 0.6;
    }
    80% {
        transform: translate(calc(var(--moveX) * 0.8), calc(var(--moveY) * 0.8)) scale(0.2);
        opacity: 0.3;
    }
    100% {
        transform: translate(var(--moveX), var(--moveY)) scale(0.1);
        opacity: 0;
    }
}

@keyframes smallParticleFade {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--moveX), var(--moveY)) scale(0.05);
        opacity: 0;
    }
}

.particle.outer {
    background: #000000;
    filter: blur(1px);
    opacity: 1;
    z-index: -1;
}

.circle {
    position: relative;
    width: 100px;
    height: 100px;
    background: #000000;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
}

.game-over-card {
    background: white;
    border: 2px solid black;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    max-width: 400px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-over-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.game-logo {
    width: 75px;
    height: auto;
    margin-bottom: 20px;
}

.return-button {
    color: black;
    font-size: 16px;
    margin-top: 15px;
    display: inline-block;
    font-weight: bold;
}

#no-score {
    color: black;
    font-size: 60px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
    margin-top: -20px;
    margin-bottom: 20px;
}

#high-score {
    color: black;
    font-size: 40px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    line-height: 1;
    margin-top: -20px;
    margin-bottom: 20px;
} 