* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.game-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
}

.game-header {
    text-align: center;
    margin-bottom: 20px;
}

.game-header h1 {
    font-size: 2.5rem;
    color: #e67e22;
    text-shadow: 0 0 20px rgba(230, 126, 34, 0.5);
}

.game-header .subtitle {
    color: #ecf0f1;
    font-size: 1rem;
    margin-top: 5px;
    letter-spacing: 3px;
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 15px;
}

.info-box {
    text-align: center;
}

.info-label {
    display: block;
    color: #95a5a6;
    font-size: 0.8rem;
    font-weight: bold;
}

.info-value {
    display: block;
    color: #ecf0f1;
    font-size: 1.8rem;
    font-weight: bold;
}

.game-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: linear-gradient(145deg, #8B4513, #654321);
    border-radius: 15px;
}

.hole {
    aspect-ratio: 1;
    background: radial-gradient(ellipse at center, #2c1810 0%, #1a0f0a 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: inset 0 10px 20px rgba(0, 0, 0, 0.5);
}

.hole::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, #654321, transparent);
    pointer-events: none;
}

.mole {
    font-size: 3rem;
    transform: translateY(100%);
    transition: transform 0.1s ease-out;
    user-select: none;
    z-index: 1;
}

.hole.active .mole {
    transform: translateY(10%);
}

.hole.whacked .mole {
    transform: translateY(100%) scale(0.5);
    transition: transform 0.15s ease-in;
}

.controls {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.control-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.5);
}

.control-btn:disabled {
    background: #7f8c8d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.instructions {
    text-align: center;
    color: #95a5a6;
}

.instructions p {
    font-size: 0.95rem;
    margin: 5px 0;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

.overlay-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
}

.overlay-content h2 {
    color: #e67e22;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.overlay-content p {
    color: #ecf0f1;
    font-size: 1.3rem;
    margin-bottom: 15px;
}

#newRecord {
    color: #f1c40f;
    font-weight: bold;
    animation: pulse 0.5s ease infinite alternate;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.overlay-content button {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.overlay-content button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.5);
}

/* Hit effect */
@keyframes hit {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.hole.hit {
    animation: hit 0.2s ease;
}

@media (max-width: 500px) {
    .game-container {
        padding: 15px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .mole {
        font-size: 2.5rem;
    }

    .game-board {
        gap: 10px;
        padding: 15px;
    }
}
