:root {
    --primary: #f97316;
    --primary-light: #fbbf24;
    --accent: #ef4444;
    --bg-dark: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    color: var(--text-light);
    background-color: var(--bg-dark);
}

.whack-game-container {
    max-width: 500px;
    margin: 80px auto 20px auto;
    padding: 24px;
    background: var(--card-bg);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    position: relative;
}

.whack-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.whack-header h1 {
    margin: 0;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.whack-game-icon-small {
    width: 32px;
    height: 32px;
}

.whack-back-btn {
    padding: 10px 20px;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: var(--text-light);
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whack-back-btn:hover {
    background: rgba(51, 65, 85, 0.8);
    transform: translateX(-5px);
}

.whack-game-info {
    display: flex;
    justify-content: space-between;
    background: rgba(15, 23, 42, 0.6);
    padding: 15px 25px;
    border-radius: 18px;
    margin-bottom: 24px;
    font-weight: 700;
    border: 1px solid var(--glass-border);
    font-size: 1.1rem;
}

.whack-screen {
    position: relative;
    padding: 10px;
}

.mole-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.hole {
    aspect-ratio: 1/1;
    background: #334155;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    border: 8px solid #1e293b;
    box-shadow: inset 0 15px 30px rgba(0, 0, 0, 0.6), 0 10px 15px rgba(0, 0, 0, 0.3);
}

/* Grass effect around the hole */
.hole::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -10%;
    width: 120%;
    height: 30%;
    background: #15803d;
    z-index: 5;
    border-radius: 50% 50% 0 0;
    opacity: 0.8;
}

.mole {
    width: 80%;
    height: 90%;
    background: #78350f;
    border-radius: 50% 50% 0 0;
    position: absolute;
    bottom: -110%;
    left: 10%;
    transition: bottom 0.15s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    cursor: pointer;
    z-index: 2;
    box-shadow: inset -5px -5px 15px rgba(0, 0, 0, 0.3);
}

.mole::after {
    content: '👀';
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
}

/* Mouth/Nose for the mole */
.mole::before {
    content: '';
    position: absolute;
    top: 45%;
    left: 42%;
    width: 16%;
    height: 10%;
    background: #fca5a5;
    border-radius: 50%;
}

.hole.up .mole {
    bottom: -10%;
}

.mole.hit {
    background: var(--accent);
    transform: scale(0.95) translateY(5px);
}

.mole.hit::after {
    content: '😵';
}

/* Modal and Message */
.whack-modal,
.whack-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    border-radius: 24px;
    animation: fadeIn 0.3s ease-out;
}

.whack-modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 24px;
    text-align: center;
    width: 85%;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.whack-input-group {
    margin-bottom: 25px;
    text-align: left;
}

.whack-input-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.whack-input-group input {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.whack-input-group input:focus {
    border-color: var(--primary);
}

.whack-btn-start {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.4);
    transition: all 0.3s ease;
}

.whack-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(249, 115, 22, 0.5);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hidden {
    display: none !important;
}

@media (max-width: 600px) {
    .whack-game-container {
        margin: 80px 10px 20px 10px;
        padding: 15px;
    }

    .mole-grid {
        gap: 10px;
    }

    .mole::after {
        font-size: 1.1rem;
    }
}