/* === Tap the Beat Game Styles === */

.game-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.game-header h1 {
    margin-bottom: 0.25rem;
}

.game-header p {
    color: var(--text-secondary);
}

.game-controls {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.difficulty-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.difficulty-btn {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

.difficulty-btn.active {
    background-color: var(--accent);
    color: var(--accent-contrast);
    border-color: var(--accent);
}

.game-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-heading);
}

/* Start button */
.tap-start {
    text-align: center;
    padding: 3rem 0;
}

.tap-start-btn {
    font-size: 1.3rem;
    padding: 1rem 3rem;
}

/* Board */
.tap-board {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    margin: 0 auto;
    background: var(--bg-secondary);
    border: 2px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    cursor: crosshair;
    touch-action: manipulation;
}

/* Circles */
.tap-circle {
    position: absolute;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    animation: tap-pop-in 0.2s ease-out;
    transition: transform 0.1s, opacity 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tap-circle:active {
    transform: scale(0.85);
}

.tap-circle.hit {
    animation: tap-hit 0.3s ease-out forwards;
}

.tap-circle.missed {
    animation: tap-miss 0.4s ease-out forwards;
}

@keyframes tap-pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes tap-hit {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.4);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

@keyframes tap-miss {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.3);
        opacity: 0;
    }
}

/* Score popup */
.tap-score-popup {
    position: absolute;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent);
    pointer-events: none;
    animation: score-float 0.6s ease-out forwards;
}

@keyframes score-float {
    0% {
        transform: translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateY(-40px);
        opacity: 0;
    }
}

/* Results */
.game-win {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
}

.game-win .feature-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.game-win h2 {
    margin-bottom: 0.5rem;
}

.game-win p {
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 480px) {
    .tap-board {
        height: 320px;
    }

    .tap-circle {
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.25rem;
    }
}