:root {
    --grass: #4caf50;
    --grass-dark: #388e3c;
    --dirt: #795548;
    --dirt-dark: #4e342e;
    --mole: #8d6e63;
    --mole-dark: #5d4037;
    --mole-light: #d7ccc8;
    --mole-nose: #ff8a80;
    --text: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Fredoka One', cursive, sans-serif;
    background: radial-gradient(circle, var(--grass) 0%, var(--grass-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

.game-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
    text-align: center;
}

header {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 20px;
    margin-bottom: 25px;
    color: var(--text);
    font-size: 1.6rem;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

.label {
    font-size: 0.8rem;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: var(--dirt-dark);
    padding: 25px;
    border-radius: 30px;
    box-shadow: 0 15px 0 rgba(0,0,0,0.3), 0 20px 40px rgba(0,0,0,0.4);
    border: 4px solid var(--dirt);
}

.hole {
    aspect-ratio: 1 / 1;
    background: radial-gradient(circle at 50% 100%, var(--dirt) 0%, #2e1a16 100%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 15px 30px rgba(0,0,0,0.8);
    border: 6px solid var(--dirt-dark);
}

.mole {
    width: 80%;
    height: 90%;
    background: radial-gradient(circle at 50% 40%, var(--mole) 30%, var(--mole-dark) 100%);
    border-radius: 50% 50% 30% 30%;
    position: absolute;
    bottom: -100%;
    left: 10%;
    transition: bottom 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 3px solid var(--mole-dark);
    box-shadow: 
        inset -8px -8px 15px rgba(0,0,0,0.3),
        inset 8px 8px 15px rgba(255,255,255,0.1);
}

/* Eyes */
.mole::after {
    content: '';
    position: absolute;
    top: 25%;
    left: 25%;
    width: 12%;
    height: 16%;
    background: #000;
    border-radius: 50%;
    box-shadow: 
        /* Right eye */
        32px 0 0 #000,
        /* Highlights */
        3px 3px 0 rgba(255,255,255,0.8) inset,
        35px 3px 0 rgba(255,255,255,0.8) inset;
}

/* Snout & Nose & Teeth & Whiskers */
.mole::before {
    content: '';
    position: absolute;
    top: 45%;
    left: 15%;
    width: 70%;
    height: 35%;
    background: 
        /* Nose */
        radial-gradient(circle at 50% 25%, var(--mole-nose) 18%, transparent 20%),
        /* Teeth */
        linear-gradient(to bottom, transparent 75%, #fff 76%, #fff 95%, transparent 96%) 42% 80% / 15% 25% no-repeat,
        linear-gradient(to bottom, transparent 75%, #fff 76%, #fff 95%, transparent 96%) 58% 80% / 15% 25% no-repeat,
        /* Whiskers (Left) */
        linear-gradient(10deg, transparent 45%, #555 48%, #555 52%, transparent 55%) 5% 30% / 30% 15% no-repeat,
        linear-gradient(-5deg, transparent 45%, #555 48%, #555 52%, transparent 55%) 5% 50% / 30% 15% no-repeat,
        /* Whiskers (Right) */
        linear-gradient(-10deg, transparent 45%, #555 48%, #555 52%, transparent 55%) 95% 30% / 30% 15% no-repeat,
        linear-gradient(5deg, transparent 45%, #555 48%, #555 52%, transparent 55%) 95% 50% / 30% 15% no-repeat,
        /* Snout base */
        var(--mole-light);
    border-radius: 50% 50% 40% 40%;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    border: 1px solid var(--mole-dark);
}

.mole.up {
    bottom: -5%;
}

.mole.tease {
    bottom: -65%;
}

.mole.hit {
    transform: scale(0.95) translateY(5px);
    filter: brightness(0.7) sepia(0.3);
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.modal {
    background: white;
    padding: 40px;
    border-radius: 30px;
    max-width: 90%;
    width: 350px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    text-align: center;
}

h1 {
    color: var(--dirt-dark);
    margin-bottom: 15px;
    font-size: 2rem;
}

#modal-desc {
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

button {
    background: linear-gradient(to bottom, var(--grass), var(--grass-dark));
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.3rem;
    border-radius: 15px;
    margin-top: 25px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 6px 0 var(--grass-dark), 0 10px 20px rgba(0,0,0,0.2);
    transition: all 0.1s;
    width: 100%;
}

button:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0 var(--grass-dark), 0 5px 10px rgba(0,0,0,0.2);
}

@keyframes shake {
    0% { transform: translate(1px, 1px) rotate(0deg); }
    10% { transform: translate(-1px, -2px) rotate(-1deg); }
    20% { transform: translate(-3px, 0px) rotate(1deg); }
    30% { transform: translate(3px, 2px) rotate(0deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    50% { transform: translate(-1px, 2px) rotate(-1deg); }
    60% { transform: translate(-3px, 1px) rotate(0deg); }
    70% { transform: translate(3px, 1px) rotate(-1deg); }
    80% { transform: translate(-1px, -1px) rotate(1deg); }
    90% { transform: translate(1px, 2px) rotate(0deg); }
    100% { transform: translate(1px, -2px) rotate(-1deg); }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

