/* ─── Variables & Pixel Art Design System ─────────────────────────────── */
:root {
  --bg:          #0a0a12;
  --bg-card:     #12121e;
  --bg-card2:    #181829;
  --bg-card-hover:#202035;
  --bg-input:    #0c0c16;
  --bg-dark:     #06060a;

  --border:      #2c2c44;
  --border-light:#3e3e60;
  --border-glow: rgba(245, 158, 11, 0.25);
  --border-pixel:#1a1a2b;

  --gold:        #f59e0b;
  --gold-light:  #fbbf24;
  --gold-dark:   #b45309;
  --gold-glow:   rgba(245, 158, 11, 0.4);

  --text:        #e8e4d8;
  --text-muted:  #9490a8;
  --text-dim:    #5e5a74;

  --red:         #ef4444;
  --red-dark:    #991b1b;
  --green:       #22c55e;
  --green-dark:  #166534;
  --blue:        #3b82f6;
  --blue-dark:   #1e40af;
  --orange:      #f97316;
  --purple:      #a855f7;
  --cyan:        #06b6d4;

  --radius-sm:   2px;
  --radius:      4px;
  --radius-lg:   6px;

  --font-pixel:  'Pixelify Sans', cursive, sans-serif;
  --font-retro:  'Press Start 2P', monospace;
  --font-heading:'Pixelify Sans', cursive, sans-serif;
  --font-body:   'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --sidebar-w:   220px;
  --navbar-h:    64px;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(30, 25, 50, 0.5) 0%, transparent 60%),
    linear-gradient(rgba(10, 10, 18, 0.98), rgba(10, 10, 18, 0.98)),
    repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.25) 2px, rgba(0, 0, 0, 0.25) 4px);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gold-light); }
img, canvas { image-rendering: pixelated; image-rendering: -moz-crisp-edges; image-rendering: crisp-edges; }
input, select, textarea, button { font-family: inherit; }
strong { font-weight: 600; color: #fff; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.25; letter-spacing: 0.02em; }

/* ─── Pixel Art Box Helpers ─────────────────────────────────────────────────── */
.pixel-box {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.06),
    0 4px 12px rgba(0,0,0,0.4);
}

.pixel-box-sm {
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  box-shadow: inset -1px -1px 0 0 rgba(0,0,0,0.5), inset 1px 1px 0 0 rgba(255,255,255,0.05);
}

.pixel-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--gold-dark) 50%, var(--border) 80%, transparent 100%);
  margin: 1rem 0;
}

/* ─── Layout ─────────────────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: .85rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-6 { margin-top: 2.25rem; }
.mt-8 { margin-top: 3rem; }
.mb-2 { margin-bottom: .85rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-6 { margin-bottom: 2.25rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: .82rem; }
.mono { font-family: monospace; }

/* ─── Navbar ─────────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(180deg, rgba(14,12,24,.98) 0%, rgba(10,8,18,.98) 100%);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  height: var(--navbar-h);
  backdrop-filter: blur(8px);
}
.navbar-inner {
  max-width: 1280px; margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 1.25rem; padding: 0 24px;
}
.navbar-brand { display: flex; align-items: center; flex-shrink: 0; }
.navbar-logo { height: 38px; width: auto; display: block; filter: drop-shadow(0 0 8px rgba(245,158,11,.3)); transition: filter .2s; }
.navbar-logo:hover { filter: drop-shadow(0 0 16px rgba(245,158,11,.6)); }

.navbar-links { display: flex; gap: .35rem; margin-left: .75rem; }
.nav-link {
  font-family: var(--font-pixel);
  padding: .45rem .85rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 1rem;
  letter-spacing: 0.03em;
  transition: all .15s;
  border: 1px solid transparent;
}
.nav-link:hover, .nav-link.active {
  color: var(--gold-light);
  background: rgba(245,158,11,.1);
  border-color: rgba(245,158,11,.3);
  text-shadow: 0 0 8px rgba(245,158,11,.4);
}
.nav-link-admin { color: var(--orange) !important; }
.navbar-auth { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.user-chip {
  display: flex; align-items: center; gap: .5rem; padding: .3rem .75rem;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  border-radius: var(--radius);
}
.user-avatar { width: 32px; height: 32px; border-radius: 4px; border: 1px solid var(--gold-dark); }
.user-avatar-sm { width: 26px; height: 26px; border-radius: 4px; }
.user-name { font-family: var(--font-pixel); font-size: 1rem; color: var(--text); }
.user-avatar-initials {
  background: var(--bg-card2); border: 1px solid var(--gold-dark);
  color: var(--gold); font-family: var(--font-pixel); font-size: 1rem;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 4px; flex-shrink: 0;
}

/* ─── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .5rem 1.1rem;
  font-family: var(--font-pixel);
  font-size: .95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 2px solid #111;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .1s ease;
  white-space: nowrap;
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.25);
  user-select: none;
}
.btn:active {
  transform: translate(2px, 2px);
  box-shadow: inset 2px 2px 0 0 rgba(0,0,0,0.7);
}

.btn-primary  { background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%); color: #0a0a0f; border-color: #78350f; }
.btn-primary:hover { background: linear-gradient(180deg, #fde68a 0%, #f59e0b 100%); color: #0a0a0f; }

.btn-danger   { background: linear-gradient(180deg, #f87171 0%, #dc2626 100%); color: #fff; border-color: #7f1d1d; }
.btn-danger:hover { background: linear-gradient(180deg, #fca5a5 0%, #ef4444 100%); }

.btn-success  { background: linear-gradient(180deg, #4ade80 0%, #16a34a 100%); color: #fff; border-color: #14532d; }
.btn-success:hover { background: linear-gradient(180deg, #86efac 0%, #22c55e 100%); }

.btn-warning  { background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%); color: #fff; border-color: #7c2d12; }
.btn-warning:hover { background: linear-gradient(180deg, #fdba74 0%, #f97316 100%); }

.btn-outline  { background: var(--bg-card2); color: var(--gold); border: 2px solid var(--gold-dark); }
.btn-outline:hover { background: rgba(245,158,11,.15); color: var(--gold-light); border-color: var(--gold); }

.btn-ghost    { background: var(--bg-card2); color: var(--text-muted); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--gold-dark); color: var(--gold); background: var(--bg-card-hover); }

.btn-steam    { background: linear-gradient(180deg, #2a475e 0%, #1b2838 100%); color: #c6d4df; border-color: #0f1822; }
.btn-steam:hover { background: linear-gradient(180deg, #3d6d8a 0%, #2a475e 100%); color: #fff; }

.btn-lg  { padding: .75rem 1.6rem; font-size: 1.15rem; }
.btn-sm  { padding: .3rem .75rem; font-size: .85rem; }
.btn-xs  { padding: .2rem .5rem; font-size: .75rem; }

/* ─── Hero Section ───────────────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  min-height: 560px; display: flex; align-items: center; justify-content: center;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(to bottom, rgba(10,10,18,.7) 0%, rgba(10,10,18,.35) 40%, rgba(10,10,18,.85) 80%, rgba(10,10,18,.98) 100%),
    linear-gradient(to right, rgba(10,10,18,.4) 0%, transparent 50%, rgba(10,10,18,.4) 100%);
}
.hero-content {
  position: relative; z-index: 2; text-align: center;
  padding: 60px 24px; max-width: 760px;
  display: flex; flex-direction: column; align-items: center;
}
.hero-logo {
  width: min(480px, 85vw); height: auto;
  display: block; margin-bottom: 1.5rem;
  filter: drop-shadow(0 4px 24px rgba(245,158,11,.4));
  animation: heroLogoIn .8s ease-out both;
}
@keyframes heroLogoIn {
  from { opacity: 0; transform: translateY(-10px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.hero-title { font-size: clamp(2.4rem, 6vw, 3.8rem); color: var(--gold); text-shadow: 0 0 32px rgba(245,158,11,.4); margin-bottom: .5rem; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; line-height: 1.7; max-width: 560px; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Stats Bar ──────────────────────────────────────────────────────────────── */
.stats-bar {
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}
.stats-bar-inner {
  max-width: 860px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
}
.stat-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  padding: 1.2rem 1rem; text-align: center;
}
.stat-value { font-family: var(--font-pixel); font-size: 2rem; color: var(--gold-light); line-height: 1; text-shadow: 0 0 10px rgba(245,158,11,.3); }
.stat-label { font-family: var(--font-pixel); font-size: .85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: .25rem; }
.stat-divider { width: 2px; height: 44px; background: var(--border); flex-shrink: 0; }
.online-dot::after { content: ''; display: inline-block; width: 8px; height: 8px; background: #22c55e; border-radius: 50%; margin-left: 6px; box-shadow: 0 0 8px #22c55e; animation: pulse 2s infinite; vertical-align: middle; }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.4 } }

/* ─── Features Page (Rich Retro Pixel-Art Layout) ────────────────────────────── */
.feat-hero {
  padding: 4.5rem 0 2.5rem;
  text-align: center;
  background: radial-gradient(circle at 50% 30%, rgba(245,158,11,0.1) 0%, transparent 70%);
  border-bottom: 2px solid var(--border);
  margin-bottom: 3rem;
}
.feat-hero-title { font-size: 3rem; color: var(--gold); text-shadow: 0 0 20px rgba(245,158,11,.4); margin-bottom: .6rem; }
.feat-hero-sub { font-size: 1.15rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.feat-section { padding: 3rem 0; }
.feat-section-alt {
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  border-bottom: 2px solid var(--border);
}
.feat-section-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.feat-reverse { direction: rtl; }
.feat-reverse > * { direction: ltr; }
@media (max-width: 820px) {
  .feat-section-inner { grid-template-columns: 1fr; gap: 2rem; }
  .feat-reverse { direction: ltr; }
}

.feat-text { display: flex; flex-direction: column; gap: .75rem; }
.feat-eyebrow {
  display: inline-block; align-self: flex-start;
  font-family: var(--font-pixel); font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--gold); background: rgba(245,158,11,.12);
  border: 1.5px solid var(--gold-dark); border-radius: 2px;
  padding: .2rem .6rem;
}
.feat-title { font-size: 2rem; color: #ffffff; text-shadow: 0 0 12px rgba(255,255,255,.2); }
.feat-body { color: var(--text-muted); font-size: 1rem; line-height: 1.7; }
.feat-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.feat-list li {
  position: relative; padding-left: 1.4rem; color: var(--text); font-size: .95rem; line-height: 1.5;
}
.feat-list li::before {
  content: '◆'; position: absolute; left: 0; color: var(--gold); font-size: .75rem; top: .1rem;
}

.feat-visual {
  background: var(--bg-card2);
  border: 2px solid var(--border);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.06),
    0 8px 24px rgba(0,0,0,0.5);
  border-radius: var(--radius);
  padding: 3rem 2rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; text-align: center; min-height: 280px;
}
.feat-icon-large { font-size: 4rem; filter: drop-shadow(0 0 16px rgba(245,158,11,.4)); }
.feat-stat-pills { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; }
.fsp {
  font-family: var(--font-pixel); font-size: .9rem; font-weight: 600;
  background: var(--bg-dark); color: var(--gold-light);
  border: 1.5px solid var(--border-light); border-radius: 2px;
  padding: .35rem .75rem;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.5), inset 1px 1px 0 rgba(255,255,255,0.08);
  transition: all .15s ease;
}
.fsp:hover { border-color: var(--gold); transform: translateY(-2px); }

.feat-cta-block {
  background: radial-gradient(circle at 50% 50%, rgba(245,158,11,0.12) 0%, rgba(18,18,30,0.95) 100%);
  border: 2px solid var(--gold-dark);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.7),
    inset 2px 2px 0 0 rgba(255,255,255,0.1),
    0 12px 36px rgba(0,0,0,0.7);
  border-radius: var(--radius);
  padding: 3.5rem 2rem;
  text-align: center;
  margin: 3rem 0 4rem;
}
.feat-cta-title { font-size: 2.6rem; color: var(--gold-light); margin-bottom: .8rem; }
.feat-cta-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 2rem; }
.feat-cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ─── Profile & Player Pages (Retro Pixel Card) ──────────────────────────────── */
.profile-layout {
  display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem;
  padding: 2rem 0 3.5rem; align-items: start;
}
@media (max-width: 760px) { .profile-layout { grid-template-columns: 1fr; } }

.profile-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.06),
    0 6px 18px rgba(0,0,0,0.5);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  text-align: center;
}
.profile-visual {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  margin-bottom: 1.25rem;
}
.profile-face {
  width: 80px; height: 80px; image-rendering: pixelated; object-fit: cover;
  border-radius: 4px; border: 2px solid var(--gold-dark); background: var(--bg-dark);
  margin-bottom: .75rem;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.8), 0 0 12px rgba(245,158,11,0.3);
}
.profile-sprite-wrap {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-dark); border: 2px solid var(--border);
  border-radius: 4px; padding: .5rem;
  box-shadow: inset 1px 1px 6px rgba(0,0,0,0.8);
  margin-bottom: .75rem;
}
.profile-avatar-placeholder {
  width: 80px; height: 80px; border-radius: 4px;
  background: var(--bg-dark); border: 2px solid var(--gold-dark);
  font-family: var(--font-pixel); font-size: 2.2rem; color: var(--gold);
  display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem;
}
.profile-avatar-placeholder.lg { width: 96px; height: 96px; font-size: 2.8rem; }

.profile-name { font-family: var(--font-pixel); font-size: 1.8rem; color: var(--gold); margin-bottom: .5rem; letter-spacing: .02em; }
.class-badge {
  display: inline-block; padding: .25rem .75rem;
  font-family: var(--font-pixel); font-size: .85rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  background: rgba(245,158,11,.1); border: 1.5px solid var(--gold-dark);
  color: var(--gold-light); border-radius: 2px;
}
.class-badge.lg { font-size: .95rem; padding: .3rem .9rem; }

.profile-stats-mini {
  margin-top: 1.5rem; border-top: 2px solid var(--border);
  padding-top: 1.1rem; display: flex; flex-direction: column; gap: .65rem; text-align: left;
}
.psm-item { display: flex; justify-content: space-between; font-size: .9rem; }
.psm-label { color: var(--text-muted); }
.psm-val { color: var(--text); font-weight: 600; font-family: var(--font-pixel); }

/* ─── Stat Cards Grid ────────────────────────────────────────────────────────── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
.stat-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  display: flex; align-items: center; gap: .85rem;
}
.stat-card-icon { font-size: 1.8rem; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6)); }
.stat-card-val { font-family: var(--font-pixel); font-size: 1.4rem; color: var(--gold-light); line-height: 1; }
.stat-card-label { font-family: var(--font-pixel); font-size: .8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-top: .25rem; }

/* Equipped Items Paperdoll Grid */
.equipped-grid {
  display: flex; flex-wrap: wrap; gap: 1rem; padding: 1.25rem;
  background: var(--bg-card);
}
.equipped-slot {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  background: var(--bg-dark); border: 2px solid var(--border);
  border-radius: 2px; padding: .6rem;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.8);
}
.equipped-label { font-family: var(--font-pixel); font-size: .8rem; color: var(--gold); text-transform: uppercase; }

/* ─── Inventory Grid (In-Game Inventory Look) ────────────────────────────────── */
.inventory-grid {
  display: flex; flex-wrap: wrap; gap: .4rem; padding: 1.25rem;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset 1px 1px 6px rgba(0,0,0,0.8);
}
.inv-slot {
  width: 48px; height: 48px;
  background: #181828;
  border: 2px solid #333350;
  border-radius: 2px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: default;
  transition: all .12s ease;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.08), inset -1px -1px 0 rgba(0,0,0,0.6);
}
.inv-slot:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(245,158,11,0.3);
}
.inv-icon { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.inv-icon-fallback { color: var(--text-dim); font-size: 1.1rem; }
.inv-qty {
  position: absolute; bottom: 1px; right: 2px;
  font-family: var(--font-pixel); font-size: .8rem; font-weight: 700;
  color: #fff; text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px #000;
  pointer-events: none;
}

.inv-slot-rarity-uncommon  { border-color: #22c55e; }
.inv-slot-rarity-rare      { border-color: #3b82f6; }
.inv-slot-rarity-epic      { border-color: #a855f7; }
.inv-slot-rarity-legendary { border-color: #f97316; }

/* ─── Leaderboard ────────────────────────────────────────────────────────────── */
.lb-controls { margin-bottom: 1.5rem; }
.stat-tabs { display: flex; flex-wrap: wrap; gap: .4rem; }
.stat-tab {
  font-family: var(--font-pixel); font-size: .9rem;
  padding: .4rem .85rem; border-radius: 2px;
  background: var(--bg-card2); color: var(--text-muted);
  border: 1.5px solid var(--border);
  transition: all .15s ease;
}
.stat-tab:hover { border-color: var(--gold-dark); color: var(--gold); }
.stat-tab.active {
  background: rgba(245,158,11,.15); border-color: var(--gold);
  color: var(--gold-light); text-shadow: 0 0 6px rgba(245,158,11,.3);
}

.rank-medal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 2px;
  font-family: var(--font-pixel); font-size: .95rem; font-weight: 700;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.5), inset 1px 1px 0 rgba(255,255,255,0.3);
}
.rank-medal.gold   { background: linear-gradient(180deg, #fbbf24 0%, #d97706 100%); color: #000; border: 1px solid #78350f; }
.rank-medal.silver { background: linear-gradient(180deg, #e2e8f0 0%, #94a3b8 100%); color: #000; border: 1px solid #475569; }
.rank-medal.bronze { background: linear-gradient(180deg, #d97706 0%, #92400e 100%); color: #fff; border: 1px solid #451a03; }
.rank-num { font-family: var(--font-pixel); color: var(--text-muted); }

.player-name { font-family: var(--font-pixel); font-size: 1.05rem; font-weight: 600; color: #fff; }
.player-name:hover { color: var(--gold-light); text-shadow: 0 0 6px rgba(245,158,11,.3); }

/* ─── Live Statistics Page ───────────────────────────────────────────────────── */
.stats-page-header { display: flex; justify-content: space-between; align-items: flex-end; padding: 2.5rem 0 1.5rem; flex-wrap: wrap; gap: 1rem; }
.stats-hero-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem;
  margin-bottom: 2rem;
}
.stats-hero-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1.25rem 1rem; text-align: center;
}
.shc-val { font-family: var(--font-pixel); font-size: 2rem; color: var(--gold-light); line-height: 1; text-shadow: 0 0 8px rgba(245,158,11,.3); }
.shc-label { font-family: var(--font-pixel); font-size: .85rem; color: var(--text-muted); text-transform: uppercase; margin-top: .35rem; }

.stats-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 3rem; }
@media (max-width: 760px) { .stats-grid-2 { grid-template-columns: 1fr; } }
.stats-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stats-card-header {
  font-family: var(--font-pixel); font-size: 1.15rem; color: var(--gold);
  border-bottom: 2px solid var(--border); padding-bottom: .6rem; margin-bottom: .85rem;
  text-transform: uppercase; letter-spacing: .04em;
}
.stats-rank-row { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.stats-rank-row:last-child { border-bottom: none; }
.stats-rank { font-family: var(--font-pixel); font-size: .95rem; color: var(--gold); width: 28px; flex-shrink: 0; }
.stats-rank-info { flex: 1; display: flex; align-items: center; gap: .65rem; min-width: 0; overflow: hidden; }
.stats-rank-name { font-family: var(--font-pixel); font-size: 1rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-rank-val { font-family: var(--font-pixel); font-size: .9rem; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; }

.stats-item-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain;
  image-rendering: pixelated;
  flex-shrink: 0;
  display: inline-block;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: 2px;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.6);
}

.stats-entity-canvas {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  image-rendering: pixelated;
  flex-shrink: 0;
  display: inline-block;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.6);
}

/* ─── Pagination ─────────────────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: .35rem; margin: 2rem 0; }
.pagination a, .pagination span {
  font-family: var(--font-pixel); font-size: .95rem;
  padding: .35rem .75rem; border-radius: 2px;
  background: var(--bg-card2); border: 1.5px solid var(--border);
  color: var(--text-muted);
}
.pagination a:hover { border-color: var(--gold); color: var(--gold-light); }
.pagination span.active { background: rgba(245,158,11,.15); border-color: var(--gold); color: var(--gold-light); }

/* ─── Cards & Tables ─────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.6), inset 2px 2px 0 0 rgba(255,255,255,0.05);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: .85rem 1.25rem;
  background: var(--bg-card2);
  border-bottom: 2px solid var(--border);
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--gold);
  letter-spacing: .04em;
}

.table-wrap, .lb-table-wrap {
  overflow-x: auto;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.6), inset 2px 2px 0 0 rgba(255,255,255,0.05);
}
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table thead { background: var(--bg-card2); }
.data-table th {
  padding: .85rem 1rem;
  text-align: left;
  font-family: var(--font-pixel);
  font-size: .9rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .05em;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(245,158,11,.05); }

/* ─── Pixel Badges & Tags ────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem;
  font-family: var(--font-pixel);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1.5px solid;
  border-radius: 2px;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.4), inset 1px 1px 0 rgba(255,255,255,0.2);
}
.badge-success   { background: #143820; border-color: #22c55e; color: #4ade80; }
.badge-danger    { background: #3f1414; border-color: #ef4444; color: #f87171; }
.badge-warning   { background: #3f2a0e; border-color: #f59e0b; color: #fbbf24; }
.badge-info      { background: #142845; border-color: #3b82f6; color: #60a5fa; }
.badge-secondary { background: var(--bg-card2); border-color: var(--border-light); color: var(--text-muted); }
.badge-purple    { background: #281440; border-color: #a855f7; color: #c084fc; }
.badge-sm        { font-size: .72rem; padding: .1rem .4rem; }

/* ─── Rarity Colors & Borders ────────────────────────────────────────────────── */
.rarity-tag {
  display: inline-flex; align-items: center;
  padding: .18rem .55rem;
  font-family: var(--font-pixel);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  border: 1.5px solid;
  border-radius: 2px;
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.5), inset 1px 1px 0 rgba(255,255,255,0.25);
}
.rarity-common .rarity-tag, .rarity-tag.rarity-common       { background: #22222d; border-color: #6b7280; color: #9ca3af; }
.rarity-uncommon .rarity-tag, .rarity-tag.rarity-uncommon   { background: #0f2e1a; border-color: #22c55e; color: #4ade80; }
.rarity-rare .rarity-tag, .rarity-tag.rarity-rare           { background: #0f2142; border-color: #3b82f6; color: #60a5fa; }
.rarity-epic .rarity-tag, .rarity-tag.rarity-epic           { background: #24113d; border-color: #a855f7; color: #c084fc; }
.rarity-legendary .rarity-tag, .rarity-tag.rarity-legendary { background: #381907; border-color: #f97316; color: #fb923c; }

.rarity-text-common    { color: #9ca3af; }
.rarity-text-uncommon  { color: #4ade80; text-shadow: 0 0 10px rgba(74,222,128,.3); }
.rarity-text-rare      { color: #60a5fa; text-shadow: 0 0 10px rgba(96,165,250,.3); }
.rarity-text-epic      { color: #c084fc; text-shadow: 0 0 10px rgba(192,132,252,.3); }
.rarity-text-legendary { color: #fb923c; text-shadow: 0 0 10px rgba(251,146,60,.35); }

.rarity-border-common    { border-color: #4b5563 !important; }
.rarity-border-uncommon  { border-color: #22c55e !important; box-shadow: 0 0 10px rgba(34,197,94,.2); }
.rarity-border-rare      { border-color: #3b82f6 !important; box-shadow: 0 0 10px rgba(59,130,246,.2); }
.rarity-border-epic      { border-color: #a855f7 !important; box-shadow: 0 0 10px rgba(168,85,247,.25); }
.rarity-border-legendary { border-color: #f97316 !important; box-shadow: 0 0 12px rgba(249,115,22,.3); }

.type-tag {
  display: inline-block; padding: .18rem .5rem; border-radius: 2px;
  font-family: var(--font-pixel); font-size: .8rem;
  background: var(--bg-card2); color: var(--text-muted); border: 1.5px solid var(--border);
}
.slot-tag {
  display: inline-block; padding: .18rem .5rem; border-radius: 2px;
  font-family: var(--font-pixel); font-size: .8rem;
  background: rgba(245,158,11,.1); color: var(--gold-light); border: 1.5px solid var(--gold-dark);
}

/* ─── Form Inputs ────────────────────────────────────────────────────────────── */
.form-input {
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: .55rem .9rem;
  color: var(--text);
  font-size: .92rem;
  outline: none;
  transition: border-color .15s;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.5);
}
.form-input:focus { border-color: var(--gold); }
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23f59e0b' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2rem;
}

/* ─── Wiki Page Header & Navigation ──────────────────────────────────────────── */
.page-header { padding: 2.5rem 0 1.5rem; }
.page-title { font-size: 2.4rem; color: var(--gold); text-shadow: 0 0 16px rgba(245,158,11,.3); }
.page-sub { color: var(--text-muted); margin-top: .3rem; font-size: 1rem; }

.wiki-header { display: flex; align-items: baseline; justify-content: space-between; padding: 2.5rem 0 1.25rem; }
.wiki-breadcrumb, .breadcrumb { font-family: var(--font-pixel); font-size: .95rem; color: var(--text-muted); padding: 1.5rem 0 .75rem; }
.wiki-breadcrumb a, .breadcrumb a { color: var(--text-muted); }
.wiki-breadcrumb a:hover, .breadcrumb a:hover { color: var(--gold); }
.wiki-breadcrumb span, .breadcrumb span { color: var(--gold-light); }
.wiki-breadcrumb a + a::before, .wiki-breadcrumb a + span::before { content: ' › '; color: var(--text-dim); }

.wiki-filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1.75rem; align-items: center; }
.wiki-filters .form-input { flex: 1; min-width: 180px; }

.wiki-nav-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1.25rem;
  margin: 1.5rem 0 3.5rem;
}
.wiki-nav-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.6), inset 2px 2px 0 0 rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 1.8rem 1rem;
  text-align: center;
  color: var(--text);
  transition: all .15s ease;
  display: flex; flex-direction: column; align-items: center; gap: .6rem;
}
.wiki-nav-card:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.08),
    0 6px 20px rgba(245,158,11,0.25);
  color: var(--text);
}
.wiki-nav-icon { font-size: 2.6rem; filter: drop-shadow(0 2px 6px rgba(0,0,0,.5)); }
.wiki-nav-label { font-family: var(--font-pixel); font-size: 1.2rem; color: var(--gold); }
.wiki-nav-count { font-family: var(--font-pixel); font-size: .85rem; color: var(--text-dim); }

/* ─── Wiki Item Grid ──────────────────────────────────────────────────────────── */
.wiki-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .85rem; }
.wiki-item-card {
  display: flex; align-items: center; gap: .85rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  color: var(--text);
  transition: all .15s ease;
}
.wiki-item-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.wiki-item-icon-wrap {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.8);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.wiki-item-icon-wrap.lg {
  width: 76px; height: 76px;
  border-width: 2px;
  margin: 0 auto 1rem;
  box-shadow: inset 2px 2px 6px rgba(0,0,0,0.8), 0 0 16px rgba(0,0,0,0.5);
}
.wiki-item-icon { width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.wiki-item-icon-lg { width: 64px; height: 64px; object-fit: contain; image-rendering: pixelated; }
.wiki-item-icon-placeholder { color: var(--text-dim); font-size: 1.1rem; }
.wiki-item-icon-placeholder.lg { font-size: 2.2rem; }
.wiki-item-name { font-family: var(--font-pixel); font-size: 1.05rem; font-weight: 600; margin-bottom: .25rem; color: #fff; }
.wiki-item-meta { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ─── Wiki Detail View (In-Game Description Window Parity) ────────────────────── */
.wiki-detail-layout {
  display: grid; grid-template-columns: 290px 1fr; gap: 1.5rem;
  padding: 1.5rem 0 3.5rem; align-items: start;
}
@media (max-width: 780px) { .wiki-detail-layout { grid-template-columns: 1fr; } }

.wiki-detail-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.06),
    0 6px 18px rgba(0,0,0,0.5);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.wiki-detail-name {
  font-family: var(--font-pixel);
  font-size: 1.6rem;
  color: var(--gold);
  margin: .4rem 0 .6rem;
  letter-spacing: 0.02em;
}
.wiki-detail-sub {
  font-family: var(--font-pixel);
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: .75rem;
}
.wiki-tags { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin-bottom: .85rem; }
.wiki-detail-desc {
  color: var(--text);
  font-size: .92rem;
  line-height: 1.65;
  margin-top: .85rem;
  padding: .75rem;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  white-space: pre-wrap;
  text-align: left;
}

.wiki-limits-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1.5px solid rgba(239, 68, 68, 0.35);
  border-radius: 2px;
  padding: .6rem .8rem;
  font-size: .82rem;
  color: #fca5a5;
  margin-top: .85rem;
  text-align: left;
  line-height: 1.5;
}

.wiki-stat-section {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
}
.wiki-section-title {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.wiki-section-title::before {
  content: '◆';
  font-size: .8rem;
  color: var(--gold-dark);
}

.wiki-props {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .5rem 1.25rem;
  font-size: .92rem;
}
.wiki-props dt { color: var(--text-muted); font-weight: 500; white-space: nowrap; }
.wiki-props dd { color: var(--text); font-weight: 600; }

.wiki-stats-grid { display: flex; flex-wrap: wrap; gap: .6rem; }
.wiki-stat-chip {
  display: flex; align-items: center; gap: .5rem;
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  box-shadow: inset -1px -1px 0 rgba(0,0,0,0.4), inset 1px 1px 0 rgba(255,255,255,0.05);
  border-radius: 2px;
  padding: .35rem .75rem;
  font-size: .88rem;
}
.wiki-stat-chip.vital-hp { border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.08); }
.wiki-stat-chip.vital-mp { border-color: rgba(59,130,246,.35); background: rgba(59,130,246,.08); }
.wiki-stat-chip.cost     { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); }
.wiki-stat-chip.buff     { border-color: rgba(245,158,11,.35); background: rgba(245,158,11,.08); }
.wiki-stat-chip.effect   { border-color: rgba(168,85,247,.35); background: rgba(168,85,247,.08); }

.wsc-label { color: var(--text-muted); }
.wsc-val { font-weight: 700; font-family: var(--font-pixel); font-size: .95rem; }
.wsc-val.pos { color: #4ade80; text-shadow: 0 0 6px rgba(74,222,128,.3); }
.wsc-val.neg { color: #f87171; text-shadow: 0 0 6px rgba(248,113,113,.3); }
.wsc-val.mp  { color: #60a5fa; text-shadow: 0 0 6px rgba(96,165,250,.3); }

/* ─── NPC Grid & Card ────────────────────────────────────────────────────────── */
.wiki-grid-npc { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.wiki-npc-card {
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  color: var(--text);
  transition: all .15s ease;
  text-align: center; gap: .5rem;
}
.wiki-npc-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.wiki-npc-sprite-wrap {
  width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.8);
}
.wiki-npc-name { font-family: var(--font-pixel); font-size: 1.1rem; color: #fff; }
.wiki-npc-meta { font-family: var(--font-pixel); font-size: .85rem; color: var(--text-muted); }
.wiki-npc-hp { font-family: var(--font-pixel); font-size: .85rem; color: #f87171; }
.wiki-npc-exp { font-family: var(--font-pixel); font-size: .85rem; color: #c084fc; }

/* ─── Quest Layout & The New Quest Reward System ─────────────────────────────── */
.wiki-quest-layout { max-width: 820px; padding: 1.5rem 0 3.5rem; }
.wiki-quest-header { margin-bottom: 1.5rem; }
.wiki-quest-section {
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.05);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.wiki-quest-text { color: var(--text); font-size: .95rem; line-height: 1.7; white-space: pre-wrap; }
.wiki-task-list { list-style: none; display: flex; flex-direction: column; gap: .6rem; }
.wiki-task-item {
  display: flex; align-items: center; gap: .65rem;
  background: var(--bg-card2);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: .65rem .85rem;
  font-size: .92rem;
}

.quest-reward-panel {
  background: var(--bg-dark);
  border: 2px solid var(--border-light);
  border-radius: 2px;
  padding: 1.2rem;
  box-shadow: inset 1px 1px 6px rgba(0,0,0,0.8);
}
.quest-reward-header-sub {
  font-family: var(--font-pixel);
  font-size: .95rem;
  color: var(--gold-light);
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: .5rem;
}
.quest-reward-row {
  display: flex; flex-wrap: wrap; gap: .75rem; align-items: center;
  margin-bottom: 1rem;
}
.quest-reward-row:last-child { margin-bottom: 0; }

.quest-xp-chip {
  height: 44px; min-width: 80px; padding: 0 .75rem;
  background: rgba(40, 20, 60, 0.7);
  border: 2px solid #9333ea;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 10px rgba(147, 51, 234, 0.3), inset 1px 1px 0 rgba(255,255,255,0.2);
}
.quest-xp-val {
  font-family: var(--font-pixel);
  font-size: 1.05rem;
  font-weight: 700;
  color: #fde047;
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.5);
}

.pixel-slot {
  width: 44px; height: 44px;
  background: #1e1e2d;
  border: 2px solid #3e3e5e;
  border-radius: 2px;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all .12s ease;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.1), inset -1px -1px 0 rgba(0,0,0,0.6);
}
.pixel-slot:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 12px rgba(245,158,11,0.4), inset 1px 1px 0 rgba(255,255,255,0.2);
}
.pixel-slot-icon {
  width: 34px; height: 34px;
  object-fit: contain;
  image-rendering: pixelated;
}
.pixel-slot-qty {
  position: absolute;
  bottom: 1px; right: 2px;
  font-family: var(--font-pixel);
  font-size: .8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 4px #000;
  pointer-events: none;
}

.quest-item-chip {
  display: flex; align-items: center; gap: .65rem;
  background: var(--bg-card2);
  border: 2px solid var(--border);
  border-radius: 2px;
  padding: .35rem .75rem .35rem .35rem;
  transition: all .15s ease;
}
.quest-item-chip:hover {
  border-color: var(--gold);
  background: var(--bg-card-hover);
}
.quest-item-name {
  font-family: var(--font-pixel);
  font-size: .95rem;
  font-weight: 600;
}

/* ─── Interactive Global Tooltip Popover ──────────────────────────────────────── */
.inv-tooltip, .wiki-tooltip {
  position: fixed; z-index: 9999; pointer-events: none;
  background: #0d0d16;
  border: 2px solid #c9a84c;
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.8),
    inset 2px 2px 0 0 rgba(255,255,255,0.1),
    0 8px 32px rgba(0,0,0,0.85);
  border-radius: 2px;
  padding: .85rem 1rem;
  max-width: 320px; min-width: 220px;
  font-size: .85rem;
  display: none;
}
.inv-tooltip.visible, .wiki-tooltip.visible { display: block; }
.tip-name { font-family: var(--font-pixel); font-size: 1.15rem; font-weight: 700; color: #fff; margin-bottom: .2rem; }
.tip-sub { font-family: var(--font-pixel); font-size: .8rem; color: var(--text-muted); margin-bottom: .4rem; }
.tip-div { height: 1.5px; background: var(--border); margin: .4rem 0; }
.tip-stat { display: block; font-size: .82rem; margin: .15rem 0; font-weight: 500; }
.tip-stat.pos { color: #4ade80; }
.tip-stat.neg { color: #f87171; }
.tip-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.45; font-style: italic; margin: .3rem 0; }
.tip-price { font-family: var(--font-pixel); font-size: .8rem; color: var(--gold); }
.tip-tags { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.tip-tag { background: #1a1a2b; border: 1px solid #33334d; padding: .1rem .4rem; font-size: .72rem; color: #aaa; border-radius: 2px; }

/* ─── Achievements ───────────────────────────────────────────────────────────── */
.wiki-ach-group { margin-bottom: 2.5rem; }
.wiki-ach-category {
  font-size: 1.3rem; color: var(--gold); font-family: var(--font-pixel);
  margin-bottom: 1rem; padding-bottom: .4rem; border-bottom: 2px solid var(--border);
}
.wiki-ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .85rem; }
.wiki-ach-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1rem;
}
.wiki-ach-icon-wrap {
  flex-shrink: 0; width: 48px; height: 48px;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center;
}
.wiki-ach-name { font-family: var(--font-pixel); font-size: 1.05rem; font-weight: 600; color: #fff; margin-bottom: .2rem; }
.wiki-ach-desc { font-size: .82rem; color: var(--text-muted); line-height: 1.45; margin-bottom: .3rem; }
.wiki-ach-points { font-family: var(--font-pixel); font-size: .85rem; color: var(--gold); }
.wiki-ach-reward { font-size: .8rem; color: var(--text-muted); }

/* ─── Pets ───────────────────────────────────────────────────────────────────── */
.wiki-pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 3.5rem; }
.wiki-pet-card {
  display: flex; align-items: center; gap: 1rem;
  background: var(--bg-card); border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius); padding: 1.1rem; color: var(--text);
  transition: all .15s;
}
.wiki-pet-card:hover { border-color: var(--gold); background: var(--bg-card-hover); transform: translateY(-2px); }
.wiki-pet-sprite-wrap {
  flex-shrink: 0; width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-dark); border: 2px solid var(--border); border-radius: 2px;
}
.wiki-pet-name { font-family: var(--font-pixel); font-size: 1.15rem; color: var(--gold); margin-bottom: .25rem; }

/* ─── Classes ─────────────────────────────────────────────────────────────────── */
.wiki-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; padding: 1.5rem 0 3.5rem; }
.wiki-class-card {
  background: var(--bg-card); border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.6), inset 2px 2px 0 0 rgba(255,255,255,0.05);
  border-radius: var(--radius); padding: 1.6rem;
}
.wiki-class-name { font-family: var(--font-pixel); font-size: 1.5rem; color: var(--gold); text-align: center; margin-bottom: 1rem; }
.wiki-class-face {
  width: 76px; height: 76px; image-rendering: pixelated; object-fit: cover;
  border-radius: 4px; border: 2px solid var(--gold-dark); background: var(--bg-dark);
}
.wiki-cs-bar-wrap { flex: 1; height: 8px; background: var(--bg-dark); border: 1px solid var(--border); border-radius: 1px; overflow: hidden; }
.wiki-cs-bar { height: 100%; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }

/* ─── Dropdown Menu ──────────────────────────────────────────────────────────── */
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 0; z-index: 200;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.6), inset 2px 2px 0 0 rgba(255,255,255,0.08), 0 10px 30px rgba(0,0,0,0.7);
  border-radius: var(--radius);
  min-width: 190px; padding: .4rem 0;
  visibility: hidden; opacity: 0; pointer-events: none;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s, visibility 0s linear .15s;
}
.nav-dropdown.open .nav-dropdown-menu {
  visibility: visible; opacity: 1; pointer-events: auto;
  transform: translateY(0);
  transition: opacity .15s, transform .15s, visibility 0s;
}
.nav-dropdown-item {
  display: block; padding: .55rem 1rem;
  font-family: var(--font-pixel); font-size: .95rem;
  color: var(--text-muted); transition: all .12s;
}
.nav-dropdown-item:hover { color: var(--gold-light); background: rgba(245,158,11,.1); }

/* ─── Paperdoll Previews ─────────────────────────────────────────────────────── */
.wiki-paperdoll-header {
  font-family: var(--font-pixel);
  font-size: .9rem; color: var(--text-dim); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: .75rem;
}
.wiki-paperdoll-row { display: flex; gap: 1.25rem; justify-content: center; }
.wiki-paperdoll-wrap { display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.wiki-paperdoll { image-rendering: pixelated; max-height: 128px; filter: drop-shadow(0 4px 8px rgba(0,0,0,.6)); }
.wiki-paperdoll-label { font-family: var(--font-pixel); font-size: .8rem; color: var(--text-dim); }

/* ─── In-Game GUI Stat Icons & Tooltip Tokens ────────────────────────────────── */
.prop-stat-icon {
  width: 18px !important; height: 18px !important;
  min-width: 18px; max-width: 18px;
  object-fit: contain; image-rendering: pixelated;
  vertical-align: middle; margin-right: .35rem; display: inline-block;
}
.chip-stat-icon {
  width: 16px !important; height: 16px !important;
  min-width: 16px; max-width: 16px;
  object-fit: contain; image-rendering: pixelated;
  vertical-align: middle; flex-shrink: 0;
}
.tip-stat-icon {
  width: 16px !important; height: 16px !important;
  min-width: 16px; max-width: 16px;
  object-fit: contain; image-rendering: pixelated;
  vertical-align: middle; margin-right: .3rem; display: inline-block;
}
.tip-limits {
  font-family: var(--font-pixel);
  font-size: .8rem;
  color: #fca5a5;
  margin: .3rem 0;
  font-weight: 600;
  letter-spacing: .02em;
}

/* ─── Wiki Quest List Styling ─────────────────────────────────────────────────── */
.wiki-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  margin-bottom: 3.5rem;
}
.wiki-list-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1.15rem 1.4rem;
  color: var(--text);
  transition: all .15s ease;
}
.wiki-list-row:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.5),
    inset 2px 2px 0 0 rgba(255,255,255,0.06),
    0 4px 16px rgba(0,0,0,0.4);
}
.wiki-list-icon {
  font-size: 2rem;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.7);
}
.wiki-list-body { flex: 1; min-width: 0; }
.wiki-list-name {
  font-family: var(--font-pixel);
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: .35rem;
}
.wiki-list-row:hover .wiki-list-name { color: var(--gold-light); }
.wiki-list-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-bottom: .35rem;
}
.wiki-list-desc {
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.wiki-list-arrow {
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: var(--gold-dark);
  transition: transform .15s ease, color .15s ease;
  flex-shrink: 0;
}
.wiki-list-row:hover .wiki-list-arrow {
  transform: translateX(4px);
  color: var(--gold-light);
}

/* ─── Wiki Achievements Grid & Cards ─────────────────────────────────────────── */
.wiki-ach-group { margin-bottom: 2.5rem; }
.wiki-ach-category {
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.wiki-ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.wiki-ach-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  transition: all .15s ease;
}
.wiki-ach-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.wiki-ach-icon-wrap {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  max-width: 48px !important;
  max-height: 48px !important;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.8);
  overflow: hidden;
}
.wiki-ach-icon {
  width: 36px !important;
  height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  object-fit: contain;
  image-rendering: pixelated;
}
.wiki-ach-icon-placeholder { font-size: 1.8rem; }
.wiki-ach-body { flex: 1; min-width: 0; }
.wiki-ach-name {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .25rem;
}
.wiki-ach-desc {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: .45rem;
}
.wiki-ach-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-pixel);
  font-size: .85rem;
}
.wiki-ach-points { color: var(--gold-light); font-weight: 700; }
.wiki-ach-reward { color: #4ade80; }

/* ─── Home Page "What Awaits You" Feature Grid ───────────────────────────────── */
.home-features {
  padding: 4rem 0 3rem;
}
.section-header-center {
  text-align: center;
  margin-bottom: 3rem;
}
.section-badge {
  display: inline-block;
  font-family: var(--font-pixel);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--gold);
  background: rgba(245,158,11,0.1);
  border: 1.5px solid var(--gold-dark);
  padding: .25rem .75rem;
  border-radius: 2px;
  margin-bottom: .75rem;
}
.section-title {
  font-family: var(--font-pixel);
  font-size: 2.4rem;
  color: var(--gold-light);
  margin-bottom: .6rem;
  text-shadow: 0 0 16px rgba(245,158,11,0.3);
  letter-spacing: .02em;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.6;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.6rem;
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.04),
    0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all .18s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--border-light), transparent);
  transition: background .18s ease;
}
.feature-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(245,158,11,0.12),
    0 8px 24px rgba(0,0,0,0.5);
}
.feature-card:hover::before {
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.feature-icon-frame {
  width: 52px;
  height: 52px;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.8);
  transition: border-color .18s ease;
}
.feature-card:hover .feature-icon-frame {
  border-color: var(--gold);
}
.feature-pixel-icon {
  width: 32px !important;
  height: 32px !important;
  object-fit: contain;
  image-rendering: pixelated;
}
.feature-title {
  font-family: var(--font-pixel);
  font-size: 1.28rem;
  color: #fff;
  margin-bottom: .6rem;
  transition: color .18s ease;
}
.feature-card:hover .feature-title {
  color: var(--gold-light);
}
.feature-desc {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}
.feature-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.feature-tag {
  font-family: var(--font-pixel);
  font-size: .78rem;
  color: var(--gold-light);
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  padding: .2rem .55rem;
  border-radius: 2px;
  letter-spacing: .02em;
}

/* ─── Home Page Bottom Sections & CTA ────────────────────────────────────────── */
.features-cta {
  text-align: center;
  margin: 3rem 0 2rem;
}
.home-cta-card {
  background: linear-gradient(135deg, rgba(24,24,40,0.95), rgba(15,15,26,0.98));
  border: 2px solid var(--gold-dark);
  border-radius: var(--radius);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.7),
    inset 2px 2px 0 0 rgba(245,158,11,0.15),
    0 8px 32px rgba(0,0,0,0.5);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2.5rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.home-cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.hcc-title {
  font-family: var(--font-pixel);
  font-size: 2.2rem;
  color: var(--gold-light);
  margin-bottom: .75rem;
  text-shadow: 0 0 16px rgba(245,158,11,0.4);
}
.hcc-sub {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hcc-actions {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

/* ─── Legal Pages (Terms, Privacy, Cookies) ──────────────────────────────────── */
.legal-wrap {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
  padding: 2.5rem 0 4rem;
  align-items: flex-start;
}
@media (max-width: 820px) {
  .legal-wrap {
    grid-template-columns: 1fr;
  }
}
.legal-sidebar {
  position: sticky;
  top: 90px;
}
.legal-nav {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
}
.legal-nav-heading {
  font-family: var(--font-pixel);
  font-size: 1.15rem;
  color: var(--gold);
  margin-bottom: .85rem;
  padding-bottom: .4rem;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.legal-nav-link {
  display: block;
  padding: .6rem .85rem;
  font-family: var(--font-pixel);
  font-size: .95rem;
  color: var(--text-muted);
  border-radius: 2px;
  transition: all .12s;
  border: 1.5px solid transparent;
  margin-bottom: .35rem;
}
.legal-nav-link:hover {
  color: var(--gold-light);
  background: rgba(245,158,11,.1);
  border-color: var(--gold-dark);
}
.legal-nav-link.active {
  color: var(--gold-light);
  background: rgba(245,158,11,.15);
  border-color: var(--gold);
  font-weight: 700;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05);
}
.legal-content {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2.2rem;
  box-shadow: inset -2px -2px 0 0 rgba(0,0,0,0.5), inset 2px 2px 0 0 rgba(255,255,255,0.04);
  color: var(--text);
  line-height: 1.7;
}
.legal-header {
  margin-bottom: 2rem;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--border);
}
.legal-title {
  font-family: var(--font-pixel);
  font-size: 2.2rem;
  color: var(--gold-light);
  margin-bottom: .4rem;
  text-shadow: 0 0 12px rgba(245,158,11,0.3);
}
.legal-updated {
  font-size: .88rem;
  color: var(--text-muted);
}
.legal-updated strong {
  color: var(--text);
}
.legal-intro {
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.65;
  margin-bottom: 1.5rem;
}
.legal-section {
  margin-bottom: 2rem;
}
.legal-section h2 {
  font-family: var(--font-pixel);
  font-size: 1.35rem;
  color: var(--gold);
  margin: 1.75rem 0 .75rem;
  letter-spacing: .02em;
}
.legal-section h3 {
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: #fff;
  margin: 1.25rem 0 .5rem;
}
.legal-section p {
  font-size: .95rem;
  color: var(--text-muted);
  margin-bottom: .85rem;
  line-height: 1.7;
}
.legal-section ul,
.legal-section ol {
  margin: .5rem 0 1.25rem 1.5rem;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.6;
}
.legal-section li {
  margin-bottom: .45rem;
}
.legal-section li strong {
  color: #fff;
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: .9rem;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.legal-table th {
  background: #1c1c2e;
  padding: .75rem 1rem;
  text-align: left;
  font-family: var(--font-pixel);
  color: var(--gold);
  border-bottom: 2px solid var(--border);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.legal-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: top;
  line-height: 1.5;
}
.legal-table tr:last-child td {
  border-bottom: none;
}
.legal-table code {
  background: #252538;
  padding: .15rem .45rem;
  border-radius: 2px;
  font-family: monospace;
  color: var(--gold-light);
  font-size: .85rem;
  border: 1px solid var(--border);
}
.legal-notice {
  background: rgba(245,158,11,0.08);
  border-left: 3px solid var(--gold);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  border-radius: 2px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  color: var(--text);
  font-size: .92rem;
  line-height: 1.6;
}
.legal-notice strong {
  color: var(--gold-light);
}
.legal-link {
  color: var(--gold-light);
  text-decoration: underline;
  transition: color .12s;
}
.legal-link:hover {
  color: #fff;
}
.legal-email {
  color: var(--gold-light);
  font-weight: 600;
  font-family: monospace;
  background: var(--bg-dark);
  padding: .1rem .4rem;
  border-radius: 2px;
  border: 1px solid var(--border);
}

/* ─── Login & Auth Pages ─────────────────────────────────────────────────────── */
.login-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(75vh - 80px);
  padding: 3rem 1rem;
}
.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.6),
    inset 2px 2px 0 0 rgba(255,255,255,0.04),
    0 8px 32px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.login-title {
  font-family: var(--font-pixel);
  font-size: 2.2rem;
  color: var(--gold-light);
  margin-bottom: .4rem;
  text-align: center;
  text-shadow: 0 0 12px rgba(245,158,11,0.3);
}
.login-sub {
  color: var(--text-muted);
  font-size: .95rem;
  text-align: center;
  margin-bottom: 2rem;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-group label {
  font-family: var(--font-pixel);
  font-size: .95rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.form-input {
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  padding: .75rem 1rem;
  color: #fff;
  font-size: 1rem;
  font-family: var(--font-main);
  transition: all .15s ease;
  box-shadow: inset 1px 1px 4px rgba(0,0,0,0.6);
}
.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(245,158,11,0.25), inset 1px 1px 4px rgba(0,0,0,0.8);
}
.btn-full {
  width: 100%;
  justify-content: center;
  padding: .85rem 1.25rem;
}
.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.75rem 0;
  color: var(--text-dim);
  font-family: var(--font-pixel);
  font-size: .85rem;
  text-transform: uppercase;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.login-divider span {
  padding: 0 .75rem;
}

/* ─── Account Dashboard & Character Grid ─────────────────────────────────────── */
.account-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 0 1.5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.account-avatar {
  width: 72px;
  height: 72px;
  border-radius: 2px;
  border: 2px solid var(--gold);
  background: var(--bg-dark);
  box-shadow: 0 0 12px rgba(245,158,11,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-pixel);
  font-size: 2rem;
  color: var(--gold-light);
}
.character-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.character-card {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.5),
    inset 2px 2px 0 0 rgba(255,255,255,0.04);
  transition: all .15s ease;
  color: var(--text);
  position: relative;
  overflow: hidden;
}
.character-card:hover {
  border-color: var(--gold-dark);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.5),
    inset 2px 2px 0 0 rgba(245,158,11,0.1),
    0 6px 20px rgba(0,0,0,0.4);
}
.char-avatar {
  width: 64px;
  height: 64px;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.7);
  font-family: var(--font-pixel);
  font-size: 1.6rem;
  color: var(--gold);
}
.char-sprite-canvas {
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
}
.char-info {
  flex: 1;
  min-width: 0;
}
.char-name {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: .2rem;
}
.character-card:hover .char-name {
  color: var(--gold-light);
}
.char-class {
  font-size: .88rem;
  color: var(--gold);
  font-weight: 500;
}
.char-level {
  font-family: var(--font-pixel);
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .15rem;
}
.char-stats-mini {
  font-size: .78rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-align: right;
}
.char-stats-mini .label {
  color: var(--text-muted);
}
.char-arrow {
  font-family: var(--font-pixel);
  font-size: 1.4rem;
  color: var(--gold-dark);
  transition: transform .15s ease, color .15s ease;
  flex-shrink: 0;
}
.character-card:hover .char-arrow {
  transform: translateX(4px);
  color: var(--gold-light);
}

/* ─── Admin Dashboard & Management Layout ────────────────────────────────────── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 860px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}
.admin-sidebar {
  background: var(--bg-card);
  border-right: 2px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.admin-brand {
  font-family: var(--font-pixel);
  font-size: 1.3rem;
  color: var(--gold-light);
  padding: .5rem .75rem 1rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: .75rem;
  text-shadow: 0 0 10px rgba(245,158,11,0.3);
}
.admin-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  flex: 1;
}
.admin-nav-group {
  font-family: var(--font-pixel);
  font-size: .75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .75rem .75rem .25rem;
}
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  font-family: var(--font-pixel);
  font-size: .95rem;
  color: var(--text-muted);
  border-radius: 2px;
  transition: all .12s ease;
  border: 1.5px solid transparent;
}
.admin-nav-link:hover {
  color: var(--gold-light);
  background: rgba(245,158,11,0.08);
  border-color: var(--gold-dark);
}
.admin-nav-link.active {
  color: var(--gold-light);
  background: rgba(245,158,11,0.15);
  border-color: var(--gold);
  font-weight: 700;
}
.admin-nav-back {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.admin-main {
  padding: 2rem 2.5rem;
  background: var(--bg-dark);
  min-width: 0;
}
.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}
.admin-page-title {
  font-family: var(--font-pixel);
  font-size: 2rem;
  color: var(--gold-light);
  margin: 0;
  text-shadow: 0 0 12px rgba(245,158,11,0.3);
}
.admin-user-chip {
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  padding: .35rem .75rem;
  border-radius: 2px;
  font-family: var(--font-pixel);
  font-size: .9rem;
  color: var(--text);
}
.user-avatar-sm {
  width: 26px;
  height: 26px;
  border-radius: 2px;
  object-fit: cover;
}
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}
.admin-stat-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1rem;
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.5),
    inset 2px 2px 0 0 rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.asc-icon {
  font-size: 2rem;
  width: 44px;
  height: 44px;
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.asc-value {
  font-family: var(--font-pixel);
  font-size: 1.5rem;
  color: var(--gold-light);
  line-height: 1;
}
.asc-label {
  font-family: var(--font-pixel);
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: .3rem;
}
.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 900px) {
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
}
.admin-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 
    inset -2px -2px 0 0 rgba(0,0,0,0.5),
    inset 2px 2px 0 0 rgba(255,255,255,0.04);
}
.admin-card-header {
  font-family: var(--font-pixel);
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.admin-quick-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.quick-link {
  font-family: var(--font-pixel);
  font-size: .95rem;
  padding: .65rem 1.2rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  color: var(--text-muted);
  transition: all .15s ease;
}
.quick-link:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
  background: rgba(245,158,11,0.08);
}
.search-bar {
  display: flex;
  gap: .75rem;
  margin-bottom: 1.5rem;
}
.search-input {
  flex: 1;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  padding: .65rem 1rem;
  color: #fff;
  font-family: var(--font-main);
}
.search-input:focus {
  outline: none;
  border-color: var(--gold);
}
.row-banned {
  background: rgba(239,68,68,0.1) !important;
}

/* ─── Admin Details, Player/User Detail & Wiki Admin ─────────────────────────── */
.admin-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.detail-list {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: .65rem .75rem;
  font-size: .92rem;
  padding: 1.25rem 1.4rem;
}
.detail-list dt {
  color: var(--text-muted);
  font-family: var(--font-pixel);
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.detail-list dd {
  color: #fff;
  font-weight: 500;
  margin: 0;
  word-break: break-word;
}

/* Wiki Admin Sync Chips & Controls */
.sync-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .85rem;
  margin: 1.25rem 0;
}
.sync-count-chip {
  background: var(--bg-dark);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  padding: .75rem 1rem;
  text-align: center;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.6);
}
.scc-val {
  display: block;
  font-family: var(--font-pixel);
  font-size: 1.5rem;
  color: var(--gold-light);
  line-height: 1;
}
.scc-label {
  display: block;
  font-family: var(--font-pixel);
  font-size: .78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: .35rem;
}

/* Wiki Admin Type Selector Buttons */
.wiki-admin-type-btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  padding: .85rem 1.4rem;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  transition: all .15s ease;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.05);
}
.wiki-admin-type-btn:hover {
  border-color: var(--gold);
  color: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245,158,11,0.25);
  background: rgba(245,158,11,0.08);
}
.wat-icon {
  font-size: 1.3rem;
}

/* Visibility Toggle Button */
.visibility-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: .2rem;
  transition: transform .12s ease;
}
.visibility-toggle:hover {
  transform: scale(1.2);
}
.row-hidden-entry {
  opacity: 0.55;
  background: rgba(0,0,0,0.25);
}

/* ─── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-card);
  border-top: 2px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: auto;
}
.footer-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem;
}
@media (max-width: 768px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
.footer-col { display: flex; flex-direction: column; gap: .5rem; }
.brand-name { font-family: var(--font-pixel); font-size: 1.3rem; color: var(--gold); }
.footer-desc { color: var(--text-muted); font-size: .88rem; line-height: 1.6; margin-top: .4rem; }
.footer-heading { font-family: var(--font-pixel); font-size: 1rem; color: #fff; margin-bottom: .4rem; text-transform: uppercase; letter-spacing: .04em; }
.footer-col a { color: var(--text-muted); font-size: .88rem; }
.footer-col a:hover { color: var(--gold-light); }
.footer-copy {
  max-width: 1160px; margin: 2rem auto 0; padding: 1.5rem 24px 0;
  border-top: 1px solid var(--border);
  font-size: .82rem; color: var(--text-dim); text-align: center;
}

/* ─── Cookie Banner ───────────────────────────────────────────────────────────── */
.cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 9000;
  background: var(--bg-card); border-top: 2px solid var(--border);
  padding: 1rem 1.5rem;
  transform: translateY(100%);
  transition: transform .3s ease;
  box-shadow: 0 -6px 24px rgba(0,0,0,.6);
}
.cookie-banner.cookie-visible { transform: translateY(0); }
.cookie-banner-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.cookie-banner-text { flex: 1; font-size: .9rem; color: var(--text-muted); min-width: 240px; }
.cookie-banner-actions { display: flex; gap: .5rem; }

/* ─── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }
