@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=IM+Fell+English:ital@0;1&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:        #0a0a0a;
  --surface:   #111111;
  --surface2:  #1a1a1a;
  --border:    rgba(255,255,255,0.08);
  --text:      #e8e0d0;
  --muted:     #888;
  --clay:      #b87c4c;
  --ember:     #c0622a;
  --moss:      #4a7c4e;
  --scroll:    #f0e8d8;
  --nav-h:     60px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ─── PAGES ─── */
.page { display: none; min-height: 100vh; }
.page.active { display: block; }

/* ─── NAV ─── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2.5rem;
  background: rgba(10,10,10,0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.4s;
}

nav.scrolled, nav.opaque {
  background: rgba(10,10,10,0.82);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--scroll);
  letter-spacing: 0.08em;
  cursor: pointer;
  text-decoration: none;
}
.nav-logo span { color: var(--clay); }

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  text-decoration: none;
}
.nav-links a:hover { color: var(--scroll); }
.nav-links a.active { color: var(--scroll); background: rgba(255,255,255,0.06); }

/* ─── HERO ─── */
#page-home .hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-bg .slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease-in-out;
  transform: scale(1.04);
  animation: slowzoom 8s ease-in-out infinite alternate;
}

.hero-bg .slide.active {
  opacity: 1;
}

@keyframes slowzoom {
  from { transform: scale(1.0); }
  to   { transform: scale(1.06); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.18) 0%,
    rgba(0,0,0,0.35) 50%,
    rgba(0,0,0,0.88) 100%
  );
  z-index: 1;
}

.hero-content { z-index: 2; }

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 0 2rem;
}

.hero-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-family: 'Cinzel', serif;
  font-size: clamp(3rem, 7vw, 5.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-shadow: 0 4px 32px rgba(0,0,0,0.5);
  margin-bottom: 1rem;
}
.hero h1 em { font-style: normal; color: var(--clay); }

.hero-sub {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  font-size: 1.15rem;
  color: rgba(240,232,216,0.8);
  margin-bottom: 2.5rem;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.07);
  color: var(--scroll);
  backdrop-filter: blur(6px);
}

.badge-ip {
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  border-color: rgba(184,124,76,0.5);
}
.badge-ip:hover { background: rgba(184,124,76,0.2); border-color: var(--clay); }

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: var(--ember);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  border-radius: 4px;
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}
.hero-cta:hover { background: #a0501f; transform: translateY(-2px); }

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255,255,255,0.35);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: bounce 2s infinite;
  z-index: 3;
}
.scroll-hint svg { opacity: 0.4; }

@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ─── HOME INFO SECTION ─── */
.home-info {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.home-info-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.home-info h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: var(--scroll);
  margin-bottom: 1rem;
}

.home-info p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.info-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-box {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.stat-box .label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.stat-box .value {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--clay);
  font-weight: 600;
}

/* ─── WIKI ─── */
#page-wiki {
  padding-top: var(--nav-h);
  background: var(--bg);
}

.wiki-hero {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a1208 100%);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.wiki-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  color: var(--scroll);
  margin-bottom: 0.5rem;
}

.wiki-hero p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
}

.wiki-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
  gap: 3rem;
  align-items: start;
}

/* Sidebar */
.wiki-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem;
}

.wiki-sidebar h3 {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.wiki-sidebar ul { list-style: none; }
.wiki-sidebar li { margin-bottom: 1px; }
.wiki-sidebar a {
  display: block;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  font-size: 0.875rem;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.wiki-sidebar a:hover,
.wiki-sidebar a.active {
  background: rgba(184,124,76,0.12);
  color: var(--clay);
}

/* Wiki content */
.wiki-content { min-width: 0; }

.wiki-section {
  display: none;
  animation: fadeIn 0.25s ease;
}
.wiki-section.active { display: block; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.wiki-section h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.75rem;
  color: var(--scroll);
  margin-bottom: 0.35rem;
}

.wiki-section .ws-subtitle {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--clay);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.wiki-section h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--clay);
  margin: 1.75rem 0 0.6rem;
}

.wiki-section p {
  color: #b0a898;
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.wiki-section ul, .wiki-section ol {
  margin: 0.5rem 0 1rem 1.4rem;
  color: #b0a898;
  font-size: 0.95rem;
}
.wiki-section li { margin-bottom: 0.4rem; line-height: 1.7; }

.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--clay);
  border-radius: 0 6px 6px 0;
  padding: 1.1rem 1.4rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  color: #b0a898;
}
.info-box strong { color: var(--clay); display: block; margin-bottom: 0.3rem; font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; }

.info-box.tip  { border-left-color: var(--moss); }
.info-box.warn { border-left-color: #c08030; }

code {
  background: var(--surface2);
  color: var(--clay);
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  border: 1px solid var(--border);
}

.cmd-list { list-style: none; margin-left: 0 !important; }
.cmd-list li {
  display: flex;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}
.cmd-list li:last-child { border-bottom: none; }
.cmd-list code { flex-shrink: 0; min-width: 180px; }
.cmd-list .cmd-desc { color: var(--muted); font-size: 0.875rem; }

/* ─── WIKI TABLES ─── */
.wiki-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  font-size: 0.875rem;
}
.wiki-section th {
  background: var(--surface2);
  color: var(--clay);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.wiki-section td {
  padding: 0.6rem 1rem;
  color: #b0a898;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.wiki-section tr:last-child td { border-bottom: none; }
.wiki-section tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── MAP PAGE ─── */
#page-map {
  padding-top: var(--nav-h);
  background: #03091a;
  min-height: 100vh;
  flex-direction: column;
}
#page-map.active {
  display: flex;
}

.map-header {
  padding: 2.5rem 2rem 1.5rem;
  text-align: center;
}

.map-header h1 {
  font-family: 'Cinzel', serif;
  font-size: 2rem;
  color: var(--scroll);
  margin-bottom: 0.4rem;
}

.map-header p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--muted);
}

.map-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem 3rem;
}

.map-frame {
  position: relative;
  max-width: 860px;
  width: 100%;
  border: 1px solid rgba(74,124,78,0.3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(74,124,78,0.12), 0 0 120px rgba(3,9,26,0.8);
}

.map-frame img {
  width: 100%;
  display: block;
}

.map-frame .map-glow {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  box-shadow: inset 0 0 40px rgba(74,124,78,0.08);
  pointer-events: none;
}

/* ─── RULES PAGE ─── */
#page-rules {
  padding-top: var(--nav-h);
  background: var(--bg);
}

.rules-hero {
  background: linear-gradient(160deg, #0d0d0d, #120a06);
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.rules-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  color: var(--scroll);
  margin-bottom: 0.5rem;
}

.rules-hero p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--muted);
}

.rules-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.rule-category {
  margin-bottom: 3rem;
}

.rule-category h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: var(--clay);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rule-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}
.rule-item:last-child { border-bottom: none; }

.rule-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.rule-item h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--scroll);
  margin-bottom: 0.3rem;
}
.rule-item p {
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.rule-item.critical .rule-num {
  background: rgba(192,98,42,0.15);
  border-color: rgba(192,98,42,0.4);
  color: var(--ember);
}
.rule-item.critical h4 { color: #e08050; }

/* ─── FOOTER ─── */
.site-footer {
  background: #060606;
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.site-footer .footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--scroll);
  margin-bottom: 0.5rem;
}
.site-footer .footer-logo span { color: var(--clay); }

.site-footer p {
  font-size: 0.8rem;
  color: #444;
}

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface);
  color: var(--scroll);
  padding: 0.75rem 1.5rem;
  border-radius: 100px;
  font-size: 0.85rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  z-index: 999;
  border: 1px solid var(--clay);
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  nav { padding: 0 1.25rem; }
  .nav-links a { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
  .home-info-inner { grid-template-columns: 1fr; gap: 2rem; }
  .wiki-body { grid-template-columns: 1fr; }
  .wiki-sidebar { position: static; }
  .cmd-list li { flex-direction: column; gap: 0.25rem; }
  .cmd-list code { min-width: unset; }
}

/* ─── MUSIC BUTTON ─── */
.music-btn {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem;
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 100px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: 'Inter', sans-serif;
}

.music-btn:hover {
  background: rgba(30,30,30,0.85);
  border-color: rgba(184,124,76,0.4);
  color: var(--scroll);
}

.music-btn.playing {
  border-color: rgba(184,124,76,0.5);
  color: var(--clay);
}

.music-icon {
  font-size: 0.9rem;
  animation: none;
}

.music-btn.playing .music-icon {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* ─── PAGE TRANSITIONS ─── */
.page {
  animation: none;
}

.page.fade-out {
  animation: pageFadeOut 0.2s ease forwards;
  pointer-events: none;
}

.page.fade-in {
  animation: pageFadeIn 0.25s ease forwards;
}

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

@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── NEWS PAGE ─── */
#page-news {
  padding-top: var(--nav-h);
  min-height: 100vh;
  position: relative;
}

.news-bg-img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  display: none;
  pointer-events: none;
}

#page-news.active .news-bg-img { display: block; }

.news-hero {
  padding: 4rem 2rem 3rem;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.news-hero h1 {
  font-family: 'Cinzel', serif;
  font-size: 2.5rem;
  color: var(--scroll);
  margin-bottom: 0.5rem;
}

.news-hero p {
  font-family: 'IM Fell English', serif;
  font-style: italic;
  color: var(--muted);
}

.news-body {
  max-width: 780px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

#page-news .site-footer {
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(8px);
}


/* Cards */
.news-card {
  background: rgba(10,10,10,0.7);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(6px);
  transition: border-color 0.2s;
}

.news-card:hover {
  border-color: rgba(184,124,76,0.4);
}


.news-card h2 {
  font-family: 'Cinzel', serif;
  font-size: 1.3rem;
  color: var(--scroll);
  margin: 0.5rem 0 0.75rem;
}

.news-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  color: var(--scroll);
  margin: 0.5rem 0 0.6rem;
}

.news-card p {
  font-size: 0.9rem;
  color: #b0a898;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

.news-card p:last-child { margin-bottom: 0; }

/* Meta row */
.news-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.25rem;
}

.news-date {
  font-size: 0.75rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Tags */
.news-tag {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  font-weight: 600;
}


.tag-update {
  background: rgba(74,94,58,0.18);
  color: #7ab87e;
  border: 1px solid rgba(74,94,58,0.35);
}


/* Section label */
.news-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ash);
  margin-bottom: 1rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.news-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: #444;
  margin-top: 2rem;
  font-family: 'IM Fell English', serif;
  font-style: italic;
}

/* ─── NEWS PINNED FOOTER ─── */
.news-site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0.85rem 2rem;
  text-align: center;
  z-index: 10;
}

.news-site-footer .footer-logo {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--scroll);
  margin-bottom: 0.15rem;
}

.news-site-footer p {
  font-size: 0.75rem;
  color: var(--muted);
}
