:root {
    --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --bg: #F8FAFC;
    --surface: #FFFFFF;
    --surface-2: #F1F5F9;
    --ink: #0F172A;
    --muted: #475569;
    --line: #E2E8F0;
    --accent: #2563EB;
    --accent-hover: #1D4ED8;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(37, 99, 235, 0.10);
    --gold: #D97706;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html.dark {
    --bg: #090D16;
    --surface: #111827;
    --surface-2: #1E293B;
    --ink: #F8FAFC;
    --muted: #94A3B8;
    --line: #1F2937;
    --accent: #3B82F6;
    --accent-hover: #60A5FA;
    --accent-ink: #FFFFFF;
    --accent-soft: rgba(59, 130, 246, 0.16);
    --gold: #F59E0B;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font-body); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.025em; margin: 0; color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
.tabular { font-variant-numeric: tabular-nums; }
[x-cloak] { display: none !important; }

/* Demo top switcher bar */
.demo-bar { background: #0F172A; color: #F8FAFC; border-bottom: 1px solid #1E293B; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; position: sticky; top: 0; z-index: 60; }
.demo-bar-tabs { display: inline-flex; background: #1E293B; padding: 3px; border-radius: 9px; gap: 3px; }
.demo-tab { padding: 5px 12px; border-radius: 7px; border: 0; background: transparent; color: #CBD5E1; font-weight: 600; font-size: 13px; cursor: pointer; transition: background 150ms, color 150ms; }
.demo-tab.active { background: #2563EB; color: #FFFFFF; }

.shell { display: flex; min-height: calc(100vh - 46px); }
.rail { width: 240px; flex-shrink: 0; background: var(--surface); border-inline-end: 1px solid var(--line); position: sticky; top: 46px; height: calc(100vh - 46px); overflow-y: auto; display: flex; flex-direction: column; }
@media (max-width: 1023px) { .rail { display: none; } }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { position: sticky; top: 46px; z-index: 30; height: 64px; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 20px; display: flex; align-items: center; gap: 12px; }
.content { max-width: 1420px; width: 100%; margin: 0 auto; padding: 24px 20px 64px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-weight: 600; font-size: 13px; line-height: 1; border-radius: 10px; padding: 10px 16px; cursor: pointer; border: 1px solid transparent; transition: background-color 150ms var(--ease), border-color 150ms var(--ease), transform 150ms var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--ink); }

.nav-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 10px; border: 0; background: transparent; color: var(--muted); font-size: 13.5px; font-weight: 500; text-align: start; cursor: pointer; transition: background-color 140ms, color 140ms; }
.nav-item:hover { background: var(--surface-2); color: var(--ink); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.input { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px; font-size: 14px; outline: none; transition: border-color 140ms, box-shadow 140ms; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.surface { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.surface-2 { background: var(--surface-2); border-radius: 12px; }

.spotlight-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 1024px) { .spotlight-grid { grid-template-columns: 8fr 4fr; } }

.spotlight-stage { position: relative; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #090D16; aspect-ratio: 16 / 9; min-height: 280px; }
.spotlight-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spotlight-grad { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(9,13,22,0.05) 35%, rgba(9,13,22,0.92) 100%); }
.spotlight-info { position: absolute; inset-inline: 0; bottom: 0; padding: 24px 28px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }

.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (min-width: 640px) { .game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .game-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .cat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .cat-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; cursor: pointer; text-align: start; padding: 0; transition: transform 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease); }
.card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 12px 28px -12px rgba(15, 23, 42, 0.18); }
.card-media { position: relative; aspect-ratio: 16 / 10; background: var(--surface-2); overflow: hidden; width: 100%; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 260ms var(--ease); }
.card:hover .card-media img { transform: scale(1.05); }
.card-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.34); opacity: 0; transition: opacity 160ms; }
.card:hover .card-play { opacity: 1; }
.card-body { padding: 11px 12px; width: 100%; }
.card-title { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.stage-theater { position: fixed; inset: 0; z-index: 80; background: #060A12; display: flex; flex-direction: column; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title { font-size: 21px; font-weight: 700; }
.link-accent { color: var(--accent); font-size: 13.5px; font-weight: 600; cursor: pointer; border: 0; background: transparent; padding: 0; }
.link-accent:hover { text-decoration: underline; }

.split-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 1024px) { .split-2 { grid-template-columns: 7fr 5fr; } }

.grid-3 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.grid-4 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.game-layout { display: grid; grid-template-columns: 1fr; gap: 22px; align-items: start; }
@media (min-width: 1200px) { .game-layout { grid-template-columns: 9fr 3fr; } }

table.pd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.pd-table th { text-align: start; padding: 11px 14px; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
table.pd-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }

.modal-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.55); }
.modal-card { position: relative; z-index: 1; width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 24px 48px rgba(0,0,0,0.3); }

.toast { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 100; background: #0F172A; color: #F8FAFC; border: 1px solid #334155; padding: 12px 16px; border-radius: 12px; font-size: 13.5px; box-shadow: 0 12px 28px rgba(0,0,0,0.3); }
