/* ═══════════════════════════════════════════════════
   GAMES / BRAIN CHALLENGES — Arcade Theme CSS
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ── CSS Variables (Games-specific) ── */
:root {
    --g-bg: #0a0a1a;
    --g-bg-card: #12122a;
    --g-bg-card-hover: #1a1a3a;
    --g-neon-blue: #00d4ff;
    --g-neon-pink: #ff2d95;
    --g-neon-green: #39ff14;
    --g-neon-yellow: #ffe600;
    --g-neon-purple: #b347d9;
    --g-text: #e0e0f0;
    --g-text-muted: #6b7280;
    --g-border: #2a2a4a;
    --g-gold: #ffd700;
    --g-silver: #c0c0c0;
    --g-bronze: #cd7f32;
    --g-radius: 8px;
    --g-font-retro: 'Press Start 2P', monospace;
    --g-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Games Panel Container ── */
#panel-games {
    background: var(--g-bg);
    min-height: 80vh;
    padding: 1.5rem;
}

/* Smooth entrance for games root content changes */
#games-root > .games-header {
    animation: viewFadeIn 0.35s ease-out;
}

#games-root > .games-grid {
    animation: viewFadeIn 0.4s ease-out 0.05s both;
}

#games-root > .leaderboard {
    animation: viewFadeIn 0.4s ease-out;
}

/* ── Games Header ── */
.games-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #12122a 0%, #1a1040 50%, #12122a 100%);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    position: relative;
    overflow: hidden;
}

.games-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--g-neon-blue), var(--g-neon-pink), var(--g-neon-yellow), var(--g-neon-green), var(--g-neon-blue));
    background-size: 200% 100%;
    animation: headerRainbow 3s linear infinite;
}

@keyframes headerRainbow {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

.games-header__title {
    font-family: var(--g-font-retro);
    font-size: 1.2rem;
    color: var(--g-neon-blue);
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    margin: 0 0 0.5rem;
    letter-spacing: 2px;
}

.games-header__subtitle {
    color: var(--g-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.games-header__profile-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--g-border);
}

.games-header__avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: var(--g-bg);
    border: 2px solid var(--g-neon-blue);
    border-radius: 6px;
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

.games-header__info {
    text-align: left;
}

.games-header__alias {
    font-family: var(--g-font-retro);
    font-size: 0.65rem;
    color: var(--g-text);
}

.games-header__level {
    font-size: 0.75rem;
    color: var(--g-neon-green);
    margin-top: 2px;
}

/* ── Navigation sub-tabs for Games ── */
.games-nav {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--g-border);
    padding-bottom: 0;
    overflow-x: auto;
}

.games-nav__tab {
    background: none;
    border: none;
    color: var(--g-text-muted);
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    font-family: var(--g-font-body);
}

.games-nav__tab:hover {
    color: var(--g-text);
    background: rgba(255, 255, 255, 0.03);
}

.games-nav__tab--active {
    color: var(--g-neon-blue);
    border-bottom-color: var(--g-neon-blue);
    text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
}

/* ── Game Cards Grid ── */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.game-card {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 1.25rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    animation: cardSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.game-card:nth-child(1) { animation-delay: 0s; }
.game-card:nth-child(2) { animation-delay: 0.07s; }
.game-card:nth-child(3) { animation-delay: 0.14s; }
.game-card:nth-child(4) { animation-delay: 0.21s; }
.game-card:nth-child(5) { animation-delay: 0.28s; }
.game-card:nth-child(6) { animation-delay: 0.35s; }

@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.game-card:hover {
    background: var(--g-bg-card-hover);
    border-color: var(--g-neon-blue);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.15), 0 0 40px rgba(0, 212, 255, 0.05);
    transform: translateY(-4px);
}

.game-card__icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.game-card__name {
    font-family: var(--g-font-retro);
    font-size: 0.7rem;
    color: var(--g-text);
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.game-card__desc {
    font-size: 0.8rem;
    color: var(--g-text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.game-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.game-card__score-type {
    color: var(--g-neon-yellow);
    font-size: 0.7rem;
}

.game-card__play-btn {
    background: linear-gradient(135deg, var(--g-neon-blue), #0099cc);
    color: #fff;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.game-card__play-btn:hover {
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.6), 0 0 32px rgba(0, 212, 255, 0.2);
    transform: scale(1.08);
}

.game-card__play-btn:active {
    transform: scale(0.96);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.4);
}

/* ── Profile Setup ── */
.profile-setup {
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    animation: viewFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.profile-setup__title {
    font-family: var(--g-font-retro);
    font-size: 0.85rem;
    color: var(--g-neon-blue);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 1px;
}

.profile-setup__field {
    margin-bottom: 1.5rem;
}

.profile-setup__label {
    display: block;
    font-size: 0.8rem;
    color: var(--g-text);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.profile-setup__input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: 4px;
    color: var(--g-text);
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.profile-setup__input:focus {
    outline: none;
    border-color: var(--g-neon-blue);
    box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

/* ── Avatar Gallery ── */
.avatar-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.5rem;
}

.avatar-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.3rem;
    background: var(--g-bg);
    border: 2px solid var(--g-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.avatar-option:hover {
    border-color: var(--g-neon-purple);
    transform: translateY(-3px);
    background: rgba(179, 71, 217, 0.1);
}

.avatar-option--selected {
    border-color: var(--g-neon-blue);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
}

.avatar-option__icon {
    font-size: 1.6rem;
    margin-bottom: 0.3rem;
    image-rendering: pixelated;
}


.avatar-option__icon img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    image-rendering: pixelated;
}

/* Avatar images everywhere */
.avatar-img,
.lb-avatar img,
.games-header__avatar img,
.profile-card__avatar img {
    border-radius: 50%;
    object-fit: cover;
    image-rendering: pixelated;
}

.avatar-option__name {
    font-size: 0.55rem;
    color: var(--g-text-muted);
    text-align: center;
    line-height: 1.3;
    font-family: var(--g-font-retro);
}

/* ── Leaderboard ── */
.leaderboard {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    overflow: hidden;
}

.leaderboard__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--g-border);
}

.leaderboard__title {
    font-family: var(--g-font-retro);
    font-size: 0.65rem;
    color: var(--g-neon-yellow);
    letter-spacing: 1px;
}

.leaderboard__period-select {
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    color: var(--g-text);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
}

.leaderboard__table {
    width: 100%;
    border-collapse: collapse;
}

.leaderboard__table th {
    text-align: left;
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
    color: var(--g-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(0, 0, 0, 0.3);
}

.leaderboard__table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--g-border);
    font-size: 0.85rem;
    color: var(--g-text);
}

.leaderboard__table tbody tr {
    transition: background 0.2s, transform 0.2s;
}

.leaderboard__table tr:hover td {
    background: rgba(0, 212, 255, 0.04);
}

.lb-rank {
    font-family: var(--g-font-retro);
    font-size: 0.65rem;
    width: 40px;
    text-align: center;
}

.lb-rank--1 {
    color: var(--g-gold);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
    animation: goldPulse 2s ease-in-out infinite;
}

@keyframes goldPulse {
    0%, 100% { text-shadow: 0 0 8px rgba(255, 215, 0, 0.5); }
    50% { text-shadow: 0 0 16px rgba(255, 215, 0, 0.8), 0 0 24px rgba(255, 215, 0, 0.3); }
}

.lb-rank--2 {
    color: var(--g-silver);
}

.lb-rank--3 {
    color: var(--g-bronze);
}

.lb-player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lb-avatar {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: 4px;
}

.lb-alias {
    font-weight: 600;
}

.lb-level {
    font-size: 0.65rem;
    color: var(--g-neon-green);
    display: block;
    margin-top: 1px;
}

.lb-score {
    font-family: var(--g-font-retro);
    font-size: 0.7rem;
    color: var(--g-neon-blue);
    text-align: right;
}

/* ── Player Profile ── */
.player-profile {
    margin: 0 auto;
}

.profile-card {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.profile-card__avatar {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--g-bg);
    border: 3px solid var(--g-neon-blue);
    border-radius: 10px;
    margin: 0 auto 0.75rem;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.profile-card__alias {
    font-family: var(--g-font-retro);
    font-size: 0.8rem;
    color: var(--g-text);
    margin-bottom: 0.3rem;
}

.profile-card__level {
    font-size: 0.9rem;
    color: var(--g-neon-green);
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.profile-card__stats {
    font-size: 0.8rem;
    color: var(--g-text-muted);
}

/* ── Personal Bests ── */
.personal-bests {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pb-item {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 0.8rem;
    text-align: center;
}

.pb-item__game {
    font-size: 0.7rem;
    color: var(--g-text-muted);
    margin-bottom: 0.3rem;
}

.pb-item__score {
    font-family: var(--g-font-retro);
    font-size: 0.8rem;
    color: var(--g-neon-yellow);
}

.pb-item__label {
    font-size: 0.65rem;
    color: var(--g-text-muted);
    margin-top: 0.2rem;
}

/* ── Medals ── */
.medals-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.medal-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
}

.medal-item__icon {
    font-size: 1.1rem;
}

.medal-item__name {
    font-size: 0.75rem;
    color: var(--g-text);
    font-weight: 600;
}

.medal-empty {
    text-align: center;
    padding: 1rem;
    color: var(--g-text-muted);
    font-size: 0.85rem;
}

/* ── Daily Plays Counter ── */
.plays-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: 20px;
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    color: var(--g-text-muted);
}

.plays-counter__bar {
    width: 60px;
    height: 4px;
    background: var(--g-border);
    border-radius: 2px;
    overflow: hidden;
}

.plays-counter__fill {
    height: 100%;
    background: var(--g-neon-green);
    border-radius: 2px;
    transition: width 0.3s;
}

.plays-counter--full .plays-counter__fill {
    background: var(--g-neon-pink);
}

/* ── Game Screen Container ── */
.game-screen {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    padding: 1.5rem;
    min-height: 400px;
    position: relative;
}

.game-screen__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--g-border);
}

.game-screen__title {
    font-family: var(--g-font-retro);
    font-size: 0.7rem;
    color: var(--g-neon-blue);
}

.game-screen__back {
    background: none;
    border: 1px solid var(--g-border);
    color: var(--g-text-muted);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.game-screen__back:hover {
    border-color: var(--g-text);
    color: var(--g-text);
}

.game-screen__area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

/* ── Achievement Toast ── */
.achievement-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #1a1040, #12122a);
    border: 1px solid var(--g-neon-yellow);
    border-radius: var(--g-radius);
    padding: 1rem 1.5rem;
    z-index: 10000;
    animation: toastIn 0.6s cubic-bezier(0.16, 1, 0.3, 1), toastGlow 1.5s ease-in-out 0.6s 2, toastOut 0.5s ease-in 3.5s forwards;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    max-width: 300px;
}

.achievement-toast__title {
    font-family: var(--g-font-retro);
    font-size: 0.55rem;
    color: var(--g-neon-yellow);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: toastTitleShine 2s ease-in-out 0.6s;
}

.achievement-toast__message {
    font-size: 0.85rem;
    color: var(--g-text);
}

@keyframes toastIn {
    from {
        transform: translateX(120%) scale(0.8);
        opacity: 0;
    }
    60% {
        transform: translateX(-8px) scale(1.02);
        opacity: 1;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.6), 0 0 60px rgba(255, 215, 0, 0.2);
    }
}

@keyframes toastTitleShine {
    0% { filter: brightness(1); }
    30% { filter: brightness(1.8); }
    60% { filter: brightness(1); }
}

@keyframes toastOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ── Game-specific styles ── */

/* Reaction Time */
.reaction-zone {
    width: 100%;
    max-width: 500px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--g-radius);
    cursor: pointer;
    font-family: var(--g-font-retro);
    font-size: 0.7rem;
    color: #fff;
    transition: background 0.1s;
    user-select: none;
}

.reaction-zone--wait {
    background: #dc2626;
}

.reaction-zone--go {
    background: #16a34a;
    animation: goFlash 0.3s ease-out;
}

@keyframes goFlash {
    0% { background: #4ade80; box-shadow: inset 0 0 60px rgba(74, 222, 128, 0.5); }
    100% { background: #16a34a; box-shadow: none; }
}

.reaction-zone--result {
    background: var(--g-bg);
    border: 1px solid var(--g-border);
}

/* Typing Race */
.typing-display {
    font-size: 1.1rem;
    line-height: 1.8;
    padding: 1rem;
    background: var(--g-bg);
    border-radius: var(--g-radius);
    border: 1px solid var(--g-border);
    margin-bottom: 1rem;
    max-width: 600px;
    width: 100%;
}

.typing-char--correct {
    color: var(--g-neon-green);
}

.typing-char--wrong {
    color: var(--g-neon-pink);
    background: rgba(255, 45, 149, 0.2);
}

.typing-char--current {
    border-bottom: 2px solid var(--g-neon-blue);
}

.typing-input {
    width: 100%;
    max-width: 600px;
    padding: 0.6rem;
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: 4px;
    color: var(--g-text);
    font-size: 1rem;
    box-sizing: border-box;
}

.typing-input:focus {
    outline: none;
    border-color: var(--g-neon-blue);
}

/* Aim Trainer */
.aim-arena {
    width: 100%;
    max-width: 500px;
    height: 350px;
    position: relative;
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: var(--g-radius);
    overflow: hidden;
    cursor: crosshair;
}

.aim-target {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--g-neon-pink), #cc0055);
    box-shadow: 0 0 10px rgba(255, 45, 149, 0.5);
    cursor: pointer;
    animation: targetPulse 0.8s ease-in-out infinite;
}

@keyframes targetPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Math Sprint */
.math-problem {
    font-family: var(--g-font-retro);
    font-size: 1.5rem;
    color: var(--g-text);
    text-align: center;
    margin-bottom: 1rem;
}

.math-input {
    width: 150px;
    padding: 0.6rem;
    background: var(--g-bg);
    border: 2px solid var(--g-border);
    border-radius: 4px;
    color: var(--g-text);
    font-size: 1.2rem;
    text-align: center;
    font-family: var(--g-font-retro);
}

.math-input:focus {
    outline: none;
    border-color: var(--g-neon-blue);
}

/* Simon Memory */
.simon-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 260px;
    margin: 0 auto;
}

.simon-btn {
    width: 120px;
    height: 120px;
    border-radius: 12px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.15s;
    opacity: 0.6;
}

.simon-btn--0 {
    background: #dc2626;
}

.simon-btn--1 {
    background: #2563eb;
}

.simon-btn--2 {
    background: #16a34a;
}

.simon-btn--3 {
    background: #eab308;
}

.simon-btn--active,
.simon-btn:active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 20px currentColor;
}

/* Wordle */
.wordle-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 auto 1rem;
    width: fit-content;
}

.wordle-row {
    display: flex;
    gap: 6px;
}

.wordle-cell {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--g-font-retro);
    font-size: 0.8rem;
    color: #fff;
    border: 2px solid var(--g-border);
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 700;
}

.wordle-cell--correct {
    background: #16a34a;
    border-color: #16a34a;
}

.wordle-cell--present {
    background: #ca8a04;
    border-color: #ca8a04;
}

.wordle-cell--absent {
    background: #3f3f46;
    border-color: #3f3f46;
}

.wordle-cell--active {
    border-color: var(--g-text-muted);
}

.wordle-keyboard {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.wordle-kb-row {
    display: flex;
    gap: 4px;
}

.wordle-key {
    min-width: 32px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #52525b;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0 8px;
    transition: background 0.15s;
}

.wordle-key:hover {
    background: #71717a;
}

.wordle-key--wide {
    min-width: 56px;
    font-size: 0.65rem;
}

.wordle-key--correct {
    background: #16a34a;
}

.wordle-key--present {
    background: #ca8a04;
}

.wordle-key--absent {
    background: #27272a;
}

/* ── Game Result Overlay ── */
.game-result {
    text-align: center;
    padding: 2rem;
}

.game-result__score {
    font-family: var(--g-font-retro);
    font-size: 2rem;
    color: var(--g-neon-blue);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(0, 212, 255, 0.5);
}

.game-result__label {
    font-size: 0.9rem;
    color: var(--g-text-muted);
    margin-bottom: 1.5rem;
}

.game-result__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.game-result__btn {
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.game-result__btn--primary {
    background: linear-gradient(135deg, var(--g-neon-blue), #0099cc);
    color: #fff;
}

.game-result__btn--primary:hover {
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.5);
}

.game-result__btn--secondary {
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    color: var(--g-text);
}

.game-result__btn--secondary:hover {
    border-color: var(--g-text);
}

/* ── Timer/Counter Display ── */
.game-timer {
    font-family: var(--g-font-retro);
    font-size: 1rem;
    color: var(--g-neon-yellow);
    text-align: center;
    margin-bottom: 1rem;
}

.game-counter {
    font-family: var(--g-font-retro);
    font-size: 0.7rem;
    color: var(--g-text-muted);
    text-align: center;
    margin-bottom: 0.5rem;
}

/* ── Section titles ── */
.games-section-title {
    font-family: var(--g-font-retro);
    font-size: 0.6rem;
    color: var(--g-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--g-border);
}

/* ── Error/Empty States ── */
.games-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--g-text-muted);
    font-size: 0.9rem;
}

.games-error {
    text-align: center;
    padding: 1rem;
    color: var(--g-neon-pink);
    font-size: 0.85rem;
    background: rgba(255, 45, 149, 0.1);
    border: 1px solid rgba(255, 45, 149, 0.3);
    border-radius: var(--g-radius);
    margin-bottom: 1rem;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .games-grid {
        grid-template-columns: 1fr;
    }

    .avatar-gallery {
        grid-template-columns: repeat(5, 1fr);
    }

    .personal-bests {
        grid-template-columns: repeat(2, 1fr);
    }

    .simon-grid {
        width: 220px;
    }

    .simon-btn {
        width: 100px;
        height: 100px;
    }

    .wordle-cell {
        width: 44px;
        height: 44px;
        font-size: 0.7rem;
    }
}

/* ═══════════════════════════════════════════
   MULTIPLAYER GAMES
   ═══════════════════════════════════════════ */

/* ── Category Tabs ── */
.games-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.games-cat-tab {
    background: var(--g-bg-card);
    border: 1px solid var(--g-border);
    color: var(--g-text-muted);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
}

.games-cat-tab:hover {
    border-color: var(--g-neon-blue);
    color: var(--g-text);
}

.games-cat-tab--active {
    background: rgba(0, 212, 255, 0.15);
    border-color: var(--g-neon-blue);
    color: var(--g-neon-blue);
}

/* ── 1v1 Badge on Game Cards ── */
.game-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, var(--g-neon-pink), #b347d9);
    color: #fff;
    font-size: 0.6rem;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* ── Lobby ── */
.mp-lobby {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
    padding: 2rem;
    text-align: center;
}

.mp-lobby__title {
    font-family: var(--g-font-retro);
    font-size: 1rem;
    color: var(--g-neon-blue);
    margin-bottom: 0.5rem;
}

.mp-lobby__subtitle {
    color: var(--g-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.mp-lobby__spinner {
    margin-bottom: 1.5rem;
}

.mp-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--g-border);
    border-top-color: var(--g-neon-blue);
    border-radius: 50%;
    animation: mp-spin 0.8s linear infinite;
}

@keyframes mp-spin {
    to {
        transform: rotate(360deg);
    }
}

.mp-lobby__status {
    color: var(--g-text);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.mp-lobby__cancel {
    background: none;
    border: 1px solid var(--g-border);
    color: var(--g-text-muted);
    padding: 0.4rem 1.2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.mp-lobby__cancel:hover {
    border-color: var(--g-neon-pink);
    color: var(--g-neon-pink);
}

.mp-back-btn {
    display: block;
    margin: 1.5rem auto 0;
    background: none;
    border: 1px solid var(--g-border);
    color: var(--g-text-muted);
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.mp-back-btn:hover {
    border-color: var(--g-neon-blue);
    color: var(--g-neon-blue);
}

/* ── Cowboy Duel ── */
.cowboy-duel {
    text-align: center;
}

.cowboy-duel__header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.cowboy-duel__player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.cowboy-duel__avatar {
    font-size: 2.5rem;
}

.cowboy-duel__name {
    font-family: var(--g-font-retro);
    font-size: 0.55rem;
    color: var(--g-text);
}

.cowboy-duel__vs {
    font-family: var(--g-font-retro);
    font-size: 0.8rem;
    color: var(--g-neon-yellow);
    text-shadow: 0 0 8px rgba(255, 230, 0, 0.5);
}

.cowboy-duel__scene {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 200px;
    margin: 0 auto 1.5rem;
    border-radius: var(--g-radius);
    overflow: hidden;
    border: 1px solid var(--g-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: linear-gradient(180deg, #1a0a2e 0%, #2d1b4e 50%, #8B6914 80%, #5C4033 100%);
    transition: background 0.3s;
}

.cowboy-duel__scene--draw {
    background: linear-gradient(180deg, #2e0a0a 0%, #4e1b1b 50%, #8B6914 80%, #5C4033 100%);
    animation: cowboy-flash 0.15s ease-out;
}

.cowboy-duel__scene--foul {
    background: linear-gradient(180deg, #1a0000 0%, #3a0000 100%) !important;
}

.cowboy-duel__scene--win {
    background: linear-gradient(180deg, #001a0a 0%, #003a1a 100%) !important;
}

@keyframes cowboy-flash {
    0% {
        filter: brightness(3);
    }

    100% {
        filter: brightness(1);
    }
}

.cowboy-duel__message {
    font-family: var(--g-font-retro);
    font-size: 1rem;
    color: var(--g-text);
    z-index: 2;
    transition: all 0.2s;
}

.cowboy-duel__message--draw {
    font-size: 1.5rem;
    color: var(--g-neon-yellow);
    text-shadow: 0 0 20px rgba(255, 230, 0, 0.8);
    animation: cowboy-pulse 0.3s ease-out;
}

@keyframes cowboy-pulse {
    0% {
        transform: scale(2);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.cowboy-duel__instruction {
    font-size: 0.8rem;
    color: var(--g-text-muted);
    margin-top: 0.5rem;
    z-index: 2;
}

.cowboy-duel__shoot-btn {
    background: linear-gradient(135deg, #DC2626, #991B1B);
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    border-radius: var(--g-radius);
    font-family: var(--g-font-retro);
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
}

.cowboy-duel__shoot-btn:hover:not(:disabled) {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.5);
    transform: scale(1.05);
}

.cowboy-duel__shoot-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Arm Wrestling ── */
.arm-wrestle {
    text-align: center;
    position: relative;
}

.arm-wrestle__header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.arm-wrestle__player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.arm-wrestle__avatar {
    font-size: 2rem;
}

.arm-wrestle__name {
    font-family: var(--g-font-retro);
    font-size: 0.5rem;
    color: var(--g-text);
}

.arm-wrestle__taps {
    font-family: var(--g-font-retro);
    font-size: 0.6rem;
    color: var(--g-neon-yellow);
}

.arm-wrestle__vs {
    font-size: 2.5rem;
}

.arm-wrestle__bar-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.arm-wrestle__label {
    font-family: var(--g-font-retro);
    font-size: 0.55rem;
    color: var(--g-text-muted);
    min-width: 60px;
}

.arm-wrestle__label--left {
    text-align: right;
}

.arm-wrestle__label--right {
    text-align: left;
}

.arm-wrestle__bar {
    flex: 1;
    height: 24px;
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.arm-wrestle__fill {
    height: 100%;
    background: linear-gradient(90deg, #FFC107, #FF8C00);
    border-radius: 12px;
    transition: width 0.08s ease-out, background 0.3s;
}

.arm-wrestle__countdown {
    font-family: var(--g-font-retro);
    font-size: 2rem;
    color: var(--g-neon-yellow);
    text-shadow: 0 0 20px rgba(255, 230, 0, 0.5);
    margin-bottom: 1rem;
    animation: countdown-pulse 1s ease-in-out infinite;
}

.arm-wrestle__countdown--go {
    color: var(--g-neon-green);
    text-shadow: 0 0 20px rgba(57, 255, 20, 0.5);
}

@keyframes countdown-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.arm-wrestle__tap-btn {
    background: linear-gradient(135deg, var(--g-neon-blue), #0099cc);
    color: #fff;
    border: none;
    padding: 1.5rem 4rem;
    border-radius: var(--g-radius);
    font-family: var(--g-font-retro);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.1s;
    letter-spacing: 1px;
    user-select: none;
    -webkit-user-select: none;
}

.arm-wrestle__tap-btn:hover:not(:disabled) {
    box-shadow: 0 0 24px rgba(0, 212, 255, 0.5);
}

.arm-wrestle__tap-btn--pressed {
    transform: scale(0.95);
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.7);
}

.arm-wrestle__tap-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.arm-wrestle__result {
    margin-top: 1.5rem;
    animation: result-in 0.5s ease-out;
}

.arm-wrestle__result-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.arm-wrestle__result-text {
    font-family: var(--g-font-retro);
    font-size: 1.2rem;
    color: var(--g-neon-yellow);
    text-shadow: 0 0 12px rgba(255, 230, 0, 0.5);
}

@keyframes result-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
        opacity: 1;
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ═══ MULTIPLAYER END BUTTONS ═══ */
.mp-end-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding: 1rem;
}

.mp-rematch-btn {
    min-width: 140px;
}

.mp-back-btn {
    min-width: 140px;
}

/* ═══ 1v1 MATCH HISTORY TABLE ═══ */
.match-history {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.85rem;
}

.match-history th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--g-neon-cyan, #00D4FF);
    padding: 0.5rem 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.match-history td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--g-text, #e0e0e0);
}

.match-history tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.match-history__winner {
    color: var(--g-neon-green, #00E676);
    font-weight: 600;
}

.match-history__loser {
    color: var(--g-text-muted, #999);
}

.match-history__empty {
    text-align: center;
    padding: 2rem;
    color: var(--g-text-muted, #999);
    font-style: italic;
}

/* ═══ RANKINGS PERIOD FILTERS ═══ */
.rankings-period-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.rankings-period-tab {
    padding: 0.35rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: transparent;
    color: var(--g-text-muted, #999);
    cursor: pointer;
    font-size: 0.8rem;
    font-family: var(--g-font-retro);
    transition: all 0.2s;
}

.rankings-period-tab:hover {
    border-color: var(--g-neon-cyan, #00D4FF);
    color: var(--g-neon-cyan, #00D4FF);
}

.rankings-period-tab--active {
    background: var(--g-neon-cyan, #00D4FF);
    color: #0B0F19;
    border-color: var(--g-neon-cyan, #00D4FF);
    font-weight: 600;
}

/* ═══ RANKINGS CATEGORY TABS ═══ */
.rankings-category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.rankings-category-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--g-text-muted, #999);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--g-font-retro);
    transition: all 0.2s;
}

.rankings-category-tab:hover {
    border-color: var(--g-neon-orange, #FF5E00);
    color: var(--g-neon-orange, #FF5E00);
}

.rankings-category-tab--active {
    background: var(--g-neon-orange, #FF5E00);
    color: #fff;
    border-color: var(--g-neon-orange, #FF5E00);
    font-weight: 600;
}
/* --- ADMIN DASHBOARD --- */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.admin-stat-card {
    background: var(--g-bg-lighter);
    border: 1px solid var(--g-border);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--g-neon-blue);
}
.admin-stat-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--g-neon-blue);
    line-height: 1;
    margin-bottom: 0.3rem;
}
.admin-stat-card__label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--g-text-muted);
    letter-spacing: 0.05em;
}
.admin-info-row {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    color: var(--g-text-muted);
    border-left: 3px solid var(--g-neon-blue);
    margin-bottom: 0.5rem;
}

/* --- ACTIVITY FEED --- */
.activity-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--g-border);
    font-size: 0.8rem;
}
.activity-item__icon { font-size: 1.1rem; flex-shrink: 0; }
.activity-item__user { color: var(--g-neon-blue); font-weight: 600; min-width: 80px; }
.activity-item__action { color: var(--g-text); min-width: 60px; }
.activity-item__detail { color: var(--g-text-muted); flex: 1; }
.activity-item__time { color: var(--g-text-muted); font-size: 0.7rem; white-space: nowrap; }

/* --- MOTD BANNER --- */
.motd-banner {
    background: linear-gradient(135deg, rgba(255,107,53,0.15), rgba(0,229,255,0.1));
    border: 1px solid rgba(255,107,53,0.3);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    color: var(--g-text);
    text-align: center;
    margin-bottom: 1rem;
}

/* --- PLAYER CARD OVERLAY --- */
.player-card-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    animation: overlayFadeIn 0.25s ease-out;
}

@keyframes overlayFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.player-card-modal {
    background: var(--g-bg);
    border: 1px solid var(--g-border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- THEME GALLERY --- */
.theme-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}
.theme-option {
    background: var(--g-bg-lighter);
    border: 2px solid var(--g-border);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.theme-option:hover { border-color: var(--g-neon-blue); transform: translateY(-2px); }
.theme-option--active { border-color: var(--g-neon-orange); box-shadow: 0 0 12px rgba(255,107,53,0.3); }
.theme-option__name { font-weight: 700; font-size: 0.9rem; color: var(--g-text); margin-bottom: 0.3rem; }
.theme-option__colors { font-size: 0.65rem; color: var(--g-text-muted); font-family: monospace; }

/* --- AVATAR PICKER IN PROFILE --- */
.avatar-picker {
    background: var(--g-bg-lighter);
    border: 1px solid var(--g-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- NOTIFICATION BELL --- */
.notif-bell { position: relative; cursor: pointer; font-size: 1.2rem; transition: transform 0.2s; }
.notif-bell:hover { transform: scale(1.15); }
.notif-bell__count {
    position: absolute;
    top: -5px; right: -8px;
    background: var(--g-neon-pink);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 50%;
    width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    animation: bellBounce 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bellBounce {
    0% { transform: scale(0); }
    60% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ═══ ENHANCED ANIMATIONS ═══ */

/* General view entrance — applied to panels/sections rendered dynamically */
@keyframes viewFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Games header avatar neon border glow */
.games-header__avatar {
    animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(0, 212, 255, 0.3); }
    50% { box-shadow: 0 0 16px rgba(0, 212, 255, 0.6), 0 0 32px rgba(0, 212, 255, 0.15); }
}

/* Admin stat cards staggered entrance */
.admin-stat-card {
    animation: cardSlideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.admin-stat-card:nth-child(1) { animation-delay: 0s; }
.admin-stat-card:nth-child(2) { animation-delay: 0.06s; }
.admin-stat-card:nth-child(3) { animation-delay: 0.12s; }
.admin-stat-card:nth-child(4) { animation-delay: 0.18s; }
.admin-stat-card:nth-child(5) { animation-delay: 0.24s; }
.admin-stat-card:nth-child(6) { animation-delay: 0.30s; }

/* Games nav tab active neon underline glow */
.games-nav__tab--active {
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    animation: tabGlow 0.3s ease-out;
}

@keyframes tabGlow {
    from {
        border-bottom-color: transparent;
        text-shadow: none;
    }
    to {
        border-bottom-color: var(--g-neon-blue);
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.4);
    }
}

/* Typing cursor blink */
.typing-char--current {
    animation: cursorBlink 0.8s steps(2) infinite;
}

@keyframes cursorBlink {
    0% { border-bottom-color: var(--g-neon-blue); }
    50% { border-bottom-color: transparent; }
}

/* MOTD banner subtle shimmer */
.motd-banner {
    background-size: 200% 100%;
    animation: motdShimmer 4s ease-in-out infinite;
}

@keyframes motdShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Rankings period/category tab active pop */
.rankings-period-tab--active,
.rankings-category-tab--active {
    animation: tabPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tabPop {
    0% { transform: scale(0.9); }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Countdown timer pulse improvement — more dramatic */
@keyframes countdown-pulse {
    0%, 100% {
        transform: scale(1);
        text-shadow: 0 0 8px rgba(0, 212, 255, 0.3);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 0 0 20px rgba(0, 212, 255, 0.7), 0 0 40px rgba(0, 212, 255, 0.3);
    }
}

/* Cowboy duel draw message — more impactful */
@keyframes cowboy-pulse {
    0% {
        transform: scale(2.5);
        opacity: 0;
        text-shadow: 0 0 40px rgba(255, 230, 0, 0.8);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 20px rgba(255, 230, 0, 0.5);
    }
    100% {
        transform: scale(1);
        opacity: 1;
        text-shadow: 0 0 10px rgba(255, 230, 0, 0.3);
    }
}

/* Smooth focus glow for all games inputs */
.profile-setup__input:focus,
.typing-input:focus {
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.25), 0 0 24px rgba(0, 212, 255, 0.08);
    transition: box-shadow 0.3s, border-color 0.3s;
}

/* Preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
