:root {
  --bg: #0b0d12;
  --panel: #151922;
  --panel-2: #1c2230;
  --line: #2a3242;
  --text: #e8ecf3;
  --muted: #8a94a6;
  --accent: #5b8cff;
  --accent-2: #7aa2ff;
  --danger: #ff5c6c;
  --radius: 14px;
  --maxw: 960px;
}
* { box-sizing: border-box; }
/* The `hidden` attribute must win over component display rules (.banner/.btn set
   display, which would otherwise override the UA [hidden] { display: none }). */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 50% -10%, #182033 0%, var(--bg) 55%);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  min-height: 100vh;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* top bar */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.brand { font-weight: 700; letter-spacing: .3px; font-size: 17px; color: var(--text); }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 18px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 500; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* hero */
.hero { padding: 72px 0 48px; text-align: center; }
.hero h1 { font-size: 44px; margin: 0 0 12px; letter-spacing: -.5px; }
.hero p { color: var(--muted); font-size: 18px; margin: 0 auto 28px; max-width: 560px; }

/* buttons */
.btn {
  display: inline-block; cursor: pointer; border: 0; border-radius: 10px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; font-family: inherit;
  background: var(--accent); color: #fff; transition: filter .15s, transform .05s;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.btn.block { display: block; width: 100%; text-align: center; }

/* cards / panels */
.panel {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 22px;
}

/* game grid */
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); padding: 32px 0 64px; }
.card {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; transition: border-color .15s, transform .1s;
}
.card:hover { transform: translateY(-2px); }
.card .accent-bar { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.card h3 { margin: 0 0 6px; font-size: 19px; display: flex; align-items: center; gap: 9px; }
.card h3 .game-icon { font-size: 17px; width: 22px; text-align: center; flex: 0 0 auto; }
.card .tag { color: var(--muted); font-size: 14px; min-height: 40px; }
.card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.pill { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; }
.pill.live { background: rgba(64, 200, 120, .15); color: #4fd18a; }
.pill.soon { background: rgba(138, 148, 166, .15); color: var(--muted); }

/* auth form */
.auth-shell { min-height: calc(100vh - 74px); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 24px; margin: 0 0 4px; text-align: center; }
.auth-card .sub { color: var(--muted); text-align: center; margin: 0 0 22px; font-size: 14px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input {
  width: 100%; padding: 11px 12px; border-radius: 10px; font-size: 15px; font-family: inherit;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); outline: none;
}
.field input:focus { border-color: var(--accent); }
.msg { min-height: 20px; font-size: 13px; margin: 6px 0 12px; }
.msg.err { color: var(--danger); }
.msg.ok { color: #4fd18a; }

.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; padding: 24px 0; text-align: center; }
.user-chip { color: var(--muted); font-size: 14px; }
.user-chip b { color: var(--text); }

/* nav icons + active state */
.nav-links a.active { color: var(--text); }
.nav-links a i { margin-right: 5px; opacity: .8; }

/* profile */
.profile-page { max-width: 480px; margin: 32px auto 0; display: flex; flex-direction: column; gap: 18px; }
.profile-card h1 { display: flex; align-items: center; gap: 8px; font-size: 24px; margin: 0 0 4px; }
.profile-card h1 i { color: var(--accent); font-size: 20px; }
.profile-card .card-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 4px; }
.profile-card .card-title i { color: var(--accent); }
.profile-card .sub { color: var(--muted); margin: 0 0 20px; font-size: 14px; }

/* inline banner (e.g. password-was-reset notice) */
.banner { display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 12px 16px; font-size: 14px; }
.banner.warn { background: rgba(255, 176, 32, .12); border: 1px solid rgba(255, 176, 32, .35); color: #ffcf80; }
.banner code, .admin-table code, #content code { background: rgba(255,255,255,.08); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.avatar-row { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.avatar-preview {
  width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; overflow: hidden;
  background: var(--panel-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
}
.avatar-preview i { font-size: 34px; color: var(--muted); }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.btn.small { padding: 7px 12px; font-size: 13px; }
.avatar-actions .hint { color: var(--muted); font-size: 12px; }
.field label .lock { float: right; color: var(--muted); font-weight: 400; font-size: 12px; }
.field input:disabled { color: var(--muted); cursor: not-allowed; opacity: .8; }

/* admin table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0 64px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table thead th { color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; background: var(--panel); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(255,255,255,.02); }
.admin-table .muted { color: var(--muted); }
.admin-table .nowrap { white-space: nowrap; }
.u-handle { display: flex; align-items: center; gap: 8px; }
.u-handle i { color: var(--muted); }
.u-handle b { color: var(--text); font-weight: 600; }
.badge { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 999px; }
.badge.admin { background: rgba(91,140,255,.18); color: var(--accent-2); }
.badge.warn { background: rgba(255,176,32,.16); color: #ffcf80; }
.cell-input {
  width: 100%; min-width: 140px; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-family: inherit;
  background: var(--bg); border: 1px solid var(--line); color: var(--text); outline: none; transition: border-color .15s;
}
.cell-input:focus { border-color: var(--accent); }
.cell-input.saved { border-color: #4fd18a; }
.col-actions { white-space: nowrap; text-align: right; }
.col-actions .btn { margin-left: 6px; }

/* verify toggle (admin console "Known" column) */
.col-verify { width: 1%; text-align: center; white-space: nowrap; }
.verify-tick {
  background: none; border: 0; cursor: pointer; padding: 4px; line-height: 1;
  font-size: 20px; transition: color .15s, transform .05s;
}
.verify-tick:active { transform: translateY(1px); }
.verify-tick.off { color: var(--line); }
.verify-tick.off:hover { color: var(--muted); }
.verify-tick.on { color: #4fd18a; }
.verify-tick.locked { cursor: default; opacity: .75; }
.verify-tick:disabled { opacity: .5; cursor: default; }

/* "verified" badge shown to the verified user themselves */
.verified-badge {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 18px;
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: rgba(79, 209, 138, .12); border: 1px solid rgba(79, 209, 138, .35); color: #4fd18a;
}
.verified-badge i { font-size: 14px; }
.nav-links a.verified-chip, .nav-links .verified-chip { color: #4fd18a; }

@media (max-width: 640px) { .admin-table .hide-sm { display: none; } }
