/**
 * Trivia1.com Standalone App Styles
 * Extracted from inline layout CSS + view inline styles
 */

/* ========================================
   Base / Typography
   ======================================== */
@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 100 900;
    font-display: optional;
    src: url(https://fonts.gstatic.com/s/inter/v18/UcCO3FwrK3iLTeHuS_nVMrMxCp50SjIw2boKoduKmMEVuLyfAZ9hiA.woff2) format('woff2');
}

:root {
    --primary-color: #6366f1;
    --primary-color-rgb: 99, 102, 241;
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a35;
    --bg-tertiary: #2d2d50;
    --bg-hover: #3a3a5a;
    --text-primary: #f1f1f1;
    --text-secondary: #b0b0cc;
    --text-tertiary: #808099;
    --border-color: #2a2a4a;
    --shadow-medium: 0 4px 6px rgba(0, 0, 0, .3);
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100%; }

/* Disable tap highlight, tap-to-zoom, and text selection on interactive elements */
a, button, input, select, textarea, label, .trivia1-btn, .trivia-choice-btn {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ========================================
   App Shell
   ======================================== */
.trivia1-app {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ========================================
   Header — Sticky with Hamburger Menu
   ======================================== */
.trivia1-header {
    position: sticky;
    top: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.trivia1-logo {
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    line-height: 1;
}

.trivia1-logo-word {
    font-family: 'Outfit', Inter, sans-serif;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.trivia1-logo .trivia1-logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.3em;
    height: 1.3em;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.75em;
    font-weight: 800;
    line-height: 1;
    flex-shrink: 0;
}

.trivia1-logo-inline {
    font-size: 0.85em;
    vertical-align: baseline;
}

/* Hamburger Button */
.trivia1-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
}

.trivia1-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Sparkle button — opens the T1 chatbot. Same hit-target as the
   menu button but tinted indigo so it reads as the AI affordance. */
.trivia1-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(139,92,246,0.18));
    border: 1px solid rgba(139,92,246,0.45);
    border-radius: 0.5rem;
    color: #c4b5fd;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s;
}

.trivia1-chat-btn:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.32), rgba(139,92,246,0.32));
    color: #fff;
    transform: translateY(-1px);
}

/* T1 robot antenna light — the green blink that makes the chat button
   noticeable. Core dims while the halo flares, reading as a soft pulse. */
.t1-bot-light {
    animation: t1-bot-blink 1.4s ease-in-out infinite;
}
.t1-bot-halo {
    opacity: 0.35;
    animation: t1-bot-halo 1.4s ease-in-out infinite;
}
@keyframes t1-bot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}
@keyframes t1-bot-halo {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .t1-bot-light, .t1-bot-halo { animation: none; }
}

/* Slide-out Nav */
.trivia1-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 300;
}

.trivia1-nav-overlay.active {
    display: block;
}

.trivia1-nav {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 301;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.trivia1-nav.active {
    right: 0;
}

.trivia1-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.trivia1-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.trivia1-nav-close:hover {
    color: var(--text-primary);
}

.trivia1-nav-links {
    list-style: none;
    margin: 0;
    padding: 0.5rem 0;
}

/* Apply the same look to anchor children AND any form>button child so the
   logout button (which can't be an anchor — POST + CSRF) shares styling
   instead of inheriting browser defaults. */
.trivia1-nav-links li a,
.trivia1-nav-links li form button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    transition: all 0.15s;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
}

.trivia1-nav-links li a:hover,
.trivia1-nav-links li form button:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.trivia1-nav-links li a i,
.trivia1-nav-links li form button i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: var(--primary-color);
}

/* Forms in the nav are layout-invisible — let the inner button fill the row. */
.trivia1-nav-links li form {
    margin: 0;
    padding: 0;
}

/* Create-account CTA stands out as a filled pill — white text (not the
   indigo-on-dark that made it look like a mis-styled link). */
.trivia1-nav-links li a.trivia1-nav-cta {
    color: #fff;
    font-weight: 700;
    background: var(--primary-color);
    border-radius: 10px;
    margin: 0.35rem 0.5rem;
    width: auto;
}
.trivia1-nav-links li a.trivia1-nav-cta:hover {
    background: var(--primary-color);
    color: #fff;
    filter: brightness(1.08);
}
.trivia1-nav-links li a.trivia1-nav-cta i {
    color: #fff;
}

/* Divider between nav sections (play / learn / account). */
.trivia1-nav-links li.trivia1-nav-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.6rem 1.25rem;
    padding: 0;
    list-style: none;
}

/* =========================================================================
   Standardized marketing hero — shared by home / register / login / about.
   One frame everywhere: a primary column (form, or headline + CTAs) beside a
   visual column (image + optional caption), vertically centered in a full-
   height band so it fills the screen and stays balanced. Stacks to one
   column on mobile with the primary (form) first.
   ========================================================================= */
.t1-hero { width: 100%; }
.t1-hero-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}
.t1-hero-primary { width: 100%; min-width: 0; }
.t1-hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}
.t1-hero-img {
    width: 100%;
    max-width: 400px;
    /* Cap by viewport height too, so on short screens the image shrinks
       and the caption below it always stays above the fold — the image +
       caption column then fits alongside the form at any resolution. */
    max-height: 48vh;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 60px -28px rgba(99, 102, 241, 0.55);
    display: block;
}
.t1-hero-caption { text-align: center; max-width: 460px; }
.t1-hero-h {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(1.7rem, 2.6vw, 2.5rem);
    line-height: 1.12;
    color: #fff;
}
.t1-hero-lead {
    margin: 0.75rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}
.t1-grad {
    background: linear-gradient(120deg, #a5b4fc, #818cf8, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@media (min-width: 900px) {
    .t1-hero-inner {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        /* Sit close under the header — no forced 100vh band (that dead-
           centered the content and left a big gap below the header). The
           hero sizes to its content with comfortable, symmetric padding. */
        padding: 2.75rem 2rem 3.5rem;
        align-items: center;
    }
    /* Visual on the right, primary on the left — regardless of DOM order,
       so the form can come first in markup (mobile-first) yet sit left. */
    .t1-hero-primary { order: 1; }
    .t1-hero-visual { order: 2; }
}

/* Trivia Royale header badge — pulsing ring, with live in-game count. */
.trivia1-royale-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.14);
    border: 1px solid rgba(129, 140, 248, 0.45);
    color: #c7d2fe;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    line-height: 1;
    animation: t1-royale-pulse 2.2s ease-in-out infinite;
}
.trivia1-royale-btn:hover { background: rgba(129, 140, 248, 0.24); color: #e0e7ff; }
.trivia1-royale-btn i { color: #fbbf24; font-size: 14px; }
.trivia1-royale-count { font-variant-numeric: tabular-nums; }
.trivia1-royale-count:empty { display: none; }
@keyframes t1-royale-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(129, 140, 248, 0.5); }
    50% { box-shadow: 0 0 0 7px rgba(129, 140, 248, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .trivia1-royale-btn { animation: none; }
}

/* ========================================
   Main Content
   ======================================== */
.trivia1-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
}

/* ========================================
   Footer
   ======================================== */
.trivia1-footer {
    text-align: center;
    padding: 1rem 1.5rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    border-top: 1px solid var(--border-color);
}

.trivia1-footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

.trivia1-footer a:hover {
    color: var(--primary-color);
}

.trivia1-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
    color: var(--text-secondary);
    line-height: 1;
}

.trivia1-footer-logo .trivia1-logo-word {
    font-family: 'Outfit', Inter, sans-serif;
    font-weight: 300;
    letter-spacing: 0.04em;
    text-transform: lowercase;
}

.trivia1-footer-logo .trivia1-logo-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.2em;
    height: 1.2em;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.7em;
    font-weight: 800;
    line-height: 1;
}

/* ========================================
   Card
   ======================================== */
.trivia1-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.trivia1-card + .trivia1-card {
    margin-top: 1.5rem;
}

/* Registration / login form intro copy + fine-print under the
   submit button. Match the rest of the form's left-align rhythm. */
.t1-form-intro {
    margin: -0.25rem 0 1.25rem;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.t1-form-fineprint {
    margin: 0.75rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    color: var(--text-tertiary);
}

/* Login page's "Don't have an account?" panel. Distinct card under
   the login form with a left-aligned icon + body + CTA stack so it
   doesn't read as a trailing footer line. */
.t1-noaccount-card {
    text-align: left;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.10), rgba(139, 92, 246, 0.10));
    border-color: rgba(99, 102, 241, 0.28);
}
.t1-noaccount-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.t1-noaccount-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.6rem;
    background: rgba(99, 102, 241, 0.18);
    color: var(--primary-color);
    font-size: 1rem;
}
.t1-noaccount-body {
    flex: 1 1 auto;
    min-width: 0;
}
.t1-noaccount-heading {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.t1-noaccount-text {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
}
.t1-noaccount-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.t1-noaccount-actions .trivia1-btn {
    margin: 0;
}
@media (max-width: 480px) {
    .t1-noaccount-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    .t1-noaccount-actions .trivia1-btn {
        width: 100%;
    }
}

.trivia1-card h1 {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.trivia1-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.trivia1-card p {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ========================================
   Form Elements
   ======================================== */
.trivia1-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.trivia1-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* Selects: draw our own chevron so the field doesn't render with the
   browser default (invisible on dark themes) or, worse, get clipped
   because appearance:none stripped it. */
select.trivia1-input {
    padding-right: 2.5rem;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af' stroke-width='2'%3e%3cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 1.1rem;
    cursor: pointer;
}

/* Number inputs: hide the awkward native up/down spinner buttons
   (they're tiny, dark, and impossible to hit on mobile). */
input[type="number"].trivia1-input {
    -moz-appearance: textfield;
}
input[type="number"].trivia1-input::-webkit-outer-spin-button,
input[type="number"].trivia1-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.trivia1-input-code {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
}

.trivia1-input-lg {
    font-size: 1.1rem;
    text-align: center;
}

.trivia1-btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
    margin-top: 1rem;
}

/* When .trivia1-btn lives in a flex row, the default width:100% +
   margin-top:1rem fight the layout. Use .trivia1-btn-inline alongside
   to opt out of those defaults. */
.trivia1-btn.trivia1-btn-inline {
    width: auto;
    margin-top: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Compact vertical form stack — labels above inputs, snug spacing.
   Used on the admin dashboard's Impersonate + Grant cards. */
.t1-stack-sm > * + * {
    margin-top: 0.75rem;
}
.t1-field {
    display: block;
}
.t1-field-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}
.t1-field-label-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
    opacity: 0.7;
}
/* Buttons inside a t1-stack-sm shouldn't have the default top margin
   since the stack itself handles spacing. */
.t1-stack-sm .trivia1-btn {
    margin-top: 0.25rem;
}

/* Alpine x-cloak — without this rule every x-cloak'd dropdown and
   modal renders VISIBLE until the Alpine CDN script loads (very
   noticeable on mobile connections). */
[x-cloak] { display: none !important; }

/* ========================================
   Admin chrome — sidebar + header layout
   ======================================== */
.t1-admin-shell {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 4rem);
    width: 100%;
}
.t1-admin-sidebar {
    background: var(--bg-secondary, #1a1a2e);
    border-right: 1px solid rgba(255,255,255,0.08);
    padding: 1.25rem 0.5rem 2rem;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
}
.t1-admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1rem 1.5rem;
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
}
.t1-admin-sidebar-brand-tag {
    margin-left: 0.25rem;
    padding: 0.1rem 0.5rem;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(251,191,36,0.18);
    color: #fbbf24;
    border-radius: 0.25rem;
    font-weight: 700;
}
.t1-admin-sidebar-nav { display: flex; flex-direction: column; }
.t1-admin-sidebar-section {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: rgba(255,255,255,0.35);
    margin: 1.2rem 0 0.35rem 1rem;
}
.t1-admin-sidebar-section:first-of-type { margin-top: 0; }
.t1-admin-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 1rem;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.4rem;
    margin: 0 0.25rem;
    transition: background 0.15s, color 0.15s;
    border: none;
    background: none;
    width: calc(100% - 0.5rem);
    text-align: left;
    font-family: inherit;
    cursor: pointer;
}
.t1-admin-link i {
    width: 16px;
    text-align: center;
    color: var(--primary-color, #6366f1);
    opacity: 0.85;
}
.t1-admin-link:hover { background: rgba(255,255,255,0.05); color: #fff; }
.t1-admin-link.is-active { background: rgba(99,102,241,0.18); color: #fff; }
.t1-admin-link.is-active i { color: #a5b4fc; opacity: 1; }
.t1-admin-link-form { margin: 0; padding: 0; }

.t1-admin-main { display: flex; flex-direction: column; min-width: 0; }
.t1-admin-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: var(--bg-secondary, #1a1a2e);
    position: sticky;
    top: 0;
    z-index: 5;
    box-shadow: 0 1px 0 rgba(0,0,0,0.4), 0 4px 12px rgba(0,0,0,0.15);
}
.t1-admin-burger {
    display: none;
    background: none;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary, #fff);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
}
.t1-admin-header-titles { flex: 1; min-width: 0; }
.t1-admin-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    font-weight: 600;
    margin: 0;
    /* One line, always — a wrapping eyebrow ("Dashboard · Host") stacks
       the title block to three lines and blows up the header height. */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.t1-admin-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0.15rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.t1-admin-header-actions { display: flex; align-items: center; gap: 0.5rem; }

/* Scrim behind the mobile sidebar drawer — also what closes it
   (replaces @click.outside, which the burger's own click kept
   re-triggering). Desktop never shows it. */
.t1-admin-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 49; /* just under the sidebar's 50 */
}
.t1-admin-user-chip {
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    color: rgba(255,255,255,0.75);
}
.t1-admin-user-chip i { margin-right: 0.3rem; opacity: 0.6; }

.t1-admin-content {
    padding: 1.5rem 2rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}
/* Automatic vertical spacing between top-level sections — cards,
   grids, paragraphs alike. The `> * + *` pattern matches every
   child after the first. */
.t1-admin-content > * + * {
    margin-top: 1rem;
}
/* Cards inside admin chrome should fill the available width and
   left-align. The marketing .trivia1-card variant caps at 420px
   and centers text, which is wrong for tables and forms. */
.t1-admin-content .trivia1-card {
    max-width: none;
    text-align: left;
}

/* Tier filter chips on the Users page. */
.t1-admin-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.t1-admin-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.75);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}
.t1-admin-chip:hover { background: rgba(255,255,255,0.07); color: #fff; }
.t1-admin-chip.is-active {
    background: var(--primary-color, #6366f1);
    border-color: var(--primary-color, #6366f1);
    color: #fff;
}
.t1-admin-chip-count {
    font-size: 0.7rem;
    opacity: 0.7;
    padding: 0.05rem 0.4rem;
    background: rgba(0,0,0,0.25);
    border-radius: 999px;
}
.t1-admin-chip.is-active .t1-admin-chip-count { background: rgba(255,255,255,0.25); opacity: 1; }

/* Tables in the admin chrome. */
.t1-admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.t1-admin-table thead tr { text-align: left; border-bottom: 1px solid rgba(255,255,255,0.15); }
.t1-admin-table th {
    padding: 0.6rem 0.75rem 0.6rem 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}
.t1-admin-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.06); }
.t1-admin-table td { padding: 0.7rem 0.75rem 0.7rem 0; vertical-align: middle; }
.t1-admin-table-actions { text-align: right; white-space: nowrap; }
.t1-admin-user-cell { display: flex; flex-direction: column; }
.t1-admin-user-email { font-weight: 500; }
.t1-admin-user-name { font-size: 0.75rem; opacity: 0.55; margin-top: 0.1rem; }

.t1-admin-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.75rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.4);
    color: #c7d2fe;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.15s;
}
.t1-admin-action-btn:hover { background: rgba(99,102,241,0.3); color: #fff; border-color: rgba(99,102,241,0.7); }
.t1-admin-action-btn i { font-size: 0.7rem; }

.t1-admin-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: capitalize;
}
.t1-admin-tier-badge i { font-size: 0.65rem; }
.t1-admin-tier-free     { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); }
.t1-admin-tier-pro      { background: rgba(99,102,241,0.18); color: #a5b4fc; }
.t1-admin-tier-pro_plus { background: rgba(251,191,36,0.18); color: #fcd34d; }
.t1-admin-tier-admin    { background: rgba(239,68,68,0.18); color: #fca5a5; }

/* Choice rows on the bank-question add form — radio + text input live
   on one row, radio left-aligned, text input fills the rest. Replaces
   the old "pick a numeric index" UX. */
.t1-choice-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0.4rem 0;
}
.t1-choice-row input[type="radio"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary-color, #6366f1);
    flex: 0 0 auto;
    cursor: pointer;
}
.t1-choice-row .trivia1-input {
    flex: 1;
}

/* Native <dialog> modals — used for edit forms on category tables.
   The browser-default styling is harsh white on dark; theme it to
   match the admin chrome. ::backdrop dims everything behind. */
.t1-admin-dialog {
    background: var(--bg-secondary, #1a1a2e);
    color: var(--text-primary, #fff);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 480px;
    width: calc(100% - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}
.t1-admin-dialog::backdrop {
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

/* Alpine-driven modal overlay + card. Fixed to the visual viewport,
   flex-centered, and the card scrolls internally instead of pushing
   past the screen — on a phone it reads as a full-width sheet. */
.t1-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100; /* above sidebar (50) and header (5) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(2px);
}
.t1-modal-card {
    width: 100%;
    max-width: 420px;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Pagination links (Laravel's default Bootstrap-style). */
.t1-admin-content nav[role="navigation"] {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}
.t1-admin-content nav[role="navigation"] svg { width: 1rem; height: 1rem; }

/* Mobile: sidebar collapses to a slide-in drawer toggled by the burger. */
@media (max-width: 768px) {
    .t1-admin-shell { grid-template-columns: 1fr; }
    .t1-admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        width: 260px;
        transform: translateX(-100%);
        transition: transform 0.2s ease-out;
        box-shadow: 4px 0 20px rgba(0,0,0,0.5);
        height: 100vh;
    }
    .t1-admin-sidebar.is-open { transform: translateX(0); }
    /* Alpine's x-show drives visibility via inline display:none; this
       just lets the scrim exist at all on mobile. */
    .t1-admin-scrim { display: block; }
    .t1-admin-burger { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; }
    .t1-admin-content { padding: 1rem; }
    /* Hides the admin layout's email span. The account layout's chip is
       an icon-only button with inline display — intentionally visible. */
    .t1-admin-user-chip { display: none; }

    /* Two-row mobile header. Row 1: burger + tokens/Host/user menu.
       Row 2: the full page title (order pushes it after the actions;
       flex-basis 100% wraps it) — no more "My Configu…" ellipsis. */
    .t1-admin-header { padding: 0.6rem 0.75rem; gap: 0.5rem; flex-wrap: wrap; row-gap: 0.3rem; }
    .t1-admin-header-titles { order: 10; flex: 1 1 100%; }
    .t1-admin-title { font-size: 1.05rem; margin: 0; white-space: normal; overflow: visible; }
    .t1-admin-eyebrow { display: none; }
    .t1-admin-header-actions { flex: 0 0 auto; margin-left: auto; }
}

.trivia1-btn-primary {
    background: var(--primary-color);
    color: #fff;
}

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

.trivia1-btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.trivia1-btn-secondary:hover {
    background: var(--bg-hover);
}

.trivia1-btn i {
    margin-right: 0.5rem;
}

.trivia1-label {
    display: block;
    text-align: left;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.trivia1-error {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    text-align: left;
}

.trivia1-code-error {
    color: #ef4444;
    font-size: 0.9rem;
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 0.5rem;
    text-align: center;
}

/* ========================================
   Join Page — Teams List
   ======================================== */
.trivia1-teams-joined {
    margin-top: 1.5rem;
    text-align: left;
}

.trivia1-teams-joined h3 {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 0.75rem;
    font-weight: 600;
    text-align: center;
}

.trivia1-team-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.trivia1-team-row:last-child {
    border-bottom: none;
}

.trivia1-team-row i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* ========================================
   Play Page — Game Phases
   ======================================== */
/* Play page needs bottom padding for fixed score bar */
.trivia1-play-container {
    width: 100%;
    max-width: 500px;
    padding-bottom: 4rem;
}

.trivia1-phase-icon {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trivia1-team-label {
    margin-bottom: 0.5rem;
}

/* Team-name inline edit (waiting screen). Pencil button sits flush
   next to the team name; clicking swaps in the input form below. */
.t1-team-name-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.4rem;
    padding: 0.25rem 0.4rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 0.35rem;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.t1-team-name-edit-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.4);
}

.t1-team-name-form {
    display: flex;
    gap: 0.4rem;
    margin: 0.5rem 0;
    flex-wrap: wrap;
    justify-content: center;
}
.t1-team-name-input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.4rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    max-width: 18rem;
}
.t1-team-name-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.t1-team-name-save,
.t1-team-name-cancel {
    flex: 0 0 auto;
    padding: 0.5rem 0.85rem;
    border-radius: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border-color);
}
.t1-team-name-save {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}
.t1-team-name-save:hover { filter: brightness(1.05); }
.t1-team-name-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.t1-team-name-cancel {
    background: transparent;
    color: var(--text-secondary);
}
.t1-team-name-cancel:hover {
    background: rgba(148, 163, 184, 0.1);
}
.t1-team-name-error {
    color: #ef4444;
    font-size: 0.8rem;
    margin: 0.25rem 0 0;
}

.trivia1-subtitle {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 0;
}

/* Question phase */
.trivia1-question-card {
    text-align: left;
}

.trivia1-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.trivia1-q-number {
    font-weight: 700;
    color: var(--text-secondary);
}

.trivia1-timer {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.trivia1-q-text {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.trivia1-answer-submitted {
    text-align: center;
    padding: 1rem 0;
}

.trivia1-answer-submitted i {
    color: #22c55e;
}

.trivia1-answer-submitted p {
    margin: 0.5rem 0 0;
    font-weight: 600;
}

/* Echo of the player's chosen answer ("Your answer: B — Tokyo") so
   they can verify their selection without unsubmitting. */
.trivia1-submitted-answer {
    margin: 0.4rem 0.5rem 0.25rem !important;
    padding: 0.45rem 0.75rem;
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.32);
    border-radius: 8px;
    font-weight: 500 !important;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.92);
    word-break: break-word;
}
.trivia1-submitted-answer:empty {
    display: none;
}

/* Leaderboard heading */
.trivia1-leaderboard-heading {
    text-align: center;
}

.trivia1-leaderboard-heading i {
    color: #f59e0b;
}

/* Final phase */
.trivia1-final-icon {
    color: #f59e0b;
    margin-bottom: 1rem;
}

.trivia1-final-leaderboard {
    text-align: left;
    margin: 1rem 0;
}

.trivia1-final-winner {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.75rem 0 0.25rem;
    color: #f59e0b;
}

/* Time's Up */
.trivia-times-up {
    text-align: center;
    margin-top: 1.5rem;
    padding: 1.25rem;
    animation: timesUpPulse 0.5s ease-out;
}

.trivia-times-up .times-up-icon {
    color: #f59e0b;
}

.trivia-times-up .times-up-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0.5rem;
    color: #f59e0b;
}

.trivia-times-up .times-up-subtitle {
    margin-top: 0.25rem;
    opacity: 0.7;
    font-size: 0.95rem;
}

@keyframes timesUpPulse {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Timer expired */
.trivia1-timer.timer-expired {
    color: #ef4444;
}

/* Full-screen video with question drawer overlay */
#phase-question.has-video {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 130px);
    min-height: calc(100dvh - 130px);
}

.trivia-video-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: #000;
    overflow: hidden;
}

.trivia-video-fullscreen {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
    transform: scale(1.1);
}

/* Header bar — round info + Q number + timer pinned at top */
.trivia-player-header-bar {
    display: none;
}

#phase-question .trivia-player-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary, #9ca3af);
}

#phase-question.has-video .trivia-player-header-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
}

.trivia-player-header-bar .header-round-info { opacity: 0.85; }
.trivia-player-header-bar .header-q-number { opacity: 0.9; }
.trivia-player-header-bar .header-timer {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--primary-color);
}
#phase-question.has-video .trivia-player-header-bar .header-timer {
    color: #fbbf24;
}
.trivia-player-header-bar .header-timer i { margin-right: 0.15rem; }

/* Drawer overlay — slides up from bottom over video */
#phase-question.has-video .trivia1-question-card {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 0.75rem 0.75rem 0 0;
    margin: 0;
    max-height: 50%;
    overflow-y: auto;
    padding: 0.5rem 0.75rem;
    animation: drawerSlideUp 0.4s ease-out;
}

@keyframes drawerSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

#phase-question.has-video .trivia1-q-text {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    margin: 0 0 0.375rem;
    line-height: 1.25;
}

/* Fade out choices after answer submitted or time expired */
.trivia-choices.choices-faded {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease;
}

/* Question image */
.trivia-image-wrap {
    text-align: center;
    margin: 0.5rem 0;
}
.trivia-question-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 0.5rem;
    object-fit: contain;
}

.trivia-choices {
    transition: opacity 0.4s ease, max-height 0.4s ease;
    max-height: 500px;
}

#phase-question.has-video .trivia-choice-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}

#phase-question.has-video .trivia-choice-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

#phase-question.has-video .trivia1-answer-submitted,
#phase-question.has-video .trivia-times-up {
    color: #fff;
}

/* Disable zoom, pinch, text selection on player pages */
.trivia1-play-container {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    overscroll-behavior: none;
}

.trivia1-play-container * {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
}

.trivia-enable-sound-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 2px solid #fbbf24;
    border-radius: 2rem;
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.trivia-enable-sound-btn:hover {
    background: rgba(251, 191, 36, 0.3);
}

.trivia-enable-sound-btn i {
    margin-right: 0.4rem;
}

/* Score Bar */
.trivia1-score-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    z-index: 100;
}

.trivia1-score-value {
    color: var(--primary-color);
    font-size: 1.25rem;
}

/* Footer round chip — left side of the persistent score bar so the
   player always sees "Round 2 of 3 · Q4/10" without scrolling. */
.t1-score-bar-round {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.t1-score-bar-divider {
    color: var(--text-secondary);
    opacity: 0.5;
    margin: 0 0.4rem;
}

.t1-score-bar-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-right: 0.4rem;
    font-size: 0.85rem;
}

/* Play view subheader — sits below the global site header and shows
   game title / venue / team so the player always knows which game
   they're in (the global header is just the brand logo). */
.t1-play-subheader {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 1rem;
    margin: 0 0 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 0.6rem;
}

.t1-play-subheader-main {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.t1-play-subheader-title {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.t1-play-subheader-venue {
    font-size: 0.78rem;
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.t1-play-subheader-team {
    flex-shrink: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
}

@media (max-width: 480px) {
    .t1-play-subheader {
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
    }
    .t1-play-subheader-title { font-size: 0.85rem; }
    .t1-play-subheader-venue { font-size: 0.72rem; }
    .t1-play-subheader-team { font-size: 0.72rem; padding: 0.2rem 0.5rem; }
}

/* Round transition banner — drops above the leaderboard during the
   round_complete phase so the player gets a clear visual beat between
   rounds. Hidden by default; rendered by player.js renderRoundBanner(). */
.t1-round-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    margin: 0 0 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(139, 92, 246, 0.18));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 0.75rem;
    text-align: center;
}

.t1-round-banner-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    opacity: 0.85;
}

.t1-round-banner-headline {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.t1-round-banner-sub {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ========================================
   Resume Game Banner
   ======================================== */
.trivia1-resume-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.15));
    border-color: rgba(99, 102, 241, 0.3);
}

.trivia1-resume-info {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

/* ========================================
   Share Team Link
   ======================================== */
.trivia1-share-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
}

.trivia1-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.trivia1-share-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.trivia1-share-btn.copied {
    border-color: #22c55e;
    color: #22c55e;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 480px) {
    .trivia1-card {
        padding: 1.5rem;
    }

    .trivia1-main {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   SEO Landing Sections
   ======================================== */
.trivia1-landing-sections {
    width: 100%;
    max-width: 600px;
    margin-top: 3rem;
}

.trivia1-section {
    text-align: center;
    padding: 3rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.trivia1-section:last-child {
    border-bottom: 1px solid var(--border-color);
}

.trivia1-section-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.trivia1-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    color: var(--text-primary);
}

.trivia1-section p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1.25rem;
}

.trivia1-section p:last-child {
    margin-bottom: 0;
}

.trivia1-feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: left;
    margin-top: 1.5rem;
}

.trivia1-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.trivia1-feature-item i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.trivia1-feature-item div {
    flex: 1;
}

.trivia1-feature-item strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.95rem;
}

.trivia1-feature-item span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========================================
   Host / About Pages
   ======================================== */
.trivia1-page-container {
    width: 100%;
    max-width: 520px;
}

.trivia1-page-container h1 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem;
}

.trivia1-page-container p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.trivia1-steps {
    text-align: left;
    margin: 1.5rem 0;
}

.trivia1-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.trivia1-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.trivia1-step-content h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.trivia1-step-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Change answer button */
.trivia1-change-answer-btn {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    display: inline-block;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
}

.trivia1-change-answer-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* ============================================
   Pricing Table
   ============================================ */
.t1-pricing-table {
    width: 100%;
}
.t1-pricing-header {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color, #2a2a3e);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.85rem;
    text-align: center;
}
.t1-pricing-feature-label {
    text-align: left;
}
.t1-pricing-pro {
    color: var(--primary-color);
}
.t1-pricing-row {
    display: grid;
    grid-template-columns: 1fr 80px 80px;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color, #2a2a3e);
    font-size: 0.85rem;
    align-items: center;
}
.t1-pricing-feature {
    text-align: left;
    color: var(--text-secondary);
}
.t1-pricing-feature i {
    width: 1.2rem;
    text-align: center;
    margin-right: 0.3rem;
    color: var(--text-tertiary, #6b7280);
}
.t1-pricing-value {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.t1-pricing-highlight {
    color: var(--primary-color);
    font-weight: 600;
}

/* Upgrade prompt banner */
.t1-upgrade-banner {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(139,92,246,0.15));
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.t1-upgrade-banner a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}
.t1-upgrade-banner a:hover {
    text-decoration: underline;
}

/* ============================================
   Registration — Plan Selector & Modal
   ============================================ */
.t1-plan-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-primary);
    border: 1px solid var(--border-color, #374151);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.t1-plan-trigger:hover { border-color: var(--primary-color); }
.t1-plan-trigger-icon {
    width: 2rem; height: 2rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-color);
    color: #fff; border-radius: 0.4rem; font-size: 0.85rem;
}
.t1-plan-trigger-name { font-weight: 600; font-size: 0.95rem; }
.t1-plan-trigger-price { font-size: 0.8rem; color: var(--text-secondary); }

/* Plan modal */
.t1-plan-modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.7);
    display: flex; align-items: flex-end; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
}
.t1-plan-modal-overlay.active { opacity: 1; pointer-events: auto; }
.t1-plan-modal {
    background: var(--bg-secondary, #1e1e2e);
    border-radius: 1rem 1rem 0 0;
    padding: 1.25rem;
    width: 100%; max-width: 520px;
    max-height: 85vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.t1-plan-modal-overlay.active .t1-plan-modal { transform: translateY(0); }

/* Billing toggle */
.t1-billing-toggle {
    display: flex; gap: 0;
    background: var(--bg-primary);
    border-radius: 0.5rem;
    padding: 0.2rem;
    margin-bottom: 1rem;
}
.t1-billing-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.4rem;
    transition: all 0.2s;
}
.t1-billing-btn.active {
    background: var(--primary-color);
    color: #fff;
}

/* Plan cards */
.t1-plan-card {
    background: var(--bg-primary);
    border: 2px solid transparent;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}
.t1-plan-card:hover { border-color: var(--border-color, #374151); }
.t1-plan-card.selected { border-color: var(--primary-color); background: rgba(99,102,241,0.08); }
.t1-plan-card.featured { border-color: var(--primary-color); }
.t1-plan-badge {
    position: absolute; top: -0.5rem; right: 0.75rem;
    background: var(--primary-color); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    padding: 0.15rem 0.5rem; border-radius: 0.25rem;
    text-transform: uppercase; letter-spacing: 0.05em;
}
.t1-plan-card-top {
    display: flex; align-items: center; gap: 0.75rem;
    margin-bottom: 0.5rem;
}
.t1-plan-card-icon {
    width: 2.25rem; height: 2.25rem;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-secondary, #1e1e2e);
    border-radius: 0.5rem; font-size: 0.9rem;
    color: var(--primary-color);
}
.t1-plan-card-name { font-weight: 700; font-size: 1rem; }
.t1-plan-card-price { font-size: 0.85rem; color: var(--text-secondary); }
.t1-plan-card-features {
    display: flex; flex-direction: column; gap: 0.3rem;
    font-size: 0.8rem; color: var(--text-secondary);
    margin-bottom: 0.75rem;
}
.t1-plan-select-btn {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #374151);
    background: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: all 0.2s;
}
.t1-plan-select-btn:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.t1-plan-card.selected .t1-plan-select-btn {
    background: var(--primary-color); color: #fff; border-color: var(--primary-color);
}

/* ========================================
   Host (/host): Rounds & Question Banks
   ========================================
   The setup form's busiest section. Stacks each round in its own
   card, and each bank assignment in a labelled sub-card so every
   control has a visible name. */
.t1-host-rounds-fieldset {
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 1.25rem 1.25rem 1.1rem;
    margin: 0;
    background: rgba(15, 14, 27, 0.55);
}
.t1-host-rounds-legend {
    padding: 0 0.55rem;
    margin: 0 0 0.25rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary, #fff);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.t1-host-rounds-legend i { color: #a5b4fc; }
.t1-host-rounds-intro {
    margin: 0 0 1rem;
    font-size: 12.5px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.65);
}
.t1-host-rounds-intro a { color: #a5b4fc; }

/* Iconed upgrade CTA inside the rounds fieldset. Replaces the
   previous inline "Upgrade" hyperlink so the call-to-action is a
   visually distinct button. */
.t1-host-cta-row {
    margin: 0 0 1.25rem;
}
.t1-host-upgrade-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #c4b5fd;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 0.5rem;
    text-decoration: none;
    margin: 0;
    width: auto;
}
.t1-host-upgrade-btn:hover {
    background: rgba(99, 102, 241, 0.28);
    color: #ddd6fe;
}
.t1-host-upgrade-btn-sm {
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    margin-top: 0.5rem;
}
.t1-host-add-bank-hint .t1-host-upgrade-btn {
    margin-left: calc(1.25rem + 0.4rem);
}

/* ============================================
   /host — desktop / tablet 2-column layout
   ============================================
   Mobile (default): cards stack vertically inside the t1-stack
   shell. Desktop: form on the left, sticky "How It Works" panel
   on the right. The form card grows to fill its column; the help
   panel sticks so the steps stay visible while the host scrolls
   the (taller) form. */
@media (min-width: 1024px) {
    .t1-host-layout {
        max-width: 1180px;
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(280px, 360px);
        align-items: start;
        gap: 1.75rem;
    }
    .t1-host-layout > * + * {
        /* override t1-stack's stack-spacing — grid handles gap */
        margin-top: 0;
    }
    .t1-host-form-card {
        max-width: 100%;
    }
    .t1-host-help-card {
        position: sticky;
        top: 1.5rem;
        max-width: 100%;
    }
}

@media (min-width: 1440px) {
    .t1-host-layout {
        max-width: 1320px;
        grid-template-columns: minmax(0, 1.6fr) minmax(300px, 400px);
        gap: 2rem;
    }
}
.t1-host-rounds-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    flex-wrap: wrap;
}
.t1-host-rounds-stepper-label {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}
.t1-host-rounds-stepper-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.t1-host-rounds-stepper-controls span {
    min-width: 1.75em;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
}

/* Each round card. Subtle indigo-tinted bg + accent border to read as
   a level below the outer card. */
.t1-host-round-card {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.06), rgba(255, 255, 255, 0.015));
    border: 1px solid rgba(99, 102, 241, 0.18);
    border-radius: 12px;
    padding: 1rem 1.1rem 1.1rem;
    margin-bottom: 1rem;
}
.t1-host-round-card:last-of-type { margin-bottom: 0; }
.t1-host-round-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-wrap: wrap;
}
.t1-host-round-tag {
    font-size: 11px;
    font-weight: 700;
    color: #c4b5fd;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.t1-host-round-chip {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.22);
    border: 1px solid rgba(99, 102, 241, 0.45);
    color: #c4b5fd;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* A single labelled field within a round/bank card. */
.t1-host-field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.75rem; }
.t1-host-field:last-child { margin-bottom: 0; }
.t1-host-field-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.65);
}
.t1-host-field-label .opt {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 0.45);
    margin-left: 0.25rem;
}
.t1-host-field-help {
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    margin: 0;
}

/* Two fields side-by-side: count + difficulty. Collapses to stacked
   on narrow viewports. */
.t1-host-field-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(140px, 1fr);
    gap: 0.75rem;
    margin-bottom: 0;
}
.t1-host-field-row > .t1-host-field { margin-bottom: 0; }
@media (max-width: 460px) {
    .t1-host-field-row { grid-template-columns: 1fr; }
}

/* Bank sub-card inside a round. Slight tint, accent border. */
.t1-host-bank-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-left: 3px solid rgba(99, 102, 241, 0.6);
    border-radius: 9px;
    padding: 0.85rem 0.9rem 0.9rem 1rem;
    margin-bottom: 0.65rem;
}
.t1-host-bank-card:last-of-type { margin-bottom: 0; }
.t1-host-bank-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}
.t1-host-bank-num {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a5b4fc;
}
.t1-host-bank-remove {
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, border-color 0.15s;
}
.t1-host-bank-remove:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.55);
}

/* Empty / add-bank states. */
.t1-host-empty-banks {
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.65rem;
    background: rgba(251, 191, 36, 0.10);
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 8px;
    font-size: 12.5px;
    color: #fcd34d;
}
.t1-host-add-bank {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 9px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px dashed rgba(99, 102, 241, 0.45);
    color: #c4b5fd;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.t1-host-add-bank:hover:not(:disabled) {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.7);
}
.t1-host-add-bank:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-style: solid;
}
.t1-host-add-bank-hint {
    margin: 0.45rem 0 0;
    font-size: 11.5px;
    color: #fcd34d;
}

/* Section-divider between the title/venue group and the rounds group
   on /host. Adds visible airspace without an extra card. */
.t1-host-section-rule {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
    margin: 1.1rem 0 1rem;
    border: 0;
}

/* ========================================
   New-game notice (end-game screen)
   ========================================
   Shown when the host has created a successor session with
   "keep teams". Players still polling on the old session see it
   inside their Game Over screen with a pulsing border + glow so
   the call to action survives the celebration. */
.t1-new-game-notice {
    position: relative;
    display: none;            /* JS toggles to "block" */
    margin: 0 0 1rem;
    padding: 1.4rem 1.25rem;
    border-radius: 18px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #ec4899 100%);
    box-shadow: 0 16px 40px -10px rgba(99, 102, 241, 0.45);
    overflow: hidden;
    animation: t1NewGamePulse 2.4s ease-in-out infinite;
    isolation: isolate;
}
.t1-new-game-notice-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(255,255,255,0.22), transparent 60%);
    z-index: -1;
    animation: t1NewGameGlow 4s ease-in-out infinite;
}
.t1-new-game-notice-eyebrow {
    display: inline-block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    opacity: 0.88;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.t1-new-game-notice-join {
    background: #fff !important;
    color: #4338ca !important;
    border: 0 !important;
    font-weight: 700 !important;
    padding: 0.65rem 1.25rem !important;
}
.t1-new-game-notice-stay {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.45) !important;
    color: #fff !important;
    padding: 0.65rem 1rem !important;
}
@keyframes t1NewGamePulse {
    0%, 100% { box-shadow: 0 16px 40px -10px rgba(99, 102, 241, 0.45); }
    50%      { box-shadow: 0 16px 40px -10px rgba(139, 92, 246, 0.75); }
}
@keyframes t1NewGameGlow {
    0%, 100% { transform: scale(1)   rotate(0deg); }
    50%      { transform: scale(1.15) rotate(180deg); }
}

/* ========================================
   Home / Join landing — polished hero + feature cards
   ========================================
   Replaces the old border-stripe `.trivia1-section` layout with a
   real card grid + a louder hero so the entry point feels like a
   product, not a wireframe. */

.t1-join-hero {
    text-align: center;
    padding: 2rem 1.5rem 1.75rem;
}
.t1-join-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(139, 92, 246, 0.4);
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.85rem;
}
.t1-join-hero-eyebrow i { color: #fcd34d; }
.t1-join-hero-title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.7rem, 5vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
}
.t1-join-hero-sub {
    margin: 0 auto 1.3rem;
    max-width: 36ch;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.7);
}
.t1-join-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    max-width: 420px;
    margin: 0 auto;
}
.t1-join-code-input {
    text-align: center;
    text-transform: uppercase;
    font-family: 'Poppins', 'SF Mono', Menlo, monospace;
    font-size: clamp(1.5rem, 6vw, 1.85rem);
    letter-spacing: 0.3em;
    font-weight: 700;
    padding: 0.85rem 1rem;
}
.t1-join-code-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 0.3em;
}
.t1-join-submit {
    font-size: 1rem;
    padding: 0.85rem 1.25rem;
    font-weight: 700;
}

/* "or" divider between the join form and the host link. */
.t1-join-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem auto 1rem;
    max-width: 420px;
    gap: 0.6rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.t1-join-divider::before,
.t1-join-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.t1-join-host-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: 420px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    color: var(--text-primary, #fff);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s, border-color 0.15s;
}
.t1-join-host-link:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(139, 92, 246, 0.45);
}
.t1-join-host-link > i:first-child {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: rgba(99, 102, 241, 0.18);
    color: #a5b4fc;
}
.t1-join-host-link strong { font-weight: 700; }

/* Feature grid — proper cards instead of the old border-stripe
   sections. Auto-fit so 1 column on phones, 2 on tablets+. */
.t1-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
}
.t1-feature-card {
    padding: 1.1rem 1.15rem 1.15rem;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
}
.t1-feature-card:hover {
    background: rgba(255, 255, 255, 0.045);
    border-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}
.t1-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}
.t1-feature-card h3 {
    margin: 0 0 0.4rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary, #fff);
}
.t1-feature-card p {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.72);
}

/* Final loud "host?" CTA. Gradient bg, pulsing glow, two buttons. */
.t1-host-cta {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: 1.75rem 1.5rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 60%, #ec4899 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 18px 40px -12px rgba(99, 102, 241, 0.5);
}
.t1-host-cta-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.18), transparent 60%);
    z-index: -1;
    animation: t1HostCtaGlow 6s ease-in-out infinite;
}
@keyframes t1HostCtaGlow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50%      { transform: scale(1.15) rotate(180deg); }
}
.t1-host-cta-icon {
    font-size: 2.2rem;
    margin-bottom: 0.6rem;
    color: rgba(255, 255, 255, 0.95);
}
.t1-host-cta h2 {
    margin: 0 0 0.45rem;
    font-size: 1.45rem;
    font-weight: 800;
}
.t1-host-cta p {
    margin: 0 auto 1.1rem;
    max-width: 38ch;
    font-size: 0.95rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
}
.t1-host-cta-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}
.t1-host-cta-actions .trivia1-btn-primary {
    background: #fff !important;
    color: #4338ca !important;
    border: 0 !important;
    font-weight: 700 !important;
    padding: 0.7rem 1.2rem !important;
}
.t1-host-cta-secondary {
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 0.7rem 1rem !important;
}

/* Scan-QR button under the join form. Same width as the join
   submit so the column reads as one stack. */
.t1-join-scan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 420px;
    margin: 0.6rem auto 0;
    padding: 0.7rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: var(--text-primary, #fff);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.t1-join-scan-btn i {
    color: #a5b4fc;
}
.t1-join-scan-btn:hover {
    background: rgba(99, 102, 241, 0.14);
    border-color: rgba(139, 92, 246, 0.55);
    border-style: solid;
    color: #fff;
}
.t1-join-scan-btn:active { transform: translateY(1px); }

/* QR scanner dialog — small modal that holds the live video. */
.t1-qr-dialog {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--bg-secondary, #161620);
    color: var(--text-primary, #fff);
    padding: 0;
    border-radius: 14px;
    max-width: 420px;
    width: calc(100% - 2rem);
    overflow: hidden;
}
.t1-qr-dialog::backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}
.t1-qr-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}
.t1-qr-dialog-header i { color: #a5b4fc; margin-right: 4px; }
.t1-qr-dialog-close {
    background: transparent;
    border: 0;
    color: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
}
.t1-qr-dialog-close:hover { color: #fff; }
.t1-qr-dialog-stage {
    position: relative;
    min-height: 280px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.t1-qr-dialog-status {
    margin: 0;
    padding: 1rem;
    text-align: center;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}
.t1-qr-dialog-status[data-kind="error"] { color: #fca5a5; }
.t1-qr-reader {
    width: 100%;
}
.t1-qr-reader video {
    width: 100% !important;
    height: auto !important;
    border-radius: 0;
}
.t1-qr-dialog-help {
    margin: 0;
    padding: 0.65rem 1rem 0.85rem;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

/* Loading / permission placeholder inside the QR dialog stage.
   Replaces the bare paragraph-on-black look with a centred,
   readable hint block — what the visitor sees BEFORE the camera
   feed arrives (or if it never does). */
.t1-qr-dialog-placeholder {
    width: 100%;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: linear-gradient(160deg, rgba(99,102,241,0.10), rgba(0,0,0,0.7));
    color: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}
.t1-qr-dialog-placeholder i { color: #c4b5fd; }
.t1-qr-dialog-placeholder .t1-qr-dialog-status {
    margin: 0;
    padding: 0;
    font-size: 13.5px;
    max-width: 32ch;
    line-height: 1.5;
}
.t1-qr-dialog-placeholder .t1-qr-dialog-status[data-kind="error"] {
    color: #fca5a5;
}
.t1-qr-dialog-placeholder .t1-qr-dialog-status strong {
    color: #fff;
}
/* When the live video kicks in, lock the reader to a sane height. */
.t1-qr-reader {
    width: 100%;
    background: #000;
}

/* ========================================
   /host on mobile — squeeze the padding stack
   ========================================
   Outer card (32px) + fieldset (20px) + round (17px) + bank (17px)
   eats >100px of horizontal width on a 375px phone. Override the
   desktop-friendly numbers under 480px so the form fields breathe
   and the bank-picker chevron stops fighting long category names. */
@media (max-width: 480px) {
    /* Outer marketing card: still cushion the top/bottom, but kill
       the horizontal hug so nested cards can use the real screen. */
    .trivia1-card {
        padding: 1.25rem 0.85rem;
    }

    /* Fieldset around the rounds section. */
    .t1-host-rounds-fieldset {
        padding: 0.85rem 0.7rem 0.95rem;
    }
    .t1-host-rounds-legend {
        font-size: 0.9rem;
    }

    /* Each round card. Bank-card is nested inside this. */
    .t1-host-round-card {
        padding: 0.75rem 0.7rem 0.85rem;
        margin-bottom: 0.75rem;
    }
    .t1-host-round-header {
        margin-bottom: 0.7rem;
        padding-bottom: 0.45rem;
    }

    /* Bank sub-card: flatten it. On desktop the box has its own
       background, border, and 1rem inner padding so each bank reads
       as a card-in-a-card. On mobile that nesting wastes width — drop
       to a left-border accent only and reclaim ~30px per row. */
    .t1-host-bank-card {
        background: transparent;
        border: 0;
        border-left: 2px solid rgba(99, 102, 241, 0.55);
        border-radius: 0;
        padding: 0.25rem 0 0.4rem 0.6rem;
        margin-bottom: 0.85rem;
    }
    .t1-host-bank-card-header {
        margin-bottom: 0.5rem;
    }

    /* Two-up Questions/Difficulty grid keeps falling to one column
       below 460px (existing rule); make sure the gap is tight too. */
    .t1-host-field-row {
        gap: 0.5rem;
    }

    /* Ensure the bank picker has room for its chevron + can show the
       full category name before truncating. Reset the per-input inline
       padding shenanigans for selects specifically, then let the
       chevron's 2.5rem right reserve do its job. */
    .t1-host-bank-card select.trivia1-input {
        padding-left: 0.75rem;
        padding-right: 2.4rem;
        background-position: right 0.7rem center;
    }
}

/* ---- Evergreen content pages (content/*) — readable prose blocks ---- */
.t1-prose {
    max-width: 64ch;
    margin: 1.25rem auto 0;
    line-height: 1.65;
}
.t1-prose h2 {
    font-size: 1.3rem;
    margin: 1.6rem 0 0.5rem;
}
.t1-prose h3 {
    font-size: 1.08rem;
    margin: 1.3rem 0 0.4rem;
}
.t1-prose p { margin: 0 0 0.85rem; opacity: 0.9; }
.t1-prose ul { margin: 0.4rem 0 1rem; padding-left: 1.3rem; list-style: disc; }
.t1-prose li { margin-bottom: 0.4rem; opacity: 0.9; }
.t1-prose a { color: #a5b4fc; }

/* ===== World Trivia — live elimination game (homepage widget + /world) ===== */
.t1-world { background: linear-gradient(160deg, rgba(99,102,241,0.16), rgba(16,185,129,0.08)); border: 1px solid rgba(99,102,241,0.32); }
#wt-game { --wt-accent:#a5b4fc; }
.wt-head { display:flex; align-items:center; justify-content:space-between; margin-bottom:0.6rem; }
.wt-title { font-weight:800; font-size:1.05rem; }
.wt-live { display:inline-flex; align-items:center; gap:5px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.06em; color:#6ee7b7; background:rgba(16,185,129,0.14); padding:3px 8px; border-radius:999px; }
.wt-dot { width:7px; height:7px; border-radius:50%; background:#34d399; animation:wtp 1.6s infinite; }
@keyframes wtp { 0%{box-shadow:0 0 0 0 rgba(52,211,153,.6)} 70%{box-shadow:0 0 0 8px rgba(52,211,153,0)} 100%{box-shadow:0 0 0 0 rgba(52,211,153,0)} }
.wt-stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(70px, 1fr)); gap:0.5rem; margin-bottom:0.85rem; }
.wt-stat { text-align:center; background:rgba(15,23,42,0.4); border-radius:10px; padding:0.5rem 0.3rem; }
.wt-stat b { display:block; font-size:1.15rem; color:#fcd34d; font-variant-numeric:tabular-nums; line-height:1.1; }
.wt-stat span { font-size:10px; text-transform:uppercase; letter-spacing:0.04em; opacity:0.65; }
/* Winner prize pot — gold-tinted so the "tokens to the winner" stat pops. */
.wt-stat-prize { background:rgba(251,191,36,0.14); box-shadow:inset 0 0 0 1px rgba(251,191,36,0.4); }
.wt-stat-ico.fa-coins { color:#fbbf24; }
/* Places-paid note + expandable bracketed payout chart. */
.wt-payouts { margin:-0.35rem 0 0.85rem; }
.wt-payouts-note { font-size:12px; opacity:0.85; display:flex; align-items:center; gap:0.4rem; flex-wrap:wrap; }
.wt-payouts-btn { margin-left:auto; background:none; border:1px solid rgba(167,139,250,0.35); color:#c4b5fd; font-size:11px; font-weight:600; padding:2px 9px; border-radius:999px; cursor:pointer; }
.wt-payouts-btn:hover { background:rgba(167,139,250,0.16); }
.wt-payouts-panel { margin-top:0.5rem; background:rgba(15,23,42,0.5); border:1px solid rgba(255,255,255,0.1); border-radius:10px; padding:0.5rem 0.7rem; max-height:230px; overflow-y:auto; }
.wt-payouts-head { font-size:11px; opacity:0.7; margin-bottom:0.35rem; line-height:1.45; }
.wt-payout-row { display:flex; justify-content:space-between; gap:0.75rem; font-size:12.5px; padding:3px 0; border-top:1px solid rgba(255,255,255,0.06); }
.wt-payout-place { opacity:0.85; }
.wt-payout-amt { font-weight:700; color:#fcd34d; font-variant-numeric:tabular-nums; white-space:nowrap; }
.wt-center { text-align:center; padding:1rem 0; }
.wt-big { font-size:2.4rem; font-weight:800; color:#fcd34d; line-height:1; }
.wt-sub { font-size:0.9rem; opacity:0.8; margin-top:0.25rem; }
.wt-hint { font-size:0.8rem; opacity:0.6; margin-top:0.6rem; max-width:42ch; margin-left:auto; margin-right:auto; }
.wt-qhead { display:flex; align-items:center; justify-content:space-between; margin-bottom:0.4rem; }
.wt-qnum { font-size:11px; text-transform:uppercase; letter-spacing:0.05em; color:var(--wt-accent); font-weight:700; }
.wt-timer { font-size:1.05rem; font-weight:800; color:#fcd34d; font-variant-numeric:tabular-nums; }
.wt-answered { font-size:11px; opacity:0.7; }
.wt-answered-live { text-align:center; margin-top:0.5rem; }
/* Category/universe pill above the question — tells players which world a
   themed premium-bank question is from. */
.wt-qcat { display:table; margin:0.1rem auto 0.5rem; font-size:0.72rem; font-weight:700; text-transform:uppercase; letter-spacing:0.04em; padding:3px 11px; border-radius:999px; background:rgba(167,139,250,0.16); color:#c4b5fd; box-shadow:inset 0 0 0 1px rgba(167,139,250,0.32); }
.wt-question { font-size:1.05rem; font-weight:600; line-height:1.35; margin:0.2rem 0 0.7rem; }
.wt-choices { display:flex; flex-direction:column; gap:0.5rem; }
.wt-choice { position:relative; overflow:hidden; display:flex; align-items:center; gap:0.5rem; text-align:left; padding:0.6rem 0.75rem; border-radius:10px; border:1px solid rgba(148,163,184,0.25); background:rgba(15,23,42,0.45); color:#e2e8f0; font-size:0.92rem; cursor:pointer; transition:border-color .15s, background .15s; width:100%; }
.wt-choice:not(:disabled):hover { border-color:var(--wt-accent); background:rgba(99,102,241,0.18); }
.wt-choice:disabled { cursor:default; }
.wt-choice-label { font-weight:800; opacity:0.6; }
.wt-choice-text { position:relative; z-index:2; flex:1; }
.wt-bar { position:absolute; left:0; top:0; bottom:0; z-index:1; background:rgba(148,163,184,0.18); transition:width .4s ease; }
.wt-correct { border-color:#34d399; } .wt-correct .wt-bar { background:rgba(16,185,129,0.30); }
.wt-wrong { border-color:rgba(239,68,68,0.4); } .wt-wrong .wt-bar { background:rgba(239,68,68,0.18); }
.wt-mine { outline:2px solid var(--wt-accent); }
.wt-pct { position:relative; z-index:2; font-size:0.8rem; font-weight:700; opacity:0.85; }
.wt-elim { text-align:center; font-size:0.85rem; margin-top:0.55rem; color:#fca5a5; }
.wt-trophy { font-size:2.2rem; } .wt-winner { font-size:1.3rem; font-weight:800; color:#fcd34d; }

/* Game-over token prize counter. */
.wt-prize { margin-top:0.6rem; display:flex; align-items:center; justify-content:center; gap:0.6rem; flex-wrap:wrap; }
.wt-pot { font-size:2rem; line-height:1; filter:drop-shadow(0 0 10px rgba(251,191,36,0.55)); animation:wt-pot-bob 1.2s ease-in-out infinite; }
.wt-prize-mine .wt-pot { font-size:2.7rem; }
@keyframes wt-pot-bob { 0%,100% { transform:translateY(0) rotate(-4deg); } 50% { transform:translateY(-3px) rotate(4deg); } }
.wt-prize-body { display:inline-flex; align-items:baseline; gap:0.4rem; flex-wrap:wrap; justify-content:center; }
.wt-prize-label { font-size:0.9rem; opacity:0.85; }
.wt-prize-num { font-size:1.8rem; font-weight:800; color:#fbbf24; font-variant-numeric:tabular-nums; }
.wt-prize-unit { font-size:0.9rem; opacity:0.85; }
.wt-prize-mine .wt-prize-num { font-size:2.6rem; text-shadow:0 0 18px rgba(251,191,36,0.5); }
.wt-prize-mine .wt-prize-label { color:#fff; font-weight:700; }
/* Trivia Royale re-entry -> Q2 entrance. */
.wt-enter-q { animation: wt-enter-q 0.7s ease; }
@keyframes wt-enter-q { from { opacity:0.2; transform:translateY(10px) scale(0.985); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion:reduce){ .wt-enter-q { animation:none; } }

/* Coin explosion from the pot of gold on the win screen — per-coin direction
   (--dx/--dy) set by JS; bursts up/out then falls + fades. */
.wt-coin { position:fixed; z-index:10000; pointer-events:none; transform:translate(-50%,-50%);
    animation:wt-coin-burst 1.9s cubic-bezier(.18,.7,.3,1) forwards; will-change:transform, opacity; }
@keyframes wt-coin-burst {
    0%   { transform:translate(-50%,-50%) translate(0,0) scale(0.3); opacity:0; }
    12%  { opacity:1; }
    45%  { transform:translate(-50%,-50%) translate(var(--dx), var(--dy)) scale(1.15) rotate(180deg); opacity:1; }
    100% { transform:translate(-50%,-50%) translate(calc(var(--dx) * 1.1), calc(var(--dy) + 240px)) scale(0.85) rotate(360deg); opacity:0; }
}
@media (prefers-reduced-motion: reduce) { .wt-coin { display:none; } }

/* Confetti — self-contained, cleaned up by JS after the burst. */
.wt-confetti-piece {
    position:fixed; top:-14px; width:8px; height:14px; z-index:9999;
    pointer-events:none; will-change:transform, opacity;
    animation-name:wt-confetti-fall; animation-timing-function:linear; animation-fill-mode:forwards;
}
@keyframes wt-confetti-fall {
    0%   { transform:translateY(0) rotate(0deg); opacity:1; }
    100% { transform:translateY(110vh) rotate(720deg); opacity:0.9; }
}
@media (prefers-reduced-motion: reduce) { .wt-confetti-piece { display:none; } }
.wt-survivors { margin-top:0.7rem; }
.wt-survivors-h { font-size:11px; text-transform:uppercase; letter-spacing:0.05em; opacity:0.7; margin-bottom:0.35rem; }
.wt-chips { display:flex; flex-wrap:wrap; gap:0.3rem; }
.wt-chip { font-size:0.78rem; padding:2px 8px; border-radius:999px; background:rgba(99,102,241,0.18); color:#c7d2fe; }
/* Store cosmetics rendered on the shortlist — name colors + frames matching the
   purchasable /account/store cosmetics, so the field shows off what players can
   unlock. Frames are box-shadow rings (don't clobber name-colour backgrounds). */
.wt-chip.wt-name-gold { color:#fcd34d; font-weight:700; }
.wt-chip.wt-name-rainbow { font-weight:700; background-image:linear-gradient(90deg,#f87171,#fbbf24,#34d399,#60a5fa,#a78bfa); -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; color:transparent; box-shadow:inset 0 0 0 1px rgba(255,255,255,0.18); }
.wt-chip.wt-frame-gold { box-shadow:0 0 0 1.5px #fcd34d, 0 0 8px rgba(251,191,36,0.45); }
.wt-chip.wt-frame-neon { box-shadow:0 0 0 1.5px #22d3ee, 0 0 9px rgba(34,211,238,0.6); }
.wt-banner { margin-top:0.8rem; text-align:center; padding:0.55rem 0.75rem; border-radius:10px; font-size:0.88rem; background:rgba(15,23,42,0.5); }
.wt-banner-cta { display:block; text-decoration:none; background:#6366f1; color:#fff; font-weight:700; }
.wt-banner-cta:hover { background:#4f46e5; }
.wt-banner-in { color:#6ee7b7; background:rgba(16,185,129,0.12); }
.wt-banner-out { color:#fca5a5; background:rgba(239,68,68,0.12); }
.wt-banner-win { color:#fcd34d; background:rgba(251,191,36,0.14); font-weight:700; }
/* Full-screen /world play variant */
.wt-full { max-width:560px; margin:0 auto; }
.wt-full .wt-big { font-size:3.2rem; }
.wt-full .wt-question { font-size:1.35rem; }
.wt-full .wt-choice { padding:0.85rem 1rem; font-size:1.02rem; }
/* Eliminated / waiting players watch the rest — choices are non-interactive. */
.wt-choice.wt-spectating { opacity:0.55; }
.wt-choice:disabled:not(.wt-correct):not(.wt-wrong) { opacity:0.7; }
/* Selected/locked-in answer during the question (tap again to change). */
.wt-choice.wt-selected { border-color:#6366f1; background:rgba(99,102,241,0.30); }
.wt-choice.wt-selected .wt-choice-text { font-weight:700; }
.wt-check { position:relative; z-index:2; margin-left:auto; font-weight:800; color:#a5b4fc; }

/* Trivia Royale — "play full screen" link (homepage widget) + /world toolbar */
.wt-fullscreen-link { display:flex; align-items:center; justify-content:center; gap:0.4rem; margin-top:0.75rem;
    font-size:0.85rem; font-weight:600; color:#a5b4fc; text-decoration:none; opacity:0.85; }
.wt-fullscreen-link:hover { opacity:1; text-decoration:underline; }
.t1-world-toolbar { display:flex; justify-content:flex-end; max-width:560px; margin:0 auto; width:100%; }
.t1-world-toolbar .trivia1-btn { width:auto; margin:0; font-size:13px; padding:0.4rem 0.85rem; }
/* True fullscreen: center the game card on a dark backdrop. */
#wt-fs-target:fullscreen, #wt-fs-target:-webkit-full-screen {
    display:flex; align-items:center; justify-content:center;
    background:#0f172a; padding:1.5rem; overflow:auto; }
#wt-fs-target:fullscreen .wt-full, #wt-fs-target:-webkit-full-screen .wt-full { width:100%; max-width:640px; }
.wt-credits { text-align:center; font-size:0.78rem; opacity:0.6; margin-top:0.4rem; }
