/* Diablo II: Resurrected Wiki — dark hellfire theme */
:root {
  --nav-theme: 8 75% 42%;        /* hellfire red */
  --nav-theme-light: 24 90% 55%; /* flame orange */
  --bg: 20 14% 7%;
  --bg-raised: 20 12% 10%;
  --bg-card: 22 11% 12%;
  --border: 20 8% 20%;
  --text: 30 20% 92%;
  --text-dim: 28 10% 65%;
  --accent: hsl(var(--nav-theme));
  --accent-light: hsl(var(--nav-theme-light));
  --radius: 12px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: hsl(var(--bg));
  color: hsl(var(--text));
  line-height: 1.65;
}

a { color: var(--accent-light); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { max-width: 100%; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: hsl(var(--bg-raised) / 0.96);
  border-bottom: 1px solid hsl(var(--border));
  backdrop-filter: blur(6px);
}
.nav-inner {
  display: flex; align-items: center; gap: 24px;
  max-width: 1120px; margin: 0 auto; padding: 12px 20px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; color: hsl(var(--text));
}
.nav-logo:hover { text-decoration: none; }
.nav-logo img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; margin-left: auto; }
.nav-links a { color: hsl(var(--text-dim)); font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-light); text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 56px;
  background:
    radial-gradient(ellipse 60% 50% at 70% 20%, hsl(var(--nav-theme) / 0.25), transparent 70%),
    hsl(var(--bg));
  border-bottom: 1px solid hsl(var(--border));
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: center; }
.eyebrow {
  display: inline-block; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-light); border: 1px solid hsl(var(--nav-theme) / 0.5);
  padding: 4px 12px; border-radius: 999px; margin-bottom: 16px;
}
.hero h1 { font-size: 2.8rem; line-height: 1.15; margin-bottom: 16px; }
.hero .lead { color: hsl(var(--text-dim)); font-size: 1.1rem; margin-bottom: 24px; max-width: 56ch; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; list-style: none; }
.hero-stats li {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border));
  border-radius: 8px; padding: 8px 14px; font-size: 0.88rem; color: hsl(var(--text-dim));
}
.hero-stats li strong { color: hsl(var(--text)); display: block; font-size: 1rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px; font-weight: 600;
  border: 1px solid transparent; transition: transform 0.1s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: transparent; border-color: hsl(var(--nav-theme) / 0.6); color: var(--accent-light); }
.btn-ghost { background: transparent; border-color: hsl(var(--border)); color: hsl(var(--text-dim)); }
.hero-media {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); aspect-ratio: 16 / 9;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  color: hsl(var(--text-dim));
}
.hero-media .play-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: hsl(var(--nav-theme) / 0.9); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.hero-media a { color: var(--accent-light); font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: hsl(var(--bg-raised)); border-top: 1px solid hsl(var(--border)); border-bottom: 1px solid hsl(var(--border)); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: 1.9rem; margin-top: 10px; }
.section-head p { color: hsl(var(--text-dim)); margin-top: 8px; max-width: 64ch; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 22px; display: block; color: hsl(var(--text));
}
a.card:hover { text-decoration: none; border-color: hsl(var(--nav-theme) / 0.6); }
.card .num {
  display: inline-flex; width: 34px; height: 34px; border-radius: 8px;
  background: hsl(var(--nav-theme) / 0.2); color: var(--accent-light);
  align-items: center; justify-content: center; font-weight: 700; margin-bottom: 14px;
}
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { color: hsl(var(--text-dim)); font-size: 0.92rem; }

/* Tabs */
.tab-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.tab-btn {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border)); color: hsl(var(--text-dim));
  padding: 8px 16px; border-radius: 999px; cursor: pointer; font-size: 0.9rem;
}
.tab-btn.active, .tab-btn:hover { background: hsl(var(--nav-theme) / 0.25); color: var(--accent-light); border-color: hsl(var(--nav-theme) / 0.5); }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.guide-card {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border)); border-radius: var(--radius);
  padding: 20px; color: hsl(var(--text)); display: block;
}
a.guide-card:hover { text-decoration: none; border-color: hsl(var(--nav-theme) / 0.6); }
.guide-card .tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-light); }
.guide-card h3 { margin: 6px 0 8px; font-size: 1.02rem; }
.guide-card p { color: hsl(var(--text-dim)); font-size: 0.9rem; }
.guide-card.hidden { display: none; }

/* About / stats table */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
.about-grid p { color: hsl(var(--text-dim)); margin-bottom: 14px; }
.stat-table { width: 100%; border-collapse: collapse; background: hsl(var(--bg-card)); border-radius: var(--radius); overflow: hidden; }
.stat-table th, .stat-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid hsl(var(--border)); font-size: 0.92rem; }
.stat-table th { color: hsl(var(--text-dim)); font-weight: 500; width: 45%; }
.stat-table tr:last-child th, .stat-table tr:last-child td { border-bottom: none; }

/* Aside note (codes) */
.note-box {
  background: hsl(var(--bg-card)); border: 1px dashed hsl(var(--nav-theme) / 0.5);
  border-radius: var(--radius); padding: 18px 22px; color: hsl(var(--text-dim)); font-size: 0.92rem;
}
.note-box strong { color: hsl(var(--text)); }

/* Final CTA */
.final-cta { text-align: center; padding: 72px 0; }
.final-cta h2 { font-size: 2rem; margin-bottom: 14px; }
.final-cta p { color: hsl(var(--text-dim)); max-width: 60ch; margin: 0 auto 26px; }
.final-cta .cta-row { justify-content: center; }

/* ---------- Footer ---------- */
.site-footer { background: hsl(var(--bg-raised)); border-top: 1px solid hsl(var(--border)); padding: 48px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.site-footer h4 { font-size: 0.95rem; margin-bottom: 12px; }
.site-footer p, .site-footer li { color: hsl(var(--text-dim)); font-size: 0.88rem; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid hsl(var(--border)); padding-top: 20px; color: hsl(var(--text-dim)); font-size: 0.82rem; }

/* ---------- Inner pages ---------- */
.breadcrumb { padding: 20px 0 0; font-size: 0.85rem; color: hsl(var(--text-dim)); }
.breadcrumb a { color: hsl(var(--text-dim)); }
.article-head { padding: 28px 0 24px; border-bottom: 1px solid hsl(var(--border)); margin-bottom: 32px; }
.article-head h1 { font-size: 2.1rem; line-height: 1.25; margin: 12px 0; }
.article-head .lead { color: hsl(var(--text-dim)); font-size: 1.05rem; max-width: 68ch; }
.article-meta { font-size: 0.82rem; color: hsl(var(--text-dim)); margin-top: 10px; }
.article-body { max-width: 780px; padding-bottom: 40px; }
.article-body h2 { font-size: 1.45rem; margin: 36px 0 14px; padding-top: 8px; }
.article-body h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.article-body p { margin-bottom: 14px; color: hsl(28 14% 82%); }
.article-body ul, .article-body ol { margin: 0 0 16px 22px; color: hsl(28 14% 82%); }
.article-body li { margin-bottom: 6px; }
.article-body table { width: 100%; border-collapse: collapse; margin: 16px 0 24px; font-size: 0.9rem; }
.article-body th, .article-body td { padding: 10px 12px; border: 1px solid hsl(var(--border)); text-align: left; }
.article-body th { background: hsl(var(--bg-card)); }
.tldr {
  background: hsl(var(--bg-card)); border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0; padding: 16px 20px; margin-bottom: 24px;
}
.tldr strong { color: var(--accent-light); }
.related-box { background: hsl(var(--bg-raised)); border: 1px solid hsl(var(--border)); border-radius: var(--radius); padding: 24px; margin: 40px 0; }
.related-box h2 { margin-top: 0 !important; font-size: 1.2rem !important; }
.related-box ul { margin-bottom: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .about-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 2.1rem; }
}
@media (max-width: 560px) {
  .card-grid, .guide-grid, .footer-grid { grid-template-columns: 1fr; }
  .nav-inner { flex-wrap: wrap; gap: 10px; }
  .nav-links { margin-left: 0; }
  .hero { padding: 48px 0 40px; }
  .hero h1 { font-size: 1.8rem; }
  .article-head h1 { font-size: 1.6rem; }
}

/* ---------- Runewords DB page ---------- */
.rw-toolbar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; align-items: center; }
.rw-search {
  flex: 1 1 240px; background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border));
  border-radius: 8px; padding: 10px 14px; color: hsl(var(--text)); font-size: 0.95rem;
}
.rw-search:focus { outline: none; border-color: hsl(var(--nav-theme) / 0.7); }
.rw-select {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border)); border-radius: 8px;
  padding: 10px 12px; color: hsl(var(--text)); font-size: 0.9rem;
}
.rw-count { color: hsl(var(--text-dim)); font-size: 0.88rem; margin-bottom: 16px; }
.rw-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rw-card {
  background: hsl(var(--bg-card)); border: 1px solid hsl(var(--border));
  border-radius: var(--radius); padding: 18px 20px;
}
.rw-card-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.rw-card-head h3 { font-size: 1.1rem; }
.rw-badge {
  font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 2px 8px; border-radius: 999px; border: 1px solid hsl(var(--border)); color: hsl(var(--text-dim));
}
.rw-badge.ladder { border-color: hsl(210 60% 45% / 0.6); color: hsl(210 80% 65%); }
.rw-badge.rotw { border-color: hsl(var(--nav-theme) / 0.6); color: var(--accent-light); }
.rw-level { margin-left: auto; font-size: 0.82rem; color: hsl(var(--text-dim)); }
.rw-bases { font-size: 0.85rem; color: hsl(var(--text-dim)); margin-bottom: 10px; }
.rw-runes { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rw-rune {
  background: hsl(var(--nav-theme) / 0.15); border: 1px solid hsl(var(--nav-theme) / 0.4);
  color: var(--accent-light); border-radius: 6px; padding: 3px 9px; font-size: 0.82rem; font-weight: 600;
}
.rw-rune small { color: hsl(var(--text-dim)); font-weight: 400; margin-left: 4px; }
.rw-stats { list-style: none; font-size: 0.92rem; color: hsl(28 14% 85%); }
.rw-stats li {
  padding: 5px 0 5px 16px; position: relative; line-height: 1.5;
  border-top: 1px solid hsl(var(--border) / 0.35);
}
.rw-stats li:first-child { border-top: none; }
.rw-stats li::before {
  content: ""; position: absolute; left: 2px; top: 13px;
  width: 5px; height: 5px; border-radius: 1px;
  background: hsl(var(--nav-theme) / 0.7); transform: rotate(45deg);
}
.rw-stats b { color: var(--accent-light); font-weight: 600; }
.rw-stats .rw-neg { color: hsl(0 55% 62%); }
.rw-stats .rw-neg b { color: hsl(0 65% 68%); }
.rw-stats .rw-neg::before { background: hsl(0 55% 50% / 0.7); }
@media (max-width: 700px) { .rw-grid { grid-template-columns: 1fr; } }

/* ---------- language switcher ---------- */
.lang-btn {
  background: transparent; border: 1px solid hsl(var(--border)); color: hsl(var(--text-dim));
  border-radius: 6px; padding: 4px 10px; font-size: 0.82rem; cursor: pointer;
}
.lang-btn:hover { color: var(--accent-light); border-color: hsl(var(--nav-theme) / 0.5); }

.rw-en { font-size: 0.8rem; color: hsl(var(--text-dim)); font-weight: 400; }

.rw-badge.cls { border-color: hsl(265 55% 55% / 0.6); color: hsl(265 80% 72%); }
