:root {
  --bg-void: #07090d;
  --bg-obsidian: #0d1118;
  --bg-card: #121722;
  --bg-card-hover: #18202f;
  --bg-elevated: #1c2434;
  --border-subtle: rgba(212, 175, 55, 0.16);
  --border-strong: rgba(212, 175, 55, 0.42);
  --border-teal: rgba(45, 212, 191, 0.28);
  --gold: #d4af37;
  --gold-bright: #f2cf66;
  --gold-dim: #9c7c22;
  --teal: #2dd4bf;
  --teal-dim: rgba(45, 212, 191, 0.14);
  --crimson: #ef4444;
  --emerald: #22c55e;
  --amber: #f59e0b;
  --text-primary: #eef2f7;
  --text-secondary: #a4b0c2;
  --text-muted: #6c798e;
  --font-display: 'Cinzel', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 28px rgba(212, 175, 55, 0.18);
  --container: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -120px, rgba(212, 175, 55, 0.11), transparent 70%),
    radial-gradient(900px 500px at 90% 10%, rgba(45, 212, 191, 0.06), transparent 65%),
    var(--bg-void);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-bright); text-decoration: none; transition: color .18s ease; }
a:hover { color: #fff3c4; }
img { max-width: 100%; height: auto; display: block; }
code, pre { font-family: var(--font-mono); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(7, 9, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-primary);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: #0b0e13;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold-dim));
  box-shadow: 0 0 18px rgba(212, 175, 55, 0.35);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.08em; font-size: 17px; color: var(--gold-bright); }
.brand-sub { font-size: 11px; color: var(--text-muted); letter-spacing: 0.06em; text-transform: uppercase; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 8px 13px;
  border-radius: 9px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: all .16s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(212, 175, 55, 0.09);
  border-color: var(--border-subtle);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(18, 23, 34, 0.92);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}
.dot.online { background: var(--emerald); box-shadow: 0 0 10px var(--emerald); }
.dot.offline { background: var(--crimson); box-shadow: 0 0 8px rgba(239, 68, 68, 0.65); }

.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
  font-size: 15px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  transition: transform .15s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-strong); color: #fff; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-gold {
  background: linear-gradient(135deg, #f0cb5c 0%, #c89b28 100%);
  color: #0b0e13;
  border-color: rgba(255, 228, 148, 0.45);
  box-shadow: 0 6px 22px rgba(212, 175, 55, 0.25);
}
.btn-gold:hover { color: #05070a; box-shadow: 0 10px 26px rgba(212, 175, 55, 0.42); }

.btn-teal {
  background: rgba(45, 212, 191, 0.14);
  color: var(--teal);
  border-color: var(--border-teal);
}
.btn-teal:hover { background: rgba(45, 212, 191, 0.24); color: #99f6e4; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }

/* Hero */
.hero {
  position: relative;
  padding: 58px 0 46px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0.24;
  filter: saturate(1.1);
  pointer-events: none;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 13, 0.58) 0%, rgba(7, 9, 13, 0.88) 65%, var(--bg-void) 100%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid var(--border-subtle);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.2vw, 48px);
  line-height: 1.14;
  margin: 14px 0 14px;
  letter-spacing: 0.02em;
  color: #fff;
}

.hero-lead {
  color: var(--text-secondary);
  font-size: 16.5px;
  max-width: 650px;
  margin: 0 0 24px;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.hero-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

/* Cards & Grids */
.section { padding: 42px 0; }
.section-sm { padding: 26px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  margin: 0;
  color: #fff;
}
.section-head p { margin: 4px 0 0; color: var(--text-secondary); font-size: 14px; }

.card {
  background: linear-gradient(180deg, rgba(20, 26, 39, 0.96), rgba(13, 17, 24, 0.98));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.card-interactive {
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.card-interactive:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), var(--shadow-glow);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-bright);
  line-height: 1.2;
}
.stat-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Tags & Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}
.badge-gold { background: rgba(212, 175, 55, 0.14); color: var(--gold-bright); border-color: var(--border-strong); }
.badge-teal { background: var(--teal-dim); color: var(--teal); border-color: var(--border-teal); }
.badge-green { background: rgba(34, 197, 94, 0.14); color: #86efac; border-color: rgba(34, 197, 94, 0.35); }
.badge-red { background: rgba(239, 68, 68, 0.14); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.badge-amber { background: rgba(245, 158, 11, 0.14); color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); }

/* Forms & Inputs */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }

.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid rgba(164, 176, 194, 0.22);
  background: #0a0d13;
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.14); }
textarea.input { min-height: 120px; resize: vertical; }

.search-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.search-bar .input { flex: 1; min-width: 220px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
th { background: rgba(10, 13, 19, 0.9); color: var(--text-muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(212, 175, 55, 0.04); }

/* Tabs & Chips */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab-btn {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: rgba(18, 23, 34, 0.8);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  transition: all .15s ease;
}
.tab-btn.active, .tab-btn:hover {
  background: rgba(212, 175, 55, 0.14);
  color: var(--gold-bright);
  border-color: var(--border-strong);
}

/* Breadcrumbs & Guide Articles */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.article-cover {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
  max-height: 410px;
  background: #0a0d13;
}
.article-cover img { width: 100%; height: 100%; max-height: 410px; object-fit: cover; }

.guide-card-media {
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #0a0d13;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 14px;
}
.guide-card-media img { width: 100%; height: 100%; object-fit: cover; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 26px;
  align-items: start;
}
.article-prose h2, .article-prose h3 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  margin-top: 26px;
}
.article-prose p, .article-prose li { color: var(--text-secondary); font-size: 15.5px; }
.article-prose ul, .article-prose ol { padding-left: 20px; }

.toc-box { position: sticky; top: 88px; }
.toc-list { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 7px; }
.toc-list a { font-size: 13px; color: var(--text-secondary); }
.toc-list a:hover { color: var(--gold-bright); }

/* FAQ Accordion */
.faq-item { border: 1px solid var(--border-subtle); border-radius: 10px; background: rgba(14, 18, 26, 0.9); margin-bottom: 10px; overflow: hidden; }
.faq-item summary { padding: 14px 16px; cursor: pointer; font-weight: 600; color: var(--text-primary); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item[open] summary { color: var(--gold-bright); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.faq-answer { padding: 14px 16px; color: var(--text-secondary); font-size: 14.5px; }

/* Forum */
.forum-post {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  padding: 18px;
  margin-bottom: 14px;
}
.forum-post.is-staff { border-color: var(--border-strong); background: linear-gradient(180deg, rgba(212, 175, 55, 0.06), rgba(18, 23, 34, 0.96)); }
.forum-post-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.forum-quote {
  border-left: 3px solid var(--gold);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px 14px;
  border-radius: 0 8px 8px 0;
  margin: 10px 0;
  color: var(--text-secondary);
}

.bb-toolbar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.bb-btn {
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: #0e131c;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
}
.bb-btn:hover { color: var(--gold-bright); border-color: var(--border-strong); }

/* Interactive Tools */
.enchant-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 18px;
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 50% 20%, rgba(212, 175, 55, 0.14), rgba(9, 12, 18, 0.96));
  border: 1px solid var(--border-subtle);
}
.enchant-level {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 800;
  color: var(--gold-bright);
  text-shadow: 0 0 26px rgba(212, 175, 55, 0.45);
}

/* Toast & Modal (No native alert/confirm) */
.toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 390px;
}
.toast {
  background: #141a26;
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--gold);
  color: var(--text-primary);
  padding: 12px 15px;
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6);
  font-size: 13.5px;
  animation: slideIn .18s ease-out;
}
.toast.toast-ok { border-left-color: var(--emerald); }
.toast.toast-err { border-left-color: var(--crimson); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(5, 7, 10, 0.78);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: #111622;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
}

/* Footer */
.site-footer {
  margin-top: 56px;
  border-top: 1px solid var(--border-subtle);
  background: #080a0f;
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 22px; }
.footer-title { color: var(--text-primary); font-weight: 600; margin-bottom: 10px; font-size: 13.5px; }
.footer-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.footer-list a { color: var(--text-muted); }
.footer-list a:hover { color: var(--gold-bright); }

.hidden { display: none !important; }
.muted { color: var(--text-muted); }
.text-gold { color: var(--gold-bright); }
.text-teal { color: var(--teal); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.flex-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .hero-grid, .article-layout, .footer-grid { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4, .span-6, .span-8 { grid-column: span 12; }
  .toc-box { position: static; }
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    background: rgba(9, 12, 18, 0.98);
    border-bottom: 1px solid var(--border-subtle);
    padding: 14px 20px;
    flex-direction: column;
    align-items: stretch;
  }
  .nav-links.open { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .status-pill { display: none; }
}
