:root {
  --bg: #07060a;
  --bg-elevated: #121018;
  --bg-card: rgba(18, 16, 24, 0.82);
  --gold: #e8c878;
  --gold-dim: #c9a254;
  --fire: #ff7a3d;
  --fire-soft: rgba(255, 122, 61, 0.18);
  --text: #f4efe6;
  --muted: #9d9488;
  --border: rgba(201, 162, 84, 0.28);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  line-height: 1.6;
}

body {
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #fff1c7; }

.bg-glow {
  position: fixed;
  width: 42rem;
  height: 42rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.22;
  pointer-events: none;
  z-index: 0;
}
.bg-glow--left {
  top: -8rem;
  left: -10rem;
  background: radial-gradient(circle, var(--fire) 0%, transparent 70%);
}
.bg-glow--right {
  right: -12rem;
  bottom: -6rem;
  background: radial-gradient(circle, #7a4fff 0%, transparent 70%);
}

.embers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 180, 80, 0.5), transparent),
    radial-gradient(1px 1px at 80% 10%, rgba(255, 120, 60, 0.35), transparent),
    radial-gradient(1px 1px at 50% 80%, rgba(255, 200, 120, 0.25), transparent);
  opacity: 0.35;
  z-index: 0;
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 6vw;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  background: rgba(7, 6, 10, 0.55);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-weight: 700;
  background: linear-gradient(145deg, rgba(201, 162, 84, 0.12), transparent);
}

.brand-name {
  font-family: 'Cinzel', serif;
  letter-spacing: 0.04em;
}

.topnav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.topnav a {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}
.topnav a:hover { color: var(--text); }

.hero {
  max-width: 56rem;
  margin: 0 auto;
  padding: 6rem 6vw 4rem;
  text-align: center;
}

.eyebrow {
  color: var(--gold-dim);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
}

h1, h2, h3 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  line-height: 1.15;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
  margin: 0.75rem 0 1rem;
}

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, var(--gold), #fff2cc 40%, var(--fire));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead,
.section-lead {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 42rem;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.35rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.btn--primary {
  color: #1a1208;
  background: linear-gradient(180deg, #f0d18a, var(--gold-dim));
  border-color: #f0d18a;
  box-shadow: 0 10px 30px rgba(201, 162, 84, 0.25);
}

.btn--ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn--sm { padding: 0.55rem 0.9rem; font-size: 0.88rem; }
.btn--lg { padding: 1rem 1.75rem; font-size: 1.05rem; }

.castbar-demo {
  max-width: 18rem;
  margin: 0 auto;
  padding: 0.75rem 0;
}

.castbar-label {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--gold);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.castbar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(26, 18, 8, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.castbar-fill {
  width: 68%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dim), #ffe3a1);
  animation: pulseFill 2.4s ease-in-out infinite;
}

@keyframes pulseFill {
  0%, 100% { width: 52%; opacity: 0.85; }
  50% { width: 88%; opacity: 1; }
}

.section {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 6vw 4rem;
}

.section h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.5rem;
  text-align: center;
}

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

.card {
  padding: 1.35rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 0.6rem;
  color: var(--gold);
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.96rem;
}

.section--split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 2rem;
  align-items: center;
}

.stat-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.stat-list li {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
}

.stat-list strong {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  color: var(--gold);
}

.stat-list span { color: var(--muted); font-size: 0.9rem; }

.cta {
  text-align: center;
  padding-bottom: 5rem;
}

.cta p { color: var(--muted); max-width: 36rem; margin: 0 auto 1.5rem; }

.footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 6vw 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 800px) {
  .section--split { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; gap: 1rem; }
}

/* ——— Guide: /mmorpg-rhmmo ——— */
.guide-wrap {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 6vw 4rem;
}

.guide-back {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}

.guide-hero {
  margin-bottom: 1.5rem;
  padding: 1.75rem 1.85rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.guide-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0.5rem 0 0.75rem;
}

.guide-lead {
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 1rem;
}

.guide-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.guide-pill {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.guide-toc {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.guide-toc a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  padding: 0.5rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.guide-toc a:hover {
  border-color: var(--gold-dim);
  color: var(--gold);
}

.guide-section {
  scroll-margin-top: 5rem;
  margin-bottom: 1.25rem;
  padding: 1.5rem 1.65rem;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.guide-section h2 {
  text-align: left;
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
  color: var(--gold);
}

.guide-section h3 {
  font-size: 0.95rem;
  margin: 1rem 0 0.5rem;
  color: var(--text);
}

.guide-section p,
.guide-section li {
  color: var(--muted);
  font-size: 0.94rem;
}

.guide-section ul {
  margin: 0.5rem 0 0 1.15rem;
  padding: 0;
}

.guide-section li { margin-bottom: 0.45rem; }

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.guide-mini-card {
  padding: 0.85rem 1rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.guide-mini-card strong {
  display: block;
  color: var(--gold);
  margin-bottom: 0.35rem;
}

.guide-mini-card span { color: var(--muted); font-size: 0.88rem; }

.guide-kbd {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 0.3rem;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  margin-top: 0.75rem;
}

.guide-table th,
.guide-table td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.65rem;
  text-align: left;
}

.guide-table th {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.guide-table td { color: var(--muted); }

.guide-note {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--fire-soft);
  font-size: 0.88rem;
  color: var(--muted);
}

:target.guide-section {
  box-shadow: 0 0 0 2px rgba(201, 162, 84, 0.35);
}
