/* ============================================================
   JEOPARDY GAME — Premium Dark/Neon Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── Design Tokens ─── */
:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1629;
    --bg-card: #141c35;
    --bg-card-hover: #1a2340;
    --bg-glass: rgba(20, 28, 53, 0.85);

    --gold: #f5c542;
    --gold-light: #fde68a;
    --gold-glow: rgba(245, 197, 66, 0.35);
    --blue-neon: #4f8ef7;
    --blue-bright: #60a5fa;
    --purple: #8b5cf6;
    --green: #10b981;
    --red: #ef4444;
    --orange: #f97316;

    --text-primary: #f0f4ff;
    --text-secondary: #94a3b8;
    --text-muted: #475569;

    --border: rgba(79, 142, 247, 0.2);
    --border-gold: rgba(245, 197, 66, 0.4);

    --tile-bg: #1e3a8a;
    --tile-hover: #1d4ed8;
    --tile-answered: #1e293b;

    --shadow-gold: 0 0 40px rgba(245, 197, 66, 0.3);
    --shadow-blue: 0 0 30px rgba(79, 142, 247, 0.25);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.5);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    background-image:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(79, 142, 247, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 90% 80%, rgba(139, 92, 246, 0.08), transparent);
}

/* ─── Typography ─── */
h1,
h2,
h3 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
}

/* ─── Layout ─── */
.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.view {
    display: none;
    flex-direction: column;
    min-height: 100vh;
}

.view.active {
    display: flex;
}

/* ─── Header ─── */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 15px var(--gold-glow);
}

.logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.6rem;
    letter-spacing: 0.1em;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-sm);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-neon), var(--purple));
    color: white;
    box-shadow: 0 4px 15px rgba(79, 142, 247, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 142, 247, 0.5);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), #e6a510);
    color: #1a1000;
    box-shadow: 0 4px 15px var(--gold-glow);
    font-weight: 700;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.btn-success {
    background: linear-gradient(135deg, var(--green), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--red), #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border-gold);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

.btn-xl {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Cards / Glass ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color var(--transition);
}

.card:hover {
    border-color: var(--border-gold);
}

.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

/* ─── Form Elements ─── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.form-input,
.form-select,
.form-textarea {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    padding: 0.65rem 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    width: 100%;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--blue-neon);
    box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.input-row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.input-row .form-input {
    flex: 1;
}

/* ─── Tags / Chips ─── */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: rgba(79, 142, 247, 0.15);
    border: 1px solid rgba(79, 142, 247, 0.3);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--blue-bright);
}

.tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.7;
    padding: 0;
    transition: opacity var(--transition);
}

.tag-remove:hover {
    opacity: 1;
}

/* =============================================
   LANDING PAGE
   ============================================= */

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 10px) scale(0.97); }
}

@keyframes tileReveal {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes boardGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(245, 197, 66, 0.25); }
    50%      { box-shadow: 0 0 40px rgba(245, 197, 66, 0.50); }
}

@keyframes tileActive {
    0%, 100% { background: var(--tile-hover); }
    50%      { background: #2563eb; }
}

#view-home {
    padding: 0;
}

/* ── Landing Nav ── */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 2.5rem;
    background: rgba(10, 14, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    gap: 1rem;
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    flex-shrink: 0;
}

.landing-logo-icon {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--gold), #e6a510);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 12px var(--gold-glow);
}

.landing-logo-text {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.3rem;
    letter-spacing: 0.12em;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.landing-nav-links {
    display: flex;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.landing-nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    transition: color var(--transition);
}

.landing-nav-link:hover { color: var(--text-primary); }

/* ── Hero ── */
.landing-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    padding: 9rem 4rem 5rem;
    overflow: hidden;
}

.hero-bg-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.55;
    animation: orbFloat 14s ease-in-out infinite;
}

.hero-orb-1 {
    width: 600px; height: 400px;
    background: radial-gradient(ellipse, rgba(79, 142, 247, 0.25), transparent 70%);
    top: -10%; left: -15%;
    animation-duration: 16s;
}

.hero-orb-2 {
    width: 500px; height: 350px;
    background: radial-gradient(ellipse, rgba(245, 197, 66, 0.15), transparent 70%);
    top: 20%; right: -5%;
    animation-duration: 20s;
    animation-delay: -5s;
}

.hero-orb-3 {
    width: 400px; height: 300px;
    background: radial-gradient(ellipse, rgba(139, 92, 246, 0.18), transparent 70%);
    bottom: 5%; left: 30%;
    animation-duration: 18s;
    animation-delay: -9s;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 560px;
    flex-shrink: 0;
}

.hero-eyebrow {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.28em;
    color: var(--gold);
    margin-bottom: 1rem;
    opacity: 0.85;
}

.hero-headline {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1.0;
    letter-spacing: 0.02em;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-style: normal;
}

.hero-gold {
    font-style: italic;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 440px;
    margin-bottom: 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-cta-primary {
    font-size: 1rem;
    padding: 0.9rem 2rem;
    letter-spacing: 0.04em;
}

.btn-outline-hero {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.9rem 2rem;
    transition: all var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.btn-outline-hero:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.3);
}

/* ── Hero Board Preview ── */
.hero-board-preview {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.hero-board-grid {
    display: grid;
    grid-template-columns: repeat(3, 110px);
    grid-template-rows: auto repeat(5, 52px);
    gap: 6px;
    background: rgba(10, 14, 30, 0.6);
    border: 1px solid rgba(245, 197, 66, 0.18);
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 0 60px rgba(79,142,247,0.12), 0 30px 80px rgba(0,0,0,0.6);
    animation: boardGlow 4s ease-in-out infinite;
    backdrop-filter: blur(12px);
}

.hb-cat {
    background: var(--tile-bg);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--gold-light);
    padding: 0.5rem;
    text-align: center;
    min-height: 38px;
}

.hb-tile {
    background: var(--tile-bg);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.1rem;
    color: var(--gold);
    cursor: default;
    opacity: 0;
    animation: tileReveal 0.4s ease forwards var(--delay, 0s);
    transition: background var(--transition), transform var(--transition);
}

.hb-tile:hover {
    background: var(--tile-hover);
    transform: scale(1.03);
}

.hb-tile--answered {
    background: var(--tile-answered) !important;
    color: transparent;
    opacity: 1;
    animation: none;
}

.hb-tile--active {
    animation: tileReveal 0.4s ease forwards var(--delay, 0s), tileActive 2s ease-in-out 1s infinite;
}

/* ── Shared section layout ── */
.landing-section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.landing-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.landing-section-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    font-style: normal;
}

.landing-section-sub {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-top: 0.75rem;
    max-width: 560px;
    margin-inline: auto;
    line-height: 1.6;
}

.landing-divider {
    width: 48px; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    border-radius: 2px;
    margin: 1rem auto 0;
}

.text-gold {
    font-style: italic;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Features ── */
.landing-features {
    background: var(--bg-secondary);
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.features-grid {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem; /* space for scrollbar */
    /* hide scrollbar visually but keep it functional */
    scrollbar-width: thin;
    scrollbar-color: rgba(245,197,66,0.3) transparent;
}

.features-grid::-webkit-scrollbar {
    height: 4px;
}

.features-grid::-webkit-scrollbar-track {
    background: transparent;
}

.features-grid::-webkit-scrollbar-thumb {
    background: rgba(245,197,66,0.35);
    border-radius: 2px;
}

.features-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(245,197,66,0.6);
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    width: 280px;
    scroll-snap-align: start;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(245,197,66,0.05), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}

.feature-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(245,197,66,0.1);
}

.feature-card:hover::before { opacity: 1; }

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.25rem;
    display: block;
}

.feature-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.04em;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ── How It Works ── */
.landing-how {
    padding: 6rem 0;
}

.how-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.how-step {
    flex: 1;
    min-width: 220px;
    max-width: 300px;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
}

.how-step:hover {
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.how-step-num {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 1rem;
}

.how-step-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.how-step-desc {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.65;
}

.how-step-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
    align-self: center;
    flex-shrink: 0;
    padding: 0 0.5rem;
    margin-top: 1rem;
}

/* ── CTA Section ── */
.landing-cta {
    position: relative;
    padding: 7rem 0 8rem;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    border-top: 1px solid var(--border);
    text-align: center;
    overflow: hidden;
}

.cta-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: 0.04em;
    color: var(--text-primary);
    line-height: 1.05;
    margin-bottom: 1rem;
    font-style: normal;
}

.cta-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.cta-signin-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-bg-glow {
    position: absolute;
    width: 800px; height: 400px;
    background: radial-gradient(ellipse, rgba(245, 197, 66, 0.1), transparent 70%);
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

/* ── Footer ── */
.landing-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2.5rem;
}

.landing-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ── Dashboard (post-login home) ── */
#games-dashboard {
    padding-top: 2rem;
}

/* =============================================
   HOME VIEW – legacy bits still needed
   ============================================= */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}

.home-title {
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(0 0 30px var(--gold-glow));
}



.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-neon), var(--purple));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.game-card:hover {
    border-color: var(--border-gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
}

.game-card:hover::before {
    transform: scaleX(1);
}

.game-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.game-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.game-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-configuring {
    background: rgba(79, 142, 247, 0.15);
    color: var(--blue-bright);
    border: 1px solid rgba(79, 142, 247, 0.3);
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-paused {
    background: rgba(245, 197, 66, 0.15);
    color: var(--gold);
    border: 1px solid rgba(245, 197, 66, 0.3);
}

.status-completed {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.game-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1rem;
    max-width: 300px;
    margin: 0 auto 1.5rem;
}

/* =============================================
   ADMIN CONSOLE
   ============================================= */
#view-admin {
    padding: 0;
    max-width: 100%;
}

.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: calc(100vh - 65px);
}

.admin-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 65px;
    height: calc(100vh - 65px);
    overflow-y: auto;
}

.admin-sidebar-section h4 {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.admin-nav-item:hover {
    background: var(--bg-card);
    color: var(--text-primary);
}

.admin-nav-item.active {
    background: rgba(79, 142, 247, 0.15);
    color: var(--blue-bright);
}

.admin-nav-item .nav-icon {
    font-size: 1rem;
    width: 1.2rem;
    text-align: center;
}

.admin-main {
    padding: 2rem;
    overflow-y: auto;
}

.admin-section {
    display: none;
}

.admin-section.active {
    display: block;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-section-title {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--text-primary), var(--blue-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Players list */
.player-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: border-color var(--transition);
}

.player-item:hover {
    border-color: var(--border-gold);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-neon), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.player-name {
    font-weight: 600;
}

/* Category / Topic list */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.category-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition);
}

.category-item:hover {
    border-color: var(--border-gold);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    gap: 1rem;
}

.category-title-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.category-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.category-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.category-q-count {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.category-actions {
    display: flex;
    gap: 0.4rem;
}

.category-hint-row {
    padding: 0 1.25rem 0.75rem;
    display: flex;
    gap: 0.5rem;
}

.difficulty-select {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    transition: border-color var(--transition);
    cursor: pointer;
}

.difficulty-select:focus {
    outline: none;
    border-color: var(--blue-neon);
}

.difficulty-select option {
    background: var(--bg-card);
    color: var(--text-primary);
}

.hint-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    padding: 0.5rem 0.85rem;
    transition: border-color var(--transition), background var(--transition);
    box-sizing: border-box;
}

.hint-input:focus {
    outline: none;
    border-color: var(--gold);
    background: rgba(245, 197, 66, 0.05);
    color: var(--text-primary);
}

.hint-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.question-list {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.question-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.question-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1rem;
    color: var(--gold);
    display: inline-block;
    min-width: 3rem;
}

.question-text {
    font-size: 0.83rem;
    color: var(--text-primary);
    margin-top: 0.25rem;
}

.answer-text {
    font-size: 0.78rem;
    color: var(--green);
    margin-top: 0.2rem;
}

.answer-label {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.generating-state {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Game Info section */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.info-card-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    line-height: 1;
}

.info-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.start-game-panel {
    background: linear-gradient(135deg, rgba(79, 142, 247, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.start-game-panel h3 {
    margin-bottom: 0.5rem;
    color: var(--gold);
}

.start-game-panel p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.validation-list {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.validation-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.validation-list li.ok {
    color: var(--green);
}

.validation-list li.fail {
    color: var(--red);
}

/* =============================================
   GAME BOARD
   ============================================= */
#view-game {
    background: var(--bg-primary);
    padding: 0;
}

.game-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    min-height: calc(100vh - 65px);
    gap: 0;
}

.game-board-area {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.game-board-title {
    font-size: 2rem;
    text-align: center;
    background: linear-gradient(90deg, var(--gold), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

/* Jeopardy Board Grid */
.board-grid {
    display: grid;
    gap: 6px;
    flex: 1;
}

.board-category-header {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border: 2px solid rgba(79, 142, 247, 0.4);
    border-radius: var(--radius-sm);
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    letter-spacing: 0.08em;
    color: white;
    text-transform: uppercase;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.board-tile {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border: 2px solid rgba(79, 142, 247, 0.3);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.board-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent);
    pointer-events: none;
}

.board-tile:hover:not(.answered) {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    border-color: var(--gold);
    transform: scale(1.04);
    box-shadow: 0 0 20px var(--gold-glow), 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.board-tile.answered {
    background: var(--tile-answered);
    border-color: transparent;
    cursor: default;
    opacity: 0.3;
}

.tile-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    color: var(--gold);
    text-shadow: 0 2px 8px var(--gold-glow);
    letter-spacing: 0.04em;
    transition: all var(--transition);
}

.board-tile.answered .tile-value {
    color: var(--text-muted);
    text-shadow: none;
}

/* Scoreboard Sidebar */
.game-sidebar {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.scoreboard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.score-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--blue-neon), var(--purple));
}

.score-card.leading {
    border-color: var(--border-gold);
}

.score-card.leading::before {
    background: linear-gradient(180deg, var(--gold), var(--orange));
}

.score-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.4rem;
}

.score-player-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.score-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.4rem;
    color: var(--gold);
    line-height: 1;
}

.score-bar-bg {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.score-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-neon), var(--purple));
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-card.leading .score-bar-fill {
    background: linear-gradient(90deg, var(--gold), var(--orange));
}

.score-fly {
    position: fixed;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--gold);
    text-shadow: 0 0 20px var(--gold-glow);
    pointer-events: none;
    z-index: 9999;
    animation: scoreFly 1.5s ease-out forwards;
}

@keyframes scoreFly {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    50% {
        opacity: 1;
        transform: translateY(-40px) scale(1.3);
    }

    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}

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

.progress-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.progress-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

.progress-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--blue-neon), var(--green));
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-text {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.4rem;
    text-align: right;
}

/* =============================================
   QUESTION MODAL
   ============================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 10, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.open {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 760px;
    width: 100%;
    box-shadow: var(--shadow-gold), var(--shadow-card);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(20px);
    }

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.modal-close:hover {
    border-color: var(--red);
    color: var(--red);
}

.modal-category {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--blue-bright);
    margin-bottom: 0.5rem;
}

.modal-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: var(--gold);
    text-shadow: 0 0 30px var(--gold-glow);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.modal-question {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    line-height: 1.5;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-answer-reveal {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem 1.25rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-sm);
    color: var(--green);
    font-weight: 600;
    text-align: center;
    display: none;
}

.modal-answer-reveal.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.modal-answer-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.modal-divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

.modal-award-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.player-award-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.player-award-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 0.5rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
}

.award-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: center;
}

.award-actions .btn {
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    flex: 1;
}

.player-award-card .award-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-neon), var(--purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: white;
}

.player-award-btn .award-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.player-award-btn .award-score {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   GAME COMPLETE VIEW
   ============================================= */
#view-complete {
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    background: var(--bg-primary);
}

.complete-title {
    font-size: clamp(3rem, 8vw, 6rem);
    background: linear-gradient(135deg, var(--gold), var(--gold-light), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 40px var(--gold-glow));
    margin-bottom: 0.5rem;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 40px var(--gold-glow));
    }

    50% {
        filter: drop-shadow(0 0 80px rgba(245, 197, 66, 0.6));
    }
}

.complete-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.final-scores {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 480px;
    width: 100%;
    margin: 0 auto 2.5rem;
}

.final-score-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.final-score-card.first {
    border-color: var(--border-gold);
    background: linear-gradient(135deg, rgba(245, 197, 66, 0.08), rgba(249, 115, 22, 0.05));
    transform: scale(1.02);
}

.final-rank {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    min-width: 2.5rem;
    text-align: center;
}

.final-rank.rank-1 {
    color: var(--gold);
}

.final-rank.rank-2 {
    color: #94a3b8;
}

.final-rank.rank-3 {
    color: #b45309;
}

.final-player-name {
    font-weight: 700;
    flex: 1;
    text-align: left;
}

.final-score-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: var(--gold);
}

.complete-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* =============================================
   LOADING & SPINNERS
   ============================================= */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 26, 0.85);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}

.loading-overlay.open {
    display: flex;
}

.loading-overlay .spinner {
    width: 48px;
    height: 48px;
    border-width: 3px;
    color: var(--gold);
}

.loading-text {
    color: var(--gold);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
}

/* =============================================
   TOASTS
   ============================================= */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-card);
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
    min-width: 240px;
    backdrop-filter: blur(8px);
    pointer-events: all;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

.toast-success {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.toast-error {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.toast-info {
    background: rgba(79, 142, 247, 0.9);
    color: white;
}

.toast-warning {
    background: rgba(245, 197, 66, 0.9);
    color: #1a1000;
}

/* =============================================
   SECTION DIVIDERS, UTILS
   ============================================= */
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 1.5rem 0;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-muted);
}

.text-sm {
    font-size: 0.85rem;
}

.text-center {
    text-align: center;
}

/* ─── Scrollbar styling ─── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(79, 142, 247, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 142, 247, 0.5);
}

/* ─── Animations ─── */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.4s cubic-bezier(0.34, 1.2, 0.64, 1);
}

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

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

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: static;
        height: auto;
        flex-direction: row;
        overflow-x: auto;
        padding: 1rem;
        gap: 0.5rem;
    }

    .admin-sidebar-section {
        display: contents;
    }

    .admin-sidebar-section h4 {
        display: none;
    }

    .admin-nav-item {
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
        white-space: nowrap;
    }

    .game-layout {
        grid-template-columns: 1fr;
    }

    .game-sidebar {
        border-left: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        overflow-x: auto;
    }
}

@media (max-width: 768px) {

    /* Header layout */
    .app-header {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    /* Allow board grid to squish without scrolling */
    .game-board-area {
        padding: 1rem;
    }

    .board-grid {
        padding: 0;
    }

    /* Scoreboard side-by-side on mobile */
    .scoreboard {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 0.5rem;
    }

    /* Stack admin rows */
    .input-row {
        flex-direction: column;
        align-items: stretch;
        max-width: 100% !important;
    }

    .input-row .btn {
        width: 100%;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .category-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .category-actions .btn {
        flex: 1;
    }

    .category-hint-row {
        flex-direction: column;
    }

    /* Modal adjustments */
    .modal {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    .modal-value {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .modal-question {
        font-size: 1.5rem;
    }

    /* Game Info boxes */
    .info-grid {
        grid-template-columns: 1fr;
    }

    /* Manual Entry Dialog specific */
    .manual-row {
        grid-template-columns: 60px 1fr 30px !important;
    }

    .manual-fields {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .home-hero {
        padding: 2rem 1rem;
    }

    .home-title {
        font-size: 2.5rem;
    }

    .btn-xl {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    #view-home>div:nth-child(2) {
        padding: 0 1rem 3rem !important;
    }

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

    .board-tile {
        min-height: 45px;
        border-width: 1px;
    }

    .tile-value {
        font-size: 1rem;
    }

    .board-category-header {
        font-size: 0.65rem;
        min-height: 35px;
        padding: 0.25rem;
        border-width: 1px;
        word-wrap: break-word;
    }

    /* Scoreboard */
    .score-card {
        padding: 0.5rem;
    }

    .score-value {
        font-size: 1.1rem;
    }
}

/* ─── Game Mode Selection ─── */
.mode-option-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition);
    font-family: 'Inter', sans-serif;
}

.mode-option-btn:hover {
    border-color: var(--gold);
    background: rgba(255, 215, 0, 0.06);
    transform: translateX(4px);
}

.mode-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.mode-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: .2rem;
    color: var(--text-primary);
}

.mode-desc {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* FINAL JEOPARDY STYLES */
.fj-step {
  animation: fade-in 0.3s ease-out;
}

.fj-wager-row, .fj-resolve-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-hover);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
}

.fj-wager-name, .fj-resolve-name {
  font-weight: 600;
  font-size: 1.05rem;
}

.fj-wager-input {
  width: 120px;
  text-align: right;
  font-family: monospace;
  font-size: 1.1rem;
}

.fj-resolve-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-fj-correct, .btn-fj-wrong {
  opacity: 0.5;
  transition: all 0.2s;
}

.btn-fj-correct.active {
  opacity: 1;
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.btn-fj-wrong.active {
  opacity: 1;
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

/* STATS TABLE STYLES */
#complete-stats-container table td, #complete-stats-container table th {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
#complete-stats-container table tr:last-child td {
  border-bottom: none;
}
#complete-stats-container table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}