body {
    font-family: 'Poppins', sans-serif;
    background-color: #0d1117;
    color: #ffffff;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper {
    width: min(90vw, 640px);
    text-align: center;
}

h1 {
    margin-bottom: 0.5rem;
    color: #58a6ff;
}

.intro {
    margin-top: 0;
    color: #8b949e;
}

.hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

.hud span {
    background-color: #161b22;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
}

#start-button {
    background-color: #238636;
    color: #ffffff;
    border: none;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#start-button:hover {
    background-color: #2ea043;
    transform: translateY(-2px);
}

#start-button:disabled {
    background-color: #30363d;
    cursor: not-allowed;
    transform: none;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.hole {
    background-color: #21262d;
    border: 3px solid #30363d;
    border-radius: 50%;
    width: min(30vw, 140px);
    height: min(30vw, 140px);
    max-width: 140px;
    max-height: 140px;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: border-color 0.2s ease;
}

.hole::after {
    content: "";
    position: absolute;
    inset: 20% 25% 5% 25%;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"%3E%3Ccircle cx="20" cy="24" r="4" fill="%23ffffff"/%3E%3Ccircle cx="44" cy="24" r="4" fill="%23ffffff"/%3E%3Cpath d="M20 42c6 6 18 6 24 0" stroke="%23ffffff" stroke-width="4" stroke-linecap="round" fill="none"/%3E%3Cpath d="M32 6c-13 0-24 11-24 24v16h48V30C56 17 45 6 32 6z" fill="%23f0883e"/%3E%3C/svg%3E');
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateY(12%);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.hole.active::after {
    opacity: 1;
    transform: translateY(0);
}

.hole:focus-visible {
    border-color: #58a6ff;
}

.hole.hit {
    animation: hitFlash 0.25s ease;
}

@keyframes hitFlash {
    0% {
        box-shadow: 0 0 0 rgba(88, 166, 255, 0.4);
    }

    100% {
        box-shadow: 0 0 18px rgba(88, 166, 255, 0.7);
    }
}

#status {
    min-height: 1.5rem;
    margin-top: 1.5rem;
    color: #f0883e;
    font-weight: 600;
}

@media (max-width: 480px) {
    .wrapper {
        width: calc(100% - 16px);
    }

    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.5rem;
    }

    .hole {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .hud span {
        font-size: 0.9rem;
    }

    #start-button {
        width: 100%;
        min-height: 44px;
    }
}
