:root {
  --bg:        #0d0d0d;
  --bg-card:   #141414;
  --border:    #1f1f1f;
  --gold:      #c9a840;
  --gold-dim:  #a88a32;
  --cream:     #ede8d8;
  --muted:     #7a7670;
  --font-sans: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.ads-consent-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 999;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.ads-consent-inner {
  width: min(760px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(201, 168, 64, 0.25);
  border-radius: 14px;
  background: rgba(20, 20, 20, 0.96);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
}

.ads-consent-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ads-consent-copy strong {
  color: var(--cream);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ads-consent-copy p {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.ads-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.ads-consent-btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.ads-consent-btn:hover {
  transform: translateY(-1px);
}

.ads-consent-btn-primary {
  background: var(--gold);
  color: #111;
}

.ads-consent-btn-secondary {
  background: transparent;
  border-color: rgba(237, 232, 216, 0.3);
  color: var(--cream);
}

@media (max-width: 640px) {
  .ads-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .ads-consent-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ─── NAV ─────────────────────────────────────────────── */

body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  height: 64px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

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

.nav-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-logo .icon {
  width: 36px;
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-logo .icon svg {
  width: 36px;
  height: 36px;
}

.nav-logo .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.nav-logo .precision {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
}

.nav-logo .scripts {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--cream);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-login {
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--cream);
  border: 1px solid rgba(237,232,216,0.25);
  transition: border-color 0.2s, color 0.2s;
}

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

.nav-user {
  position: relative;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid rgba(237,232,216,0.25);
  border-radius: 6px;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.nav-user-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.nav-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-chevron {
  flex-shrink: 0;
  transition: transform 0.2s;
  color: var(--muted);
}

.nav-user.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem;
  z-index: 200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.nav-user.open .nav-dropdown {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 5px;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--cream);
  text-decoration: none;
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-dropdown-item:hover {
  background: rgba(237,232,216,0.06);
  color: var(--cream);
}

.nav-dropdown-logout {
  color: #fca5a5;
}

.nav-dropdown-logout:hover {
  background: rgba(220,38,38,0.1);
  color: #fca5a5;
}

/* ─── HERO ────────────────────────────────────────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

/* Radial glow behind hero text */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(201,168,64,0.07) 0%, transparent 70%);
  pointer-events: none;
}

/* Subtle grid overlay */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,64,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,64,0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.9rem;
  border: 1px solid rgba(201,168,64,0.35);
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 0.2rem;
  color: var(--cream);
  position: relative;
  z-index: 1;
}

.hero h1 span {
  color: var(--gold);
}

.hero-sub {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-desc {
  max-width: 520px;
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 2.75rem;
  position: relative;
  z-index: 1;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ─── BUTTONS ─────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2.25rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--gold);
  color: #0d0d0d;
}

.btn-primary:hover {
  background: #dbb94a;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,64,0.3);
}

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

.btn-outline {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(237,232,216,0.25);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(201,168,64,0.1);
}

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

/* ─── GAMES STRIP ─────────────────────────────────────── */

.games-strip {
  padding: 3.5rem 2rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.games-strip h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.games-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.game-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cream);
  transition: border-color 0.2s, color 0.2s;
}

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

.game-chip svg {
  color: var(--gold);
  flex-shrink: 0;
}

/* ─── FEATURES ────────────────────────────────────────── */

.features {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--cream);
  margin-bottom: 3.5rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.25s, transform 0.25s;
}

.feature-card:hover {
  border-color: rgba(201,168,64,0.3);
  transform: translateY(-3px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201,168,64,0.08);
  border: 1px solid rgba(201,168,64,0.15);
  border-radius: 8px;
  margin-bottom: 1rem;
  color: var(--gold);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.65;
}

/* ─── CTA BANNER ──────────────────────────────────────── */

.cta-banner {
  margin: 0 2rem 6rem;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-card);
  border: 1px solid rgba(201,168,64,0.2);
  border-radius: 16px;
  padding: 3.5rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201,168,64,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.5rem;
}

.cta-banner p {
  font-size: 0.9rem;
  color: var(--muted);
}

.cta-banner .btn-primary {
  flex-shrink: 0;
}

/* ─── FOOTER ──────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.footer-logo .precision {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--cream);
  text-transform: uppercase;
}

.footer-logo .scripts {
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--cream);
}

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

/* ─── AUTH / REGISTER ────────────────────────────────── */

.auth-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.auth-sub {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

.auth-error {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 6px;
  padding: 0.65rem 1rem;
  font-size: 0.825rem;
  color: #fca5a5;
  margin-bottom: 1.25rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--cream);
  text-transform: uppercase;
}

.auth-field input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.75rem 1rem;
  color: var(--cream);
  font-size: 0.9rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

.auth-field input:focus {
  border-color: var(--gold);
}

.auth-field input::placeholder {
  color: var(--muted);
  letter-spacing: 0.1em;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

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

.auth-hint {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.auth-hint a {
  color: var(--gold);
  text-decoration: none;
}

.auth-hint a:hover {
  text-decoration: underline;
}

/* ─── DASHBOARD ──────────────────────────────────────── */

.db-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 64px);
  margin-top: 64px;
}

.db-sidebar {
  border-right: 1px solid var(--border);
  padding: 1.5rem 0.75rem;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.db-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.db-nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  font-family: var(--font-sans);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.db-nav-item:hover { background: rgba(237,232,216,0.05); color: var(--cream); }
.db-nav-item.active { background: rgba(201,168,64,0.1); color: var(--gold); }
.db-nav-item.active svg { color: var(--gold); }

.db-nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0.85rem;
}

.db-main {
  padding: 2rem 2.5rem;
  min-width: 0;
}

.db-section-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.db-section-header h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cream);
}

.db-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.db-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 0.35rem;
}

.db-card-sub {
  font-size: 0.875rem;
  color: var(--muted);
}

.db-profile-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.db-profile-avatar {
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.db-profile-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cream);
  margin-bottom: 0.4rem;
}

.db-profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.db-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.db-badge-master  { background: rgba(201,168,64,0.15); color: var(--gold); border: 1px solid rgba(201,168,64,0.3); }
.db-badge-admin   { background: rgba(99,102,241,0.15); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.3); }
.db-badge-user    { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border); }
.db-badge-tester  { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.db-badge-active  { background: rgba(34,197,94,0.12); color: #86efac; border: 1px solid rgba(34,197,94,0.25); }
.db-badge-paused  { background: rgba(220,38,38,0.1); color: #fca5a5; border: 1px solid rgba(220,38,38,0.25); }

.db-search {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  color: var(--cream);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  width: 260px;
  flex: 0 0 260px;
  margin-left: auto;
  transition: border-color 0.2s;
}

.db-search:focus { border-color: var(--gold); }
.db-search::placeholder { color: var(--muted); }

.db-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.db-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.db-table thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  white-space: nowrap;
}

.db-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.db-table tbody tr:last-child { border-bottom: none; }
.db-table tbody tr:hover { background: rgba(255,255,255,0.025); }

.db-table td {
  padding: 0.75rem 1rem;
  color: var(--cream);
  vertical-align: middle;
  white-space: nowrap;
}

.db-user-cell {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.db-muted { color: var(--muted) !important; }

.db-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.db-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  background: transparent;
}

.db-btn-ghost { color: var(--muted); }
.db-btn-ghost:hover { background: rgba(237,232,216,0.08); color: var(--cream); }
.db-btn-danger { color: #fca5a5; }
.db-btn-danger:hover { background: rgba(220,38,38,0.15); color: #fca5a5; }
.db-btn-disabled { opacity: 0.3; cursor: not-allowed; }

.db-cell-with-actions { display: flex; align-items: center; gap: 0.35rem; }

.db-gen-form {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.db-input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.9rem;
  color: var(--cream);
  font-size: 0.85rem;
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s;
}

.db-input:focus { border-color: var(--gold); }
.db-input::placeholder { color: var(--muted); }
.db-input:disabled { opacity: 0.4; }

.db-check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--cream);
  cursor: pointer;
  user-select: none;
}

.db-check input {
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

.db-gen-form .btn { padding: 0.5rem 1.5rem; font-size: 0.8rem; }

.db-key-display {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(201,168,64,0.07);
  border: 1px solid rgba(201,168,64,0.3);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.db-key-code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gold);
  word-break: break-all;
}

.db-key-cell { font-family: var(--font-mono); font-size: 0.78rem; }

.db-id-link { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.db-id-link:hover { color: var(--gold); }

.db-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.db-copy-btn:hover { background: rgba(237,232,216,0.08); color: var(--cream); }
tr:hover .db-copy-btn,
.modal-body .db-copy-btn,
.modal-header .db-copy-btn { opacity: 1; }

.db-placeholder-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3.5rem 2rem;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
}

.db-placeholder-card p {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0;
}

.db-placeholder-card span {
  font-size: 0.825rem;
  max-width: 320px;
}

.db-loading {
  display: flex;
  justify-content: center;
  padding: 3rem;
  color: var(--muted);
}

.db-empty, .db-error {
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
}

.db-error { color: #fca5a5; }

.spin {
  animation: spin 1s linear infinite;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  margin-left: auto;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}

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

.modal-body {
  padding: 0.5rem 0;
}

.modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
}

.modal-row:hover { background: rgba(255,255,255,0.02); }

.modal-row span:first-child {
  color: var(--muted);
  font-size: 0.8rem;
  flex-shrink: 0;
}

.modal-row span:last-child { color: var(--cream); text-align: right; }

.db-placeholder-row span:last-child { color: var(--muted) !important; font-style: italic; }

/* ─── RESPONSIVE ──────────────────────────────────────── */

@media (max-width: 768px) {
  .db-layout {
    grid-template-columns: 1fr;
  }

  .db-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0.75rem;
  }

  .db-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
  }

  .db-nav-divider { display: none; }

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

@media (max-width: 640px) {
  body > nav {
    padding: 0 1.25rem;
  }

  .nav-links {
    display: none;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
  }

  .btn {
    justify-content: center;
  }

  .cta-banner {
    flex-direction: column;
    text-align: center;
  }

  footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
  }
}

/* Homepage redesign */
:root {
  --bg-soft: #111111;
  --border-strong: #2d2a21;
  --muted: #8b867b;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 18% 18%, rgba(201, 168, 64, 0.08), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(237, 232, 216, 0.035), transparent 24%),
    radial-gradient(circle at 50% 88%, rgba(201, 168, 64, 0.05), transparent 32%);
  pointer-events: none;
}

body > nav {
  height: 64px;
  padding: 0 32px;
  background: var(--bg);
}

.nav-right {
  gap: 32px;
}

.nav-links {
  gap: 28px;
}

.nav-links a {
  font-weight: 600;
  letter-spacing: 0;
}

.nav-login {
  padding: 8px 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

main {
  padding-top: 64px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 64px);
  display: grid;
  place-items: center;
  padding: 96px 32px 80px;
  text-align: center;
}

.hero::before,
.hero::after {
  display: none;
}

.hero-inner {
  width: min(800px, 100%);
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1 {
  margin-bottom: 0;
  color: var(--cream);
  font-size: clamp(3.25rem, 7.5vw, 6.75rem);
  font-weight: 800;
  line-height: 0.98;
}

.hero-desc {
  max-width: 640px;
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 40px;
}

.hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(237, 232, 216, 0.18);
  border-radius: 999px;
  color: var(--gold);
  text-decoration: none;
  transform: translateX(-50%);
  transition: border-color 0.2s, color 0.2s;
}

.hero-scroll:hover {
  border-color: rgba(201, 168, 64, 0.5);
  color: var(--cream);
}

.btn {
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 12px 24px;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

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

.btn-primary:hover {
  background: #d9b64a;
  box-shadow: none;
}

.btn-outline:hover {
  box-shadow: none;
}

.section {
  width: min(1120px, calc(100% - 64px));
  margin: 0 auto;
  padding: 80px 0;
  border-top: 1px solid var(--border);
}

.section-heading {
  max-width: 640px;
  margin-bottom: 32px;
}

.section-heading h2,
.games-strip h2 {
  margin-bottom: 0;
  color: var(--cream);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: none;
}

.section-heading p:not(.eyebrow) {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.98rem;
}

.games-strip {
  text-align: left;
  border-bottom: none;
}

.games-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  justify-content: stretch;
  gap: 16px;
}

.game-card {
  display: flex;
  flex-direction: column;
  min-height: 212px;
  background: rgba(20, 20, 20, 0.72);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--cream);
  overflow: hidden;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.game-card:hover {
  background: var(--bg-card);
  border-color: rgba(201, 168, 64, 0.45);
  transform: translateY(-1px);
}

.game-card-empty {
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 24px;
  color: var(--muted);
  font-weight: 700;
}

.game-art-wrap {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
}

.game-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.game-art-fallback {
  display: block;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, rgba(201, 168, 64, 0.14), rgba(237, 232, 216, 0.035)),
    var(--bg-card);
}

.game-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
  width: 100%;
  min-height: 76px;
  padding: 16px;
}

.game-name {
  color: var(--cream);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
}

.game-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-working {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #86efac;
}

.status-updating {
  background: rgba(201, 168, 64, 0.12);
  border: 1px solid rgba(201, 168, 64, 0.35);
  color: var(--gold);
}

.status-work-in-progress {
  background: rgba(201, 168, 64, 0.12);
  border: 1px solid rgba(201, 168, 64, 0.35);
  color: var(--gold);
}

.game-card, .game-modal-body {
  container-type: inline-size;
  container-name: script-status;
}

.status-label-short {
  display: none;
  text-decoration: none;
}

@container script-status (max-width: 360px) {
  .status-label-full { display: none; }
  .status-label-short { display: inline; }
}

.status-not-working {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #fca5a5;
}

body.game-modal-open {
  overflow: hidden;
}

.game-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
}

.game-modal {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  width: min(768px, 100%);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.game-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(237, 232, 216, 0.16);
  border-radius: 6px;
  background: rgba(13, 13, 13, 0.72);
  color: var(--cream);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.game-modal-close:hover {
  border-color: rgba(201, 168, 64, 0.5);
  color: var(--gold);
}

.game-modal-art {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f0f0f;
}

.game-modal-art img,
.game-modal-art .game-art-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-modal-body {
  min-width: 0;
  padding: 32px;
}

.game-modal-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 0;
}

.game-modal h3 {
  color: var(--cream);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.15;
}

.game-link {
  display: inline-flex;
  margin-top: 12px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.game-link:hover {
  text-decoration: underline;
}

.game-link { gap: 8px; }
.game-feature-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 32px 0 16px;
}
.game-feature-heading h4 { color: var(--cream); font-size: 1rem; line-height: 1.5; }
.game-feature-heading > span { color: #aaa69e; font-size: 0.875rem; }
.game-feature-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.game-feature-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.5;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.game-feature-tabs button span { font-size: 0.75rem; opacity: 0.7; }
.game-feature-tabs button:hover { background: rgba(237, 232, 216, 0.06); }
.game-feature-tabs button[aria-selected="true"] {
  color: var(--gold);
  background: rgba(201, 168, 64, 0.1);
  border-color: rgba(201, 168, 64, 0.4);
}
.game-modal :focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.game-features-empty { margin-top: 16px; color: #aaa69e; }

.game-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  margin-top: 16px;
  padding: 0;
  list-style: none;
}

.game-features li {
  min-height: 36px;
  padding: 12px 16px;
  background: rgba(237, 232, 216, 0.035);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--cream);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.25;
}

.social-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border-strong);
}

.social-card {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 24px;
  min-height: 80px;
  padding: 24px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--cream);
  text-decoration: none;
  transition: background-color 0.2s;
}

.social-card:hover { background: rgba(237, 232, 216, 0.025); }
.social-card:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.social-icon svg {
  display: block;
  flex: none;
  width: 24px;
  height: 24px;
  color: #fff;
  transition: color 0.2s;
}

.social-details {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr);
  align-items: baseline;
  gap: 24px;
}

.social-card strong { font-size: 1rem; font-weight: 500; line-height: 1.5; }
.social-card small { color: #aaa69e; font-size: 0.875rem; line-height: 1.5; overflow-wrap: anywhere; }
.social-arrow { justify-self: end; color: #aaa69e; transition: color 0.2s; }
.social-card:hover .social-arrow,
.social-card:focus-visible .social-arrow,
.social-card:hover .social-icon svg,
.social-card:focus-visible .social-icon svg { color: var(--gold); }

@media (prefers-reduced-motion: reduce) {
  .social-card,
  .social-icon svg,
  .social-arrow {
    transition: none;
  }
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-list details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
}

.faq-list details[open] {
  border-color: var(--border-strong);
}

.faq-list summary {
  color: var(--cream);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
}

.faq-list summary::marker {
  color: var(--gold);
}

.faq-list p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.94rem;
}

footer {
  gap: 24px;
  padding: 32px;
}

.footer-logo .precision {
  font-weight: 800;
}

.footer-logo .scripts {
  font-weight: 700;
}

.footer-links {
  gap: 20px;
  flex-wrap: wrap;
}

@media (max-width: 780px) {
  .social-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  body > nav {
    padding: 0 20px;
  }

  .nav-right {
    gap: 16px;
  }

  .hero {
    padding: 80px 20px 64px;
  }

  .hero h1 {
    font-size: clamp(3rem, 18vw, 4.5rem);
  }

  .hero-actions {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .section {
    width: calc(100% - 40px);
    padding: 64px 0;
  }

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

  .game-card {
    min-height: 0;
  }

  .game-card-body {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: 88px;
  }

  .game-status {
    width: fit-content;
  }

  .game-modal-overlay {
    align-items: flex-start;
    padding: 20px;
    overflow-y: auto;
  }

  .game-modal {
    grid-template-columns: 1fr;
    max-height: none;
  }

  .game-modal-art {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .game-modal-body {
    padding: 24px;
  }

  .game-modal-title-row {
    flex-direction: column;
    padding-right: 0;
  }

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

  .social-card {
    gap: 16px;
    padding: 24px 8px;
  }

  .social-details {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  footer {
    align-items: flex-start;
    padding: 28px 20px;
  }
}
