/* Taps Game Styles */

:root {
    /* Game state colors */
    --color-idle: #FFD93D;
    --color-playing: #4ECDC4;
    --color-result: #FFD93D;

    /* Text colors */
    --color-text: #333;
    --color-text-light: rgba(0, 0, 0, 0.6);

    /* Typography */
    --font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-main);
    background: var(--color-idle);
    color: var(--color-text);
}

.game-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease;
    user-select: none;
    -webkit-user-select: none;
}

.content {
    text-align: center;
    padding: 2rem;
    max-width: 90%;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.3);
}

.controls-inline {
    margin-bottom: 1rem;
}

/* Control instructions styles inherited from main.css */

.timer {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.tap-count {
    font-size: 5rem;
    font-weight: 700;
    margin: 1rem 0;
    line-height: 1;
}

.tps {
    font-size: 1.5rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.best-score {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
}

.hint {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-top: 1.5rem;
}

.home-link {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    transition: background 0.2s, transform 0.2s;
}

.home-link:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateX(-50%) translateY(-2px);
}

/* State: Playing */
.state-playing {
    background-color: var(--color-playing);
}

.state-playing .controls-inline,
.state-playing .best-score {
    display: none;
}

.state-playing .title,
.state-playing .timer,
.state-playing .tap-count {
    color: white;
}

.state-playing .tap-count {
    font-size: 8rem;
}

.state-playing .home-link {
    background: rgba(0, 0, 0, 0.2);
    color: white;
}

/* Tap feedback - subtle pulse effect */
.tap-flash {
    animation: tap-pulse 0.1s ease-out;
}

@keyframes tap-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* State: Result */
.state-result {
    background-color: var(--color-result);
}

.state-result .controls-inline {
    display: none;
}

/* New best celebration */
.state-result.new-best .title {
    color: #E6A700;
    animation: celebrate 0.6s ease-out;
}

.state-result.new-best .tap-count {
    animation: score-pop 0.4s ease-out;
}

@keyframes celebrate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes score-pop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .title {
        font-size: 1.75rem;
    }

    .tap-count {
        font-size: 4rem;
    }

    .state-playing .tap-count {
        font-size: 6rem;
    }

    .timer {
        font-size: 2rem;
    }
}

/* Prevent text selection during gameplay to avoid accidental selection */
.game-container * {
    user-select: none;
    -webkit-user-select: none;
}

/* Share button and related games styles inherited from main.css */
