/* === CSS Custom Properties === */
:root {
  --bg-base:      #0a0a0f;
  --bg-surface:   #111118;
  --bg-surface-2: #1a1a24;
  --accent:       #f97316;
  --text-primary: #f1f5f9;
  --text-muted:   #64748b;

  --rarity-common:    #9ca3af;
  --rarity-uncommon:  #22c55e;
  --rarity-rare:      #06b6d4;
  --rarity-epic:      #a855f7;
  --rarity-legendary: #f97316;
  --rarity-exotic:    #fbbf24;
}

/* === Base === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  margin: 0;
}

/* === Scrollbar === */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  transition-delay: var(--delay, 0ms);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* === Navbar === */
#navbar {
  background: transparent;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
#navbar.scrolled {
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(249, 115, 22, 0.1);
}

/* === Buttons === */
.btn-coming-soon {
  padding: 0.75rem 2rem;
  border: 2px solid var(--text-muted);
  color: var(--text-muted);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: not-allowed;
  opacity: 0.5;
  background: transparent;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 2rem;
  background: #5865f2;
  color: white;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.btn-discord:hover { opacity: 0.85; }

/* === Hero === */
.hero-bg {
  background-image: url('../img/bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  background: linear-gradient(to bottom, rgba(10,10,15,0.55) 0%, rgba(10,10,15,0.75) 100%),
              radial-gradient(ellipse at center, rgba(249,115,22,0.08) 0%, transparent 70%);
}
.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-primary);
  text-shadow: 0 0 60px rgba(249,115,22,0.15);
}

/* === Section Titles === */
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}

/* === Loop Cards === */
.loop-card {
  background: var(--bg-surface);
  border: 1px solid rgba(249,115,22,0.15);
  padding: 2rem 1.5rem;
  flex: 1;
  min-width: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.loop-card:hover {
  border-color: rgba(249,115,22,0.4);
  box-shadow: 0 0 24px rgba(249,115,22,0.08);
}
.loop-card-number {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: rgba(249,115,22,0.12);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.loop-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
}
.loop-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.loop-arrow {
  color: var(--accent);
  font-size: 1.5rem;
  flex-shrink: 0;
  opacity: 0.4;
  padding: 0 0.25rem;
}

/* === Feature Cards === */
.feature-card {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.05);
  padding: 1.75rem;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.feature-card:hover {
  border-color: rgba(249,115,22,0.2);
  transform: translateY(-2px);
}
.feature-icon {
  width: 2.5rem;
  height: 2.5rem;
  color: var(--accent);
  margin-bottom: 1rem;
}
.feature-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.feature-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* === Screenshots === */
.screenshot-placeholder {
  aspect-ratio: 16/9;
  width: 400px;
  flex-shrink: 0;
  background: var(--bg-surface-2);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Barlow Condensed', sans-serif;
}

/* === Wiki Sidebar === */
#wiki-sidebar {
  background: #0e0e16;
  border-right: 1px solid rgba(255,255,255,0.06);
}

/* Mobile sidebar: off-screen by default */
@media (max-width: 1023px) {
  #wiki-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    z-index: 40;
    transition: left 0.3s ease;
    overflow-y: auto;
  }
  #wiki-sidebar.open {
    left: 0;
  }
}

.wiki-nav-item {
  display: block;
  padding: 0.625rem 1.25rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s ease, background 0.2s ease;
  border-left: 2px solid transparent;
}
.wiki-nav-item:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.03);
}
.wiki-nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(249,115,22,0.05);
}

/* === Wiki Content Markdown === */
#wiki-content {
  line-height: 1.7;
  font-size: 0.9375rem;
  color: var(--text-primary);
}
#wiki-content h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#wiki-content h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 0.75rem 0;
  padding-left: 0.75rem;
  border-left: 3px solid var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
#wiki-content h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2rem 0 0.5rem 0;
  text-transform: uppercase;
}
#wiki-content h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 1.5rem 0 0.5rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
#wiki-content p { margin: 0 0 1rem 0; color: #cbd5e1; }
#wiki-content strong { color: var(--accent); font-weight: 600; }
#wiki-content em { color: var(--text-muted); font-style: italic; }
#wiki-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-style: italic;
}
#wiki-content blockquote p { margin: 0; color: var(--text-primary); }
#wiki-content code {
  background: var(--bg-surface-2);
  color: var(--accent);
  padding: 0.125rem 0.375rem;
  font-size: 0.875em;
  font-family: 'Fira Code', 'Consolas', 'Courier New', monospace;
  border-radius: 2px;
}
#wiki-content pre {
  background: var(--bg-surface);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 2px;
}
#wiki-content pre code {
  background: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.875rem;
}
#wiki-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  display: block;
  overflow-x: auto;
}
#wiki-content th {
  background: var(--bg-surface-2);
  color: var(--text-primary);
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(249,115,22,0.2);
  white-space: nowrap;
}
#wiki-content td {
  padding: 0.625rem 1rem;
  color: #cbd5e1;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
#wiki-content tr:hover td { background: rgba(255,255,255,0.02); }
#wiki-content ul, #wiki-content ol {
  padding-left: 1.5rem;
  margin: 0 0 1rem 0;
}
#wiki-content li { margin-bottom: 0.375rem; color: #cbd5e1; }
#wiki-content hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 2rem 0;
}
#wiki-content a { color: var(--accent); text-decoration: underline; }

/* === Rarity spans injected by wiki.js === */
.rarity-common    { color: var(--rarity-common);    font-weight: 600; }
.rarity-uncommon  { color: var(--rarity-uncommon);  font-weight: 600; }
.rarity-rare      { color: var(--rarity-rare);      font-weight: 600; }
.rarity-epic      { color: var(--rarity-epic);      font-weight: 600; }
.rarity-legendary { color: var(--rarity-legendary); font-weight: 600; }
.rarity-exotic    { color: var(--rarity-exotic);    font-weight: 600; }
