/* Whac-A-Mole Game Styles - Modernized */

body {
    font-family: 'Baloo 2', 'Quicksand', 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f9d423 0%, #ff4e50 100%);
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Subtle animated background */
    animation: bg-move 10s linear infinite alternate;
}

@keyframes bg-move {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

h1 {
    margin-top: 32px;
    font-size: 2.8rem;
    color: #fff;
    text-shadow: 0 4px 24px #ff4e50, 0 1px 0 #fffbe7;
    letter-spacing: 2px;
    font-family: 'Baloo 2', cursive, sans-serif;
}

.game-info {
    display: flex;
    gap: 2.5rem;
    font-size: 1.6rem;
    margin: 24px 0 12px 0;
    color: #fff;
    text-shadow: 1px 1px 8px #ff4e50;
    background: rgba(255,255,255,0.18);
    border-radius: 18px;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
    backdrop-filter: blur(6px);
    padding: 12px 32px;
    border: 1.5px solid rgba(255,255,255,0.25);
}

.difficulty-selector {
    margin-bottom: 22px;
    background: rgba(255,255,255,0.18);
    border-radius: 12px;
    box-shadow: 0 4px 16px 0 rgba(31,38,135,0.10);
    backdrop-filter: blur(4px);
    padding: 8px 18px;
    border: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    gap: 10px;
}

#difficulty {
    font-size: 1.1rem;
    padding: 6px 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #fffbe7 60%, #ffe0e0 100%);
    color: #ff4e50;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(255,78,80,0.10);
    transition: box-shadow 0.2s, background 0.2s;
}
#difficulty:focus {
    outline: 2px solid #ff4e50;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    grid-template-rows: repeat(3, minmax(90px, 1fr));
    gap: 22px;
    margin-bottom: 36px;
    width: 100vw;
    max-width: 400px;
    aspect-ratio: 1 / 1;
    background: rgba(255,255,255,0.10);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(31,38,135,0.18);
    padding: 18px;
}

.tile {
    background: linear-gradient(145deg, #fffbe7 70%, #ffe0e0 100%);
    border-radius: 50%;
    box-shadow: 0 6px 24px rgba(255,78,80,0.18), 0 1.5px 0 #fffbe7;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.12s;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 0;
    border: 2.5px solid #ffb347;
    will-change: transform;
}
.tile:active, .tile:focus {
    box-shadow: 0 2px 8px rgba(255,78,80,0.25);
    transform: scale(0.96);
    border-color: #ff4e50;
}

.mole {
    font-size: 2.8rem;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scale(1);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 16px #ff4e50) brightness(1.1);
    user-select: none;
    pointer-events: auto;
    visibility: visible;
}
@keyframes mole-emerge {
    0% {
        bottom: -20px;
        transform: translateX(-50%) scale(0.8);
        filter: drop-shadow(0 4px 16px #ff4e50) brightness(0.8);
    }
    50% {
        bottom: 8px;
        transform: translateX(-50%) scale(1.1);
        filter: drop-shadow(0 4px 16px #ff4e50) brightness(1.2);
    }
    100% {
        bottom: 0;
        transform: translateX(-50%) scale(1);
        filter: drop-shadow(0 4px 16px #ff4e50) brightness(1.1);
    }
}

.mole.hide {
    transform: translateX(-50%) scale(0);
    bottom: -20px;
    pointer-events: none;
    filter: blur(1px) brightness(0.6);
    animation: none;
    transition: all 0.2s ease-in;
    opacity: 0;
    visibility: hidden;
}

.mole.hit {
    animation: hit-pop 0.25s;
    filter: drop-shadow(0 0 24px #fff) brightness(1.3);
    transform: translateX(-50%) scale(1.2);
}

@keyframes hit-pop {
    0% { transform: translateX(-50%) scale(1.2); }
    50% { transform: translateX(-50%) scale(0.7); }
    100% { transform: translateX(-50%) scale(1); }
}

.game-controls {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

#start-btn, #stop-btn {
    font-size: 1.25rem;
    padding: 12px 38px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
    font-family: 'Baloo 2', cursive, sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
}

#start-btn {
    background: linear-gradient(90deg, #ff4e50 60%, #f9d423 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,78,80,0.18);
}
#start-btn:hover, #start-btn:focus {
    background: linear-gradient(90deg, #f9d423 60%, #ff4e50 100%);
    color: #ff4e50;
    transform: scale(1.06);
    box-shadow: 0 8px 32px rgba(255,78,80,0.25);
}
#start-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#stop-btn {
    background: linear-gradient(90deg, #ff6b6b 60%, #ff8e8e 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(255,107,107,0.18);
}
#stop-btn:hover, #stop-btn:focus {
    background: linear-gradient(90deg, #ff8e8e 60%, #ff6b6b 100%);
    color: #fff;
    transform: scale(1.06);
    box-shadow: 0 8px 32px rgba(255,107,107,0.25);
}
#stop-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#final-message {
    font-size: 1.5rem;
    color: #fff;
    background: rgba(255, 78, 80, 0.92);
    padding: 20px 36px;
    border-radius: 16px;
    margin-top: 14px;
    box-shadow: 0 4px 16px rgba(255,78,80,0.18);
    display: inline-block;
    border: 2px solid #fffbe7;
    text-shadow: 0 2px 8px #ff4e50;
    font-family: 'Baloo 2', cursive, sans-serif;
}

.hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 600px) {
    .grid {
        max-width: 99vw;
        gap: 12px;
        padding: 6px;
    }
    h1 {
        font-size: 2.1rem;
    }
    .game-info {
        font-size: 1.1rem;
        padding: 8px 8px;
    }
    #final-message {
        font-size: 1.1rem;
        padding: 10px 10px;
    }
    .tile {
        min-width: 0;
        min-height: 0;
    }
}

/* Import modern playful font */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600&display=swap');
