/* ========== GAMES PAGE ========== */

.games-page {
    max-width: 900px;
    margin: 0 auto;
}

.games-header {
    text-align: center;
    margin-bottom: 2rem;
}

.games-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 0.5rem;
}

.games-header p {
    color: var(--muted);
}

.games-grid {
    display: grid;
    gap: 1.5rem;
}

.game-card-lg {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 200ms ease, box-shadow 200ms ease;
    border: 1px solid var(--line);
}

.game-card-lg:hover {
    transform: translateY(-3px);
}

.game-card-connect4 {
    background: linear-gradient(135deg, #114b64 0%, #0b3648 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(11, 54, 72, 0.3);
}

.game-card-connect4:hover {
    box-shadow: 0 16px 40px rgba(11, 54, 72, 0.4);
}

.game-card-typing {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgb(from var(--mud-palette-primary) r g b / 0.3);
}

.game-card-typing:hover {
    box-shadow: 0 16px 40px rgb(from var(--mud-palette-primary) r g b / 0.4);
}

.game-card-word {
    background: linear-gradient(135deg, #f1a54b 0%, #d65d2d 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(214, 93, 45, 0.35);
}

.game-card-word:hover {
    box-shadow: 0 16px 40px rgba(214, 93, 45, 0.45);
}

.game-card-math {
    background: linear-gradient(135deg, #2e508b 0%, #1b2f55 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(27, 47, 85, 0.35);
}

.game-card-math:hover {
    box-shadow: 0 16px 40px rgba(27, 47, 85, 0.45);
}

.game-card-ludo {
    background: linear-gradient(135deg, #2f8a57 0%, #1e5a7c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(28, 92, 92, 0.35);
}

.game-card-ludo:hover {
    box-shadow: 0 16px 40px rgba(28, 92, 92, 0.45);
}

.game-card-ttt {
    background: linear-gradient(135deg, #2f2f39 0%, #111827 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(14, 20, 35, 0.4);
}

.game-card-ttt:hover {
    box-shadow: 0 16px 40px rgba(14, 20, 35, 0.55);
}

.game-card-rps {
    background: linear-gradient(135deg, #7a3d1c 0%, #b96a2c 100%);
    color: #fff;
    border: none;
    box-shadow: 0 12px 30px rgba(122, 61, 28, 0.35);
}

.game-card-rps:hover {
    box-shadow: 0 16px 40px rgba(122, 61, 28, 0.45);
}

.game-card-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1rem;
}

.game-preview-c4 {
    display: grid;
    grid-template-columns: repeat(4, 20px);
    gap: 4px;
}

.preview-chip {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.chip-red {
    background: radial-gradient(circle at 35% 35%, #ff8e8e 0%, #e14a4a 70%);
}

.chip-gold {
    background: radial-gradient(circle at 35% 35%, #ffe28a 0%, #f0b93b 70%);
}

.chip-empty {
    background: rgba(255, 255, 255, 0.2);
}

.game-preview-typing {
    text-align: center;
}

.game-preview-word {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.word-tile {
    width: 26px;
    height: 34px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.25);
}

.word-tile.accent {
    background: rgba(255, 255, 255, 0.45);
    color: #8a2c14;
}

.game-preview-math {
    display: grid;
    gap: 0.4rem;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.75rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
}

.math-task {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-preview-ludo {
    display: grid;
    grid-template-columns: repeat(2, 24px);
    gap: 6px;
}

.game-preview-ludo .ludo-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.ludo-dot.red {
    background: radial-gradient(circle at 35% 35%, #ff8e8e 0%, #e14a4a 70%);
}

.ludo-dot.blue {
    background: radial-gradient(circle at 35% 35%, #8ac5ff 0%, #2f6fdc 70%);
}

.ludo-dot.yellow {
    background: radial-gradient(circle at 35% 35%, #ffe28a 0%, #f0b93b 70%);
}

.ludo-dot.green {
    background: radial-gradient(circle at 35% 35%, #8de1b1 0%, #2f8a57 70%);
}

.game-preview-ttt {
    display: grid;
    grid-template-columns: repeat(3, 22px);
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 700;
}

.game-preview-ttt span {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.game-preview-rps {
    display: grid;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.game-preview-rps span {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.typing-line {
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.9rem;
}

.t-done {
    color: rgba(255, 255, 255, 0.95);
}

.t-cursor {
    color: var(--accent-warm);
    animation: home-cursor-blink 1s step-end infinite;
}

.t-pending {
    color: rgba(255, 255, 255, 0.4);
}

.typing-stats-mini {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.75rem;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.game-card-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.game-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.game-card-header h2 {
    font-size: 1.3rem;
    margin: 0;
    font-family: inherit;
}

.game-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-badge-strategy {
    background: rgba(255, 255, 255, 0.2);
}

.game-badge-speed {
    background: rgba(242, 165, 65, 0.3);
    color: #fff;
}

.game-badge-word {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.game-badge-math {
    background: rgba(84, 122, 227, 0.35);
    color: #fff;
}

.game-badge-party {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.game-badge-classic {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.game-badge-fast {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.game-card-lg p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.game-card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.game-meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
}

.game-meta-item svg {
    opacity: 0.7;
}

.game-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.75rem;
    font-weight: 600;
    color: #fff;
}

.game-card-cta svg {
    transition: transform 200ms ease;
}

.game-card-lg:hover .game-card-cta svg {
    transform: translateX(4px);
}

.games-coming-soon {
    margin-top: 3rem;
    text-align: center;
    padding: 2rem;
    background: var(--surface);
    border-radius: 1.25rem;
    border: 1px solid var(--line);
}

.games-coming-soon h3 {
    margin-bottom: 0.5rem;
}

.games-coming-soon > p {
    color: var(--muted);
    margin-bottom: 1.5rem;
}

.coming-soon-grid {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.coming-soon-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: rgb(from var(--mud-palette-primary) r g b / 0.06);
    border-radius: 0.75rem;
    border: 1px dashed var(--line);
    color: var(--muted);
    font-size: 0.85rem;
}

.coming-soon-icon {
    font-size: 1.5rem;
    opacity: 0.6;
}

@media (max-width: 599.98px) {
    .game-card-lg {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .game-card-visual {
        height: 100px;
    }

    .game-card-header {
        justify-content: center;
    }

    .game-card-meta {
        justify-content: center;
    }

    .game-card-cta {
        justify-content: center;
    }
}
