/* Whack-a-Mole Game Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #EF4444;
    --primary-light: #FCA5A5;
    --secondary: #22C55E;
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --text: #1E293B;
    --text-muted: #64748B;
    --success: #10B981;
    --dirt: #92400E;
    --grass: #22C55E;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(180deg, #87CEEB 0%, #22C55E 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#game-container {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Header */
#game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--background);
    border-bottom: 1px solid #E5E7EB;
}

.game-title {
    font-weight: 700;
    font-size: 18px;
    color: var(--text);
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--surface);
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Game Area */
#game-area {
    padding: 20px;
    min-height: 400px;
}

/* Start Screen */
.start-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.start-screen h2 {
    font-size: 32px;
    color: var(--text);
    margin-bottom: 16px;
}

.start-screen p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.start-screen .btn-primary {
    padding: 20px 48px;
    font-size: 20px;
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 24px;
    background: linear-gradient(180deg, #86EFAC 0%, #4ADE80 100%);
    border-radius: 16px;
}

.game-board.hidden {
    display: none;
}

/* Holes */
.hole {
    aspect-ratio: 1;
    background: radial-gradient(ellipse at center, #92400E 0%, #78350F 100%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: inset 0 -8px 16px rgba(0, 0, 0, 0.3);
}

.hole::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, transparent 0%, #78350F 100%);
    pointer-events: none;
}

/* Moles */
.mole {
    position: absolute;
    bottom: -100%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 48px;
    transition: bottom 0.2s ease-out;
    z-index: 1;
    cursor: pointer;
    user-select: none;
}

.hole.active .mole {
    bottom: 10%;
    animation: moleWiggle 0.1s infinite alternate;
}

.hole.hit .mole {
    animation: moleHit 0.3s ease;
}

@keyframes moleWiggle {
    from {
        transform: translateX(-50%) rotate(-5deg);
    }

    to {
        transform: translateX(-50%) rotate(5deg);
    }
}

@keyframes moleHit {
    0% {
        transform: translateX(-50%) scale(1);
    }

    50% {
        transform: translateX(-50%) scale(0.5);
    }

    100% {
        transform: translateX(-50%) scale(0);
        bottom: -100%;
    }
}

/* Hit effect */
.hit-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    animation: hitPop 0.5s ease forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes hitPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    50% {
        transform: translate(-50%, -100%) scale(1.5);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -150%) scale(1);
        opacity: 0;
    }
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--surface);
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.stars {
    font-size: 48px;
    margin-bottom: 16px;
}

.modal-content h2 {
    font-size: 28px;
    color: var(--text);
    margin-bottom: 8px;
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 32px;
}

.result-stat {
    display: flex;
    flex-direction: column;
}

.result-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.result-label {
    font-size: 14px;
    color: var(--text-muted);
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-primary,
.btn-secondary {
    padding: 14px 28px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #DC2626 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: var(--background);
    color: var(--text);
    border: 2px solid #E5E7EB;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 400px) {
    .game-board {
        gap: 10px;
        padding: 16px;
    }

    .mole {
        font-size: 36px;
    }

    .stats {
        gap: 12px;
    }

    .stat-value {
        font-size: 16px;
    }
}