@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg: #000000;
  --surface: rgba(225,6,0,0.06);
  --surface-strong: rgba(225,6,0,0.11);
  --border: rgba(225,6,0,0.22);
  --border-strong: rgba(225,6,0,0.42);

  --red: #e10600;
  --red-deep: #a30400;
  --red-glow: rgba(225,6,0,0.55);

  --text: #f5f2f2;
  --text-dim: #a68a8a;
  --text-faint: #5f4747;

  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 18px;
  --radius-sm: 12px;
}

[data-theme="light"] {
  --bg: #fbf9f9;
  --surface: rgba(184,15,10,0.045);
  --surface-strong: rgba(184,15,10,0.08);
  --border: rgba(184,15,10,0.14);
  --border-strong: rgba(184,15,10,0.28);

  --red: #d40f1f;
  --red-deep: #b80f0a;
  --red-glow: rgba(212,15,31,0.35);

  --text: #18100f;
  --text-dim: #6b5654;
  --text-faint: #ab9594;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed;
  top: -20%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, var(--red-glow) 0%, transparent 68%);
  opacity: 0.28;
  pointer-events: none;
  z-index: 0;
}
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; position: relative; z-index: 1; }

.cursor { display: inline-block; width: 6px; height: 15px; background: var(--red); margin-left: 2px; vertical-align: -2px; animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Shared glass surface */
.glass {
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.glass:hover { border-color: var(--border-strong); background: var(--surface-strong); }

/* ---------- Nav ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 58px; }
.nav-logo { font-family: var(--font-display); font-size: 17px; letter-spacing: 0.01em; text-transform: uppercase; font-weight: 700; }
.nav-logo span { color: var(--red); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a:not(.btn) { font-family: var(--font-body); font-size: 12.5px; font-weight: 500; color: var(--text-dim); }
.nav-links a:not(.btn):hover { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px;
  border-radius: 999px;
  font-family: var(--font-body); font-size: 12.5px; font-weight: 600;
  transition: box-shadow 0.2s ease, transform 0.15s ease, background 0.2s ease;
}
.btn-solid-white { background: var(--red); color: #fff; box-shadow: 0 0 0 rgba(225,6,0,0); }
.btn-solid-white:hover { box-shadow: 0 0 22px var(--red-glow); transform: translateY(-1px); }
.btn-outline-white { border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); backdrop-filter: blur(10px); }
.btn-outline-white:hover { border-color: var(--red); color: var(--red); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  backdrop-filter: blur(10px);
  cursor: pointer; color: var(--text);
}
.theme-toggle:hover { border-color: var(--red); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* ---------- Hero ---------- */
.hero { padding: 60px 0 48px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-dim); margin-bottom: 20px;
  padding: 7px 14px; border-radius: 999px;
  background: var(--surface); backdrop-filter: blur(10px); border: 1px solid var(--border);
}
.eyebrow::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0.005em;
  text-transform: uppercase;
  font-weight: 700;
}
.hero h1 .accent { color: var(--red); }
.hero-sub { margin-top: 16px; font-size: 13.5px; color: var(--text-dim); max-width: 400px; line-height: 1.7; }
.hero-actions { margin-top: 26px; display: flex; gap: 10px; flex-wrap: wrap; }

.hero-art { position: relative; display: flex; align-items: center; justify-content: center; min-height: 280px; }
.hero-badge { position: relative; width: 50%; max-width: 210px; filter: drop-shadow(0 0 40px var(--red-glow)); }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head { max-width: 520px; margin-bottom: 26px; }
.section-eyebrow {
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--red); margin-bottom: 8px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 28px);
  text-transform: uppercase;
  font-weight: 700;
}
.section-head p { margin-top: 10px; font-size: 12.5px; color: var(--text-dim); max-width: 440px; }

/* ---------- Card shell (shared) ---------- */
.card { background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius); }
.card:hover { border-color: var(--border-strong); }

/* ---------- Systems: bento grid ---------- */
.systems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.system {
  padding: 20px;
  background: var(--surface); backdrop-filter: blur(18px);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.system:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.system:nth-child(1) { grid-column: span 2; }
.system:nth-child(6) { grid-column: span 2; }
.system-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: var(--red); margin-bottom: 12px; }
.system-icon svg { width: 17px; height: 17px; }
.system-label { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.system h3 { font-family: var(--font-display); font-size: 16px; text-transform: uppercase; margin-bottom: 6px; font-weight: 700; }
.system p { font-size: 11.5px; color: var(--text-dim); line-height: 1.55; }

/* ---------- Rank ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.ladder-step { padding: 16px 6px 14px; text-align: center; background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.ladder-badge { height: 30px; width: auto; margin: 0 auto 8px; }
.ladder-name { font-family: var(--font-display); font-size: 12px; text-transform: uppercase; margin-bottom: 3px; font-weight: 700; }
.ladder-req { font-family: var(--font-mono); font-size: 8.5px; color: var(--text-faint); }
.ladder-step.is-ruby { border-color: var(--border-strong); box-shadow: 0 0 24px rgba(225,6,0,0.15); }
.ladder-step.is-ruby .ladder-name { color: var(--red); }

/* ---------- Tiers ---------- */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tier-card { padding: 20px; display: flex; flex-direction: column; background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius); }
.tier-card:hover { border-color: var(--border-strong); }
.tier-name { font-family: var(--font-display); font-size: 17px; text-transform: uppercase; font-weight: 700; }
.tier-price { font-family: var(--font-mono); font-size: 18px; color: var(--red); margin: 10px 0 14px; font-weight: 600; }
.tier-price span { font-size: 9px; color: var(--text-faint); font-weight: 400; }
.tier-list { list-style: none; font-size: 11px; color: var(--text-dim); }
.tier-list li { padding: 6px 0; border-top: 1px solid var(--border); }
.tier-list li:first-child { border-top: none; }

/* ---------- Leaderboard table ---------- */
.lb-table { background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lb-row { display: grid; grid-template-columns: 40px 1fr 90px 80px 90px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--border); font-family: var(--font-mono); font-size: 11.5px; }
.lb-row:last-child { border-bottom: none; }
.lb-row.lb-head { font-size: 9px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-faint); }
.lb-pos { color: var(--red); font-weight: 600; }
.lb-name { font-family: var(--font-body); font-weight: 600; font-size: 12.5px; }
.lb-rp { text-align: right; }
.lb-record { text-align: right; color: var(--text-dim); }
.lb-updated { font-family: var(--font-mono); font-size: 10px; color: var(--text-faint); margin-top: 10px; text-align: right; }
.lb-empty { padding: 40px 20px; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 24px 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--font-body); font-size: 12px; color: var(--text-faint); }

/* ---------- Creators (compact) ---------- */
.font-username { font-family: var(--font-display); }
.creators-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.creator-card { display: flex; gap: 14px; padding: 14px; align-items: flex-start; background: var(--surface); backdrop-filter: blur(18px); border: 1px solid var(--border); border-radius: var(--radius); }
.creator-card:hover { border-color: var(--border-strong); }
.creator-avatar-wrap { width: 54px; height: 54px; border-radius: 14px; overflow: hidden; flex-shrink: 0; }
.creator-avatar { width: 100%; height: 100%; object-fit: cover; display: block; }
.creator-body { flex: 1; min-width: 0; }
.creator-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.creator-name { font-family: var(--font-display); font-size: 17px; text-transform: uppercase; letter-spacing: 0.01em; font-weight: 700; }
.creator-name-img { height: 22px; width: auto; }

.creator-name.is-flame {
  color: var(--red);
  -webkit-text-stroke: 1px #000;
  paint-order: stroke fill;
  animation: flame-pulse 2.4s ease-in-out infinite;
}
@keyframes flame-pulse {
  0%, 100% { text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 0 0 8px rgba(225,6,0,0.5); }
  50% { text-shadow: 1px 1px 0 #000, -1px -1px 0 #000, 0 0 18px rgba(225,6,0,0.95); }
}

.creator-tag { display: inline-block; margin-top: 2px; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--red); opacity: 0.85; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); flex-shrink: 0; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.status-pill.is-live { color: var(--red); }
.status-pill.is-live .status-dot { background: var(--red); box-shadow: 0 0 6px var(--red); animation: dot-blink 1.1s ease-in-out infinite; }
@keyframes dot-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.creator-links { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.platform-link { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 10px; background: #fff; }
.platform-link:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.35); transform: translateY(-1px); }
.platform-link img { width: 16px; height: 16px; object-fit: contain; }
.platform-link.is-disabled { opacity: 0.2; pointer-events: none; background: transparent; border: 1px solid var(--border); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-art { order: -1; min-height: 200px; }
  .systems { grid-template-columns: repeat(2, 1fr); }
  .system:nth-child(1), .system:nth-child(6) { grid-column: span 2; }
  .tiers { grid-template-columns: 1fr 1fr; }
  .ladder { grid-template-columns: repeat(4, 1fr); }
  .nav-links a:not(.btn) { display: none; }
  .lb-row { grid-template-columns: 32px 1fr 70px; }
  .lb-record { display: none; }
}
@media (max-width: 560px) {
  .systems { grid-template-columns: 1fr; }
  .system:nth-child(1), .system:nth-child(6) { grid-column: span 1; }
  .tiers { grid-template-columns: 1fr; }
  .creators-grid { grid-template-columns: 1fr; }
  .ladder { grid-template-columns: repeat(3, 1fr); }
  footer { flex-direction: column; gap: 8px; text-align: center; }
}
