/* ================================================
   GAME NIGHT — GLOBAL STYLES
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0f0820;
    --bg2: #1a0f2e;
    --surface: #2a1a4a;
    --border: #3d2b5f;
    --text: #f0e6ff;
    --muted: #9d8fb5;
    --pink: #ff6b9d;
    --teal: #4ecdc4;
    --yellow: #ffe66d;
    --mint: #a8e6cf;

    /* ── Extended palette ── */
    --gn-bg-deep: #0a0518;
    --gn-gold: #f0a500;
    --gn-red: #e74c3c;
    --gn-violet: #7c5cbf;

    /* ── Glass surfaces ── */
    --gn-surface-glass: rgba(42, 26, 74, 0.55);
    --gn-surface-glass-strong: rgba(42, 26, 74, 0.75);
    --gn-border-glass: rgba(240, 230, 255, 0.08);
    --gn-border-glow: rgba(240, 230, 255, 0.15);

    /* ── Glass recipe ── */
    --gn-glass-blur: blur(14px);
    --gn-glass-radius: 16px;

    /* ── Layout ── */
    --header-h: 45px;

    /* ── Glow values ── */
    --gn-glow-pink: rgba(255, 107, 157, 0.4);
    --gn-glow-teal: rgba(78, 205, 196, 0.4);
    --gn-glow-yellow: rgba(255, 230, 109, 0.35);

    /* ── Shadow system ── */
    --gn-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --gn-shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --gn-shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --gn-shadow-glow-pink: 0 0 30px rgba(255, 107, 157, 0.15), 0 0 60px rgba(255, 107, 157, 0.05);
    --gn-shadow-glow-teal: 0 0 30px rgba(78, 205, 196, 0.15), 0 0 60px rgba(78, 205, 196, 0.05);
    --gn-shadow-glow-yellow: 0 0 30px rgba(255, 230, 109, 0.12), 0 0 60px rgba(255, 230, 109, 0.04);
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: 'Quicksand', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Shared Start Game button (FakeArtist style) */
.game-start-btn {
    width: 100%;
    background: var(--start-bg);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-family: 'Cabin Sketch', cursive;
    font-size: 22px;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 4px 20px rgba(var(--start-rgb), .4);
}

.game-start-btn:hover:not(:disabled) {
    transform: translateY(-4px);
    box-shadow:
        0 8px 30px rgba(var(--start-rgb), .6),
        0 0 0 2px rgba(var(--start-rgb), .3),
        0 16px 50px rgba(var(--start-rgb), .25);
}

.game-start-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* ── Glass utility classes ── */
.glass {
    background: var(--gn-surface-glass);
    backdrop-filter: var(--gn-glass-blur);
    -webkit-backdrop-filter: var(--gn-glass-blur);
    border: 1px solid var(--gn-border-glass);
}

.glass-strong {
    background: var(--gn-surface-glass-strong);
    backdrop-filter: var(--gn-glass-blur);
    -webkit-backdrop-filter: var(--gn-glass-blur);
    border: 1px solid var(--gn-border-glow);
}

.glass-subtle {
    background: rgba(42, 26, 74, 0.35);
    backdrop-filter: var(--gn-glass-blur);
    -webkit-backdrop-filter: var(--gn-glass-blur);
    border: 1px solid var(--gn-border-glass);
}

/* ── Accent button with glow ── */
.btn-primary-accent {
    background: linear-gradient(135deg, var(--gn-btn-from, var(--pink)), var(--gn-btn-to, #e05090));
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .3s;
    box-shadow: 0 4px 20px var(--gn-btn-glow, var(--gn-glow-pink));
}

.btn-primary-accent:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--gn-btn-glow, var(--gn-glow-pink));
}

.btn-primary-accent:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* Language switcher */
.layout-wrapper {
    position: relative;
    display: block;
}

.layout-wrapper>main {
    display: block;
}

.language-switcher-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
    background: rgba(15, 8, 32, 0.9);
    border-bottom: 1px solid var(--border);
}

.language-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 13px;
    color: var(--muted);
}

.language-label {
    margin-right: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-link {
    color: var(--muted);
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 12px;
    transition: color .2s, background .2s, border-color .2s;
}

.lang-link:hover {
    color: var(--text);
    background: var(--surface);
    border-color: var(--border);
}

.lang-link.active {
    color: var(--teal);
    background: rgba(78, 205, 196, 0.1);
    border-color: rgba(78, 205, 196, 0.3);
}

.lang-sep {
    display: none;
}

/* ── Header auto-hide (toggled via JS on body) ── */
body.gn-header-hidden {
    --header-h: 0px;
}

body.gn-header-hidden .game-header {
    height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    pointer-events: none;
}

.gn-header-toggle {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 101;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(6px);
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.gn-header-toggle:hover {
    opacity: 1;
}

/* ── HOME PAGE ── */
.container {
    width: min(90vw, 1600px);
    margin: 0 auto;
    padding: 0 5vw;
    position: relative;
    z-index: 1;
}

/* Particle canvas — fixed behind all content */
.particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 64px;
    margin-top: 30px;
    animation: fadeInDown .6s ease;
}

.logo {
    font-family: 'Cabin Sketch', cursive;
    font-size: 72px;
    font-weight: 700;
    background: linear-gradient(
        135deg,
        var(--pink) 0%,
        #c77dff 25%,
        var(--teal) 50%,
        var(--yellow) 75%,
        var(--pink) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: 3px;
    animation: shimmerGradient 6s ease-in-out infinite;
}

.tagline {
    font-size: 18px;
    color: var(--muted);
    font-weight: 500;
    letter-spacing: 1px;
}

.tagline span {
    color: var(--yellow);
    font-weight: 700;
}

/* Stats */
.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 32px 0 48px;
    padding: 20px 32px;
    animation: fadeIn .8s ease .2s backwards;
    border-radius: 16px;
    background: rgba(42, 26, 74, 0.35);
    backdrop-filter: var(--gn-glass-blur);
    -webkit-backdrop-filter: var(--gn-glass-blur);
    border: 1px solid var(--gn-border-glass);
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 32px;
    font-weight: 700;
    font-family: 'Cabin Sketch', cursive;
    color: var(--yellow);
    display: block;
}

.stat-label {
    font-size: 12px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Quick Join */
.quick-join {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 6px 6px 6px 20px;
    border-radius: 50px;
    margin-bottom: 1rem;
    box-shadow: var(--gn-shadow-md);
    background: var(--gn-surface-glass);
    backdrop-filter: var(--gn-glass-blur);
    -webkit-backdrop-filter: var(--gn-glass-blur);
    border: 1px solid var(--gn-border-glass);
}

.quick-join-label {
    font-family: 'Cabin Sketch', cursive;
    font-size: 1.05rem;
    color: var(--text);
    white-space: nowrap;
}

.quick-join-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 1 auto;
    min-width: 0;
}

.quick-join-input {
    flex: 1;
    min-width: 100px;
    max-width: 180px;
}

.quick-join-code {
    width: 140px !important;
    flex: 0 0 auto;
}

.quick-join-btn {
    font-family: 'Cabin Sketch', cursive;
    padding: 0.55rem 1.2rem;
    background: linear-gradient(135deg, var(--teal), #3dbdb5);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: opacity 0.2s, transform 0.2s;
}

.quick-join-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.quick-join-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quick-join-error {
    width: 100%;
    margin: 0.25rem 0 0;
}

/* Game Grid */
.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 4px 0 20px;
}

.game-card {
    background: var(--gn-surface-glass);
    backdrop-filter: var(--gn-glass-blur);
    -webkit-backdrop-filter: var(--gn-glass-blur);
    border: 1px solid var(--gn-border-glass);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    animation: fadeInUp .5s ease backwards;
}

.game-card:nth-child(1) {
    animation-delay: .1s;
}

.game-card:nth-child(2) {
    animation-delay: .2s;
}

.game-card:nth-child(3) {
    animation-delay: .3s;
}

.game-card:nth-child(4) {
    animation-delay: .4s;
}


.game-card.pink {
    color: var(--pink);
}

.game-card.teal {
    color: var(--teal);
}

.game-card.yellow {
    color: var(--yellow);
}

.game-card.mint {
    color: var(--mint);
}

.game-card.blue {
    color: #7c9ef5;
}

.game-card.gold {
    color: #f0a500;
}

.game-card.red {
    color: #e74c3c;
}

.game-card.slate {
    color: #5d6d7e;
}

.game-card.violet {
    color: #9b59b6;
}

.game-card.rose {
    color: #e84393;
}

.game-card.emerald {
    color: #2ecc71;
}

.game-card.orange {
    color: #e67e22;
}

.game-card.indigo {
    color: #5c6bc0;
}

.game-card.plum {
    color: #8e44ad;
}

.game-card:hover {
    border-color: currentColor;
    box-shadow: var(--gn-shadow-lg), 0 0 30px rgba(var(--card-accent-rgb, 255, 107, 157), 0.12);
    transform: translateY(-6px);
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 0%, currentColor, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.game-card:hover::before {
    opacity: 0.08;
}

.game-header {
    padding: 28px 24px 20px;
}

.game-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 12px;
    display: block;
    border-radius: 14px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3));
}

.game-title {
    font-size: 24px;
    font-weight: 700;
    font-family: 'Cabin Sketch', cursive;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.game-desc {
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.game-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tag {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
}

.game-card.pink .tag {
    background: rgba(255, 107, 157, .15);
    border-color: rgba(255, 107, 157, .3);
    color: var(--pink);
}

.game-card.teal .tag {
    background: rgba(78, 205, 196, .15);
    border-color: rgba(78, 205, 196, .3);
    color: var(--teal);
}

.game-card.yellow .tag {
    background: rgba(255, 230, 109, .15);
    border-color: rgba(255, 230, 109, .3);
    color: var(--yellow);
}

.game-card.mint .tag {
    background: rgba(168, 230, 207, .15);
    border-color: rgba(168, 230, 207, .3);
    color: var(--mint);
}

.game-card.blue .tag {
    background: rgba(124, 158, 245, .15);
    border-color: rgba(124, 158, 245, .3);
    color: #7c9ef5;
}

.game-card.gold .tag {
    background: rgba(240, 165, 0, .15);
    border-color: rgba(240, 165, 0, .3);
    color: #f0a500;
}

.game-card.red .tag {
    background: rgba(231, 76, 60, .15);
    border-color: rgba(231, 76, 60, .3);
    color: #e74c3c;
}

.game-card.slate .tag {
    background: rgba(93, 109, 126, .15);
    border-color: rgba(93, 109, 126, .3);
    color: #5d6d7e;
}

.game-card.violet .tag {
    background: rgba(155, 89, 182, .15);
    border-color: rgba(155, 89, 182, .3);
    color: #9b59b6;
}

.game-card.rose .tag {
    background: rgba(232, 67, 147, .15);
    border-color: rgba(232, 67, 147, .3);
    color: #e84393;
}

.game-card.emerald .tag {
    background: rgba(46, 204, 113, .15);
    border-color: rgba(46, 204, 113, .3);
    color: #2ecc71;
}

.game-card.orange .tag {
    background: rgba(230, 126, 34, .15);
    border-color: rgba(230, 126, 34, .3);
    color: #e67e22;
}

.game-card.indigo .tag {
    background: rgba(92, 107, 192, .15);
    border-color: rgba(92, 107, 192, .3);
    color: #5c6bc0;
}

.game-card.plum .tag {
    background: rgba(142, 68, 173, .15);
    border-color: rgba(142, 68, 173, .3);
    color: #8e44ad;
}

.game-card.crimson {
    color: #dc2626;
}

.game-card.crimson .tag {
    background: rgba(220, 38, 38, .15);
    border-color: rgba(220, 38, 38, .3);
    color: #dc2626;
}

.game-card.filtered-out {
    display: none;
}

/* Player Count Filter Bar */
.player-filter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.75rem 0;
    margin-bottom: 0.5rem;
}

.player-filter-label {
    font-family: 'Quicksand', sans-serif;
    color: var(--muted);
    font-size: 0.9rem;
    white-space: nowrap;
}

.player-filter-buttons {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: 'Quicksand', sans-serif;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: var(--text);
    color: var(--text);
}

.filter-btn.active {
    background: var(--surface);
    border-color: var(--teal);
    color: var(--teal);
    font-weight: 600;
}

/* Featured Spotlight */
.game-card.is-featured {
    display: none;
}

.featured-spotlight {
    margin-bottom: 32px;
}

.featured-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gn-gold);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.featured-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(240, 165, 0, 0.3), transparent);
}

.featured-card {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    border: 1px solid rgba(240, 165, 0, 0.2);
    border-radius: 20px;
    box-shadow: 0 0 40px rgba(240, 165, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.featured-icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.featured-info {
    flex: 1;
    min-width: 0;
}

.featured-title {
    font-family: 'Cabin Sketch', cursive;
    font-size: 1.8rem;
    color: var(--text);
    margin: 0 0 8px;
}

.featured-desc {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px;
}

.featured-meta {
    font-size: 0.85rem;
    color: var(--muted);
}

.featured-cta {
    flex-shrink: 0;
    white-space: nowrap;
    font-family: 'Cabin Sketch', cursive;
    padding: 12px 28px;
    font-size: 1.1rem;
}

@media (max-width: 640px) {
    .featured-card {
        flex-direction: column;
        text-align: center;
        padding: 24px;
        gap: 20px;
    }

    .featured-icon {
        width: 60px;
        height: 60px;
    }

    .featured-title {
        font-size: 1.4rem;
    }

    .featured-cta {
        width: 100%;
    }
}

.game-footer {
    padding: 16px 24px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.players {
    font-size: 13px;
    color: var(--muted);
}

.btn-play {

    color: var(--bg);
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.btn-play:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
}

.btn-play:active {
    transform: translateY(0);
}

.btn-soon {
    opacity: .65;
    cursor: default;
}

.btn-soon:hover {
    transform: none;
}

/* How It Works */
.how-it-works {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    animation: fadeIn 1s ease .5s backwards;
}

.how-it-works h2 {
    font-family: 'Cabin Sketch', cursive;
    font-size: 28px;
    margin-bottom: 24px;
    color: var(--yellow);
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.step-num {
    font-family: 'Cabin Sketch', cursive;
    font-size: 48px;
    font-weight: 700;
    color: var(--pink);
    opacity: .3;
    margin-bottom: 8px;
}

.step-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.step-desc {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.5;
}

/* Footer */
.footer {
    margin-top: 64px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 13px;
}

.footer-sections {
    display: flex;
    gap: 48px;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-section {
    text-align: center;
    max-width: 280px;
}

.footer-heading {
    font-family: 'Cabin Sketch', cursive;
    font-size: 18px;
    color: var(--text);
    margin: 0 0 8px;
}

.footer-desc {
    font-size: 13px;
    color: var(--muted);
    margin: 0 0 12px;
    line-height: 1.5;
}

.footer-email-link {
    display: inline-block;
    color: var(--teal);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all .2s ease;
}

.footer-email-link:hover {
    background: rgba(78, 205, 196, .1);
    border-color: var(--teal);
}

.footer-pix {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px 12px;
}

.pix-label {
    font-weight: 700;
    color: #32bcad;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.pix-key {
    font-size: 13px;
    color: var(--text);
    background: none;
}

.pix-copy-btn {
    background: linear-gradient(135deg, var(--teal), #3ba89f);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    transition: opacity .2s ease;
}

.pix-copy-btn:hover {
    opacity: .85;
}

.footer-donate-options {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.footer-bmac-link {
    display: inline-block;
    color: #ffdd00;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border: 1px solid rgba(255, 221, 0, .3);
    border-radius: 12px;
    transition: all .2s ease;
}

.footer-bmac-link:hover {
    background: rgba(255, 221, 0, .1);
    border-color: #ffdd00;
}

.footer-stripe-link {
    display: inline-block;
    color: #635bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border: 1px solid rgba(99, 91, 255, .3);
    border-radius: 12px;
    transition: all .2s ease;
}

.footer-stripe-link:hover {
    background: rgba(99, 91, 255, .1);
    border-color: #635bff;
}

.footer-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: center;
}

@media (max-width: 600px) {
    .footer-sections {
        flex-direction: column;
        gap: 32px;
        align-items: center;
    }

    .footer-pix {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ── MODAL ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    animation: fadeIn .2s ease;
    padding: 20px;
}

.modal-box {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 24px;
    padding: 36px;
    width: 100%;
    max-width: 440px;
    position: relative;
    animation: scaleIn .3s cubic-bezier(.34, 1.56, .64, 1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, .1);
    border: none;
    color: var(--muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, .2);
    color: var(--text);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-icon {
    width: 56px;
    height: 56px;
    display: block;
    margin-bottom: 8px;
    border-radius: 12px;
}

.modal-header h2 {
    font-family: 'Cabin Sketch', cursive;
    font-size: 28px;
    color: var(--pink);
}

.modal-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
}

.join-modal-back {
    display: block;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    margin-top: 8px;
    transition: color .2s;
}

.join-modal-back:hover {
    color: var(--text);
}

.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, .05);
    border-radius: 12px;
    padding: 4px;
}

.tab-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--muted);
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.tab-btn.active {
    background: var(--pink);
    color: var(--bg);
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.form-input {
    background: rgba(255, 255, 255, .07);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    transition: border-color .2s;
    width: 100%;
}

.form-input:focus {
    border-color: var(--pink);
}

.code-input {
    font-family: 'Cabin Sketch', cursive;
    font-size: 28px;
    letter-spacing: 6px;
    text-align: center;
    text-transform: uppercase;
}

.modal-error {
    background: rgba(255, 107, 107, .15);
    border: 1px solid rgba(255, 107, 107, .4);
    border-radius: 8px;
    padding: 10px 14px;
    color: #ff9090;
    font-size: 13px;
}

.btn-modal-submit {
    background: linear-gradient(135deg, var(--pink), #e05090);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    width: 100%;
    box-shadow: 0 4px 20px rgba(255, 107, 157, .3);
}

.btn-modal-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 157, .4);
}

.btn-modal-submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* ── RESUME BANNER ── */
.resume-banner {
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(42, 26, 74, 0.97), rgba(26, 15, 46, 0.97));
    border-bottom: 2px solid var(--teal);
    backdrop-filter: blur(8px);
    animation: slideDown .3s ease;
}

.resume-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.resume-icon {
    font-size: 24px;
}

.resume-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.resume-text strong {
    font-size: 15px;
    color: var(--text);
}

.resume-text span {
    font-size: 13px;
    color: var(--muted);
}

.resume-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-resume {
    background: linear-gradient(135deg, var(--teal), #3ab0a8);
    color: var(--bg);
    border: none;
    padding: 8px 20px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
}

.btn-resume:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.3);
}

.btn-dismiss {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 16px;
    border-radius: 12px;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
}

.btn-dismiss:hover {
    border-color: var(--muted);
    color: var(--text);
}

/* ── Shared turn indicator glow pulse ── */
@keyframes gn-tile-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 0 1px var(--tile-glow-color, rgba(240, 165, 0, 0.5)),
                    0 0 8px var(--tile-glow-color, rgba(240, 165, 0, 0.15));
    }
    50% {
        box-shadow: 0 0 0 2px var(--tile-glow-color, rgba(240, 165, 0, 0.7)),
                    0 0 20px var(--tile-glow-color, rgba(240, 165, 0, 0.3));
    }
}

/* ── Shared holographic card shimmer ── */
@keyframes gn-card-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .resume-banner {
        animation: none;
        transform: none;
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .resume-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px;
    }

    .resume-actions {
        justify-content: flex-end;
    }
}

/* ── TOAST ── */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    border: 2px solid var(--teal);
    border-radius: 16px;
    padding: 14px 24px;
    color: var(--teal);
    font-weight: 700;
    font-size: 15px;
    z-index: 200;
    animation: slideUp .3s ease;
    white-space: nowrap;
}

/* ── ERROR / MISC ── */
.error-state {
    text-align: center;
    padding: 100px 20px;
}

.error-msg {
    color: var(--pink);
    font-size: 18px;
    margin-bottom: 24px;
}

.btn-home {
    display: inline-block;
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: border-color .2s;
}

.btn-home:hover {
    border-color: var(--pink);
    color: var(--text);
}

#blazor-error-ui {
    background: #b32121;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 16px;
    position: fixed;
    z-index: 999;
    display: none;
    color: white;
    font-size: 13px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: right;
}

/* ── ANIMATIONS ── */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .header {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .game-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stats,
    .how-it-works,
    .modal-overlay {
        animation: none;
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-box {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

@keyframes shimmerGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .logo { animation: none; background-position: 0% 50%; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .toast {
        animation: none;
        transform: translateX(-50%);
        opacity: 1;
    }
}

/* ── Shared Lobby Status Box ── */

.lobby-status {
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

/* ── Spectator Banner ── */

.spectator-banner {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: rgba(78, 205, 196, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    color: var(--teal);
    font-size: 0.9rem;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
}

.spectator-row {
    opacity: 0.65;
}

/* ── VOICE LINK SECTION (shared across all lobbies) ── */

.voice-link-section {
    width: 100%;
    margin: 12px 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(42, 26, 74, 0.4);
    box-sizing: border-box;
}

.voice-link-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.voice-link-input {
    flex: 1;
    padding: 8px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
}

.voice-link-input::placeholder {
    color: var(--muted);
}

.voice-link-save-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--teal), #3ab5ad);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.voice-link-save-btn:hover:not(:disabled) {
    opacity: 0.9;
}

.voice-link-save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.voice-link-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.voice-link-icon {
    font-size: 16px;
    flex-shrink: 0;
}

@keyframes waveformPulse {
    0%, 100% { height: 4px; }
    50% { height: 14px; }
}

.waveform-icon {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 16px;
    width: 20px;
}

.wv-bar {
    width: 3px;
    background: var(--teal);
    border-radius: 2px;
    animation: waveformPulse 0.9s ease-in-out infinite;
}

.wv-bar:nth-child(1) { animation-delay: 0ms; }
.wv-bar:nth-child(2) { animation-delay: 150ms; }
.wv-bar:nth-child(3) { animation-delay: 300ms; }
.wv-bar:nth-child(4) { animation-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
    .wv-bar {
        animation: none;
        height: 8px; /* freeze at mid-height */
    }
}

.voice-link-url {
    color: var(--teal);
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.voice-link-url:hover {
    text-decoration: underline;
}

.voice-link-clear-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--muted);
    padding: 2px 8px;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    transition: color 0.2s;
}

.voice-link-clear-btn:hover {
    color: var(--pink);
}

/* ── SHARED LOBBY STYLES ── */

/* Player Avatar */
.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--avatar-from), var(--avatar-to));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-avatar-initial {
    font-family: 'Cabin Sketch', cursive;
    font-size: 18px;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    line-height: 1;
}

@media (max-width: 480px) {
    .player-avatar {
        width: 36px;
        height: 36px;
    }

    .player-avatar-initial {
        font-size: 16px;
    }
}

/* Lobby Player Card */
.lobby-player-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(42, 26, 74, 0.55);
    border-radius: 12px;
    border: 1px solid var(--border);
    animation: slideInPlayer 0.35s ease-out both;
}

.lobby-player-card:nth-child(1) { animation-delay: 0ms; }
.lobby-player-card:nth-child(2) { animation-delay: 60ms; }
.lobby-player-card:nth-child(3) { animation-delay: 120ms; }
.lobby-player-card:nth-child(4) { animation-delay: 180ms; }
.lobby-player-card:nth-child(5) { animation-delay: 240ms; }

/* Slide-in animation */
@keyframes slideInPlayer {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lobby-player-card {
        animation: none;
        opacity: 1;
    }
}

/* Toggle Switch */
.ts-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ts-toggle input {
    display: none;
}

.ts-track {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}

.ts-toggle input:checked + .ts-track {
    background: var(--teal);
}

.ts-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform 0.25s ease;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.ts-toggle input:checked + .ts-track .ts-thumb {
    transform: translateX(20px);
}

.ts-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    color: var(--text);
    user-select: none;
}

@media (prefers-reduced-motion: reduce) {
    .ts-track,
    .ts-thumb {
        transition: none;
    }
}

/* Lobby Room Code */
.lobby-room-code {
    text-align: center;
    padding: 16px;
    background: rgba(42, 26, 74, 0.4);
    border-radius: 12px;
    border: 1px solid var(--border);
    width: 100%;
}

.lobby-room-code-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.lobby-room-code-value {
    font-family: 'Cabin Sketch', cursive;
    font-size: 32px;
    color: var(--text);
    letter-spacing: 4px;
    display: block;
    margin: 6px 0;
}

.lobby-room-code-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 8px;
}

.lobby-code-btn {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--muted);
    padding: 6px 14px;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.lobby-code-btn:hover {
    color: var(--text);
    background: var(--surface);
}

/* Lobby Shared Utility Styles */
.lobby-player-name {
    flex: 1;
    color: var(--text);
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.lobby-badge-host {
    font-size: 12px;
    color: var(--yellow);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lobby-badge-you {
    font-size: 12px;
    color: var(--teal);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lobby-kick-btn {
    color: var(--pink);
    background: transparent;
    font-size: 12px;
    border: none;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    padding: 4px 8px;
}

.lobby-kick-btn:hover {
    opacity: 0.7;
}

/* ── Switch Game Picker ── */
.switch-game-btn {
    position: fixed;
    top: calc(50% + 64px);
    right: 20px;
    z-index: 70;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
}

.switch-game-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    color: var(--pink);
    border-color: var(--pink);
}

.switch-game-modal {
    max-width: 560px;
}

.switch-game-title {
    font-family: 'Cabin Sketch', cursive;
    font-size: 1.6rem;
    color: var(--text);
    text-align: center;
    margin-bottom: 1.2rem;
}

.switch-game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.8rem;
}

.switch-game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.6rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    color: var(--text);
    transition: border-color 0.2s, transform 0.15s, background 0.2s;
    position: relative;
}

.switch-game-card:hover:not(:disabled) {
    border-color: var(--pink);
    transform: translateY(-2px);
    background: var(--surface);
}

.switch-game-card:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.switch-game-card.current {
    border-color: var(--teal);
    border-style: dashed;
}

.switch-game-icon {
    width: 48px;
    height: 48px;
}

.switch-game-name {
    font-family: 'Cabin Sketch', cursive;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.2;
}

.switch-game-current-tag {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 0.65rem;
    background: var(--teal);
    color: var(--bg);
    padding: 1px 6px;
    border-radius: 8px;
    font-weight: 700;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .container {
        padding: 40px 20px;
    }

    .logo {
        font-size: 48px;
    }

    .tagline {
        font-size: 16px;
    }

    .stats {
        gap: 24px;
    }

    .stat-num {
        font-size: 24px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .modal-box {
        padding: 24px;
    }

    .switch-game-btn {
        top: auto;
        bottom: 68px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .switch-game-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }

    .quick-join {
        flex-direction: column;
        align-items: center;
    }

    .quick-join-form {
        flex-wrap: wrap;
        justify-content: center;
    }

    .quick-join-input {
        max-width: none;
        flex: 1;
    }

    .quick-join-btn {
        flex: 0 0 auto;
    }

    /* Prevent iOS Safari auto-zoom on input focus (requires font-size >= 16px) */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }

    /* Lobby keyboard safety — ensure Start/Join buttons stay above keyboard */
    .lobby,
    .fa-lobby,
    .jo-lobby,
    .tt-lobby,
    .wv-lobby,
    .cn-lobby,
    .cp-lobby,
    .sk-lobby,
    .sf-lobby,
    .df-lobby,
    .ll-lobby,
    .ch-lobby,
    .ww-lobby,
    .on-lobby,
    .di-lobby,
    .gn-lobby {
        padding-bottom: 2rem;
    }
}