/* ============================================================
   RSX6900 — ROBLOX STONKS INDEX
   Design system: neubrutalist terminal / meme-finance aesthetic
   ============================================================ */

:root {
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Consolas", "Liberation Mono", "Menlo", monospace;
  --font-display: "Arial Black", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* ---- NEON theme (default) ---- */
  --bg: #f2f0e2;
  --bg-soft: #e9e6d4;
  --panel: #ffffff;
  --ink: #121210;
  --lime: #d7ff33;
  --lime-dark: #b6d61f;
  --red: #e8352b;
  --red-dark: #b8190f;
  --black-panel: #0d0d0c;
  --muted: #6b6a5c;
  --pos: #2f8f3e;
  --line: #121210;
  --shadow-off: 4px;
  --shadow: var(--shadow-off) var(--shadow-off) 0 var(--line);
  --shadow-sm: 3px 3px 0 var(--line);
  --radius: 2px;
}

:root[data-theme="pastel"] {
  --bg: #fdeef2;
  --bg-soft: #fbe0e8;
  --panel: #fffdfb;
  --ink: #2a2333;
  --lime: #bdf3d4;
  --lime-dark: #93dfb6;
  --red: #ff90a6;
  --red-dark: #f2718c;
  --black-panel: #2a2333;
  --muted: #8d8494;
  --pos: #4caf7d;
  --line: #2a2333;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* faint blueprint grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.035;
}

/* scanline / CRT overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,0,0,0.035) 0px,
    rgba(0,0,0,0.035) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.5;
  mix-blend-mode: multiply;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }

::selection { background: var(--lime); color: var(--ink); }

/* ---------------- layout shell ---------------- */
.shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 20px 24px 0;
  position: relative;
  z-index: 1;
}

.layout {
  display: grid;
  grid-template-columns: 208px 1fr;
  gap: 28px;
  align-items: start;
}

/* ---------------- sidebar ---------------- */
.sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: calc(100vh - 40px);
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-tile {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-tile img { width: 100%; height: 100%; }

.logo-word {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 15px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.logo-word span { color: var(--red); }

.sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar-actions .btn {
  width: 100%;
  justify-content: center;
  padding: 11px 14px;
}

.nav-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-item a {
  display: block;
  text-decoration: none;
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 9px 11px;
  font-size: 11px;
  color: var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.nav-item .sector {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}
.nav-item .label {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.01em;
  font-size: 13px;
}

.nav-item a:hover {
  background: var(--lime);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}

.nav-item.active a {
  background: var(--lime);
  box-shadow: var(--shadow-sm);
  transform: translate(-2px, -2px);
}

.sidebar-spacer { flex: 1; }

.mode-toggle {
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
}
.mode-toggle .mode-label { color: var(--muted); letter-spacing: 0.08em; }
.mode-switch { display: flex; gap: 4px; }
.mode-switch button {
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 3px 7px;
  font-size: 9px;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  cursor: pointer;
  color: var(--ink);
  transition: background 0.12s ease;
}
.mode-switch button:hover { background: var(--lime); }
.mode-switch button.active { background: var(--lime); }

.nav-hint {
  border: 2px dashed var(--line);
  padding: 8px 10px;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 0.05em;
  line-height: 1.6;
}

/* ---------------- main ---------------- */
.main {
  display: flex;
  flex-direction: column;
  gap: 34px;
  padding-bottom: 10px;
  min-width: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--line);
  background: var(--lime);
  padding: 7px 14px;
  font-size: 11px;
  letter-spacing: 0.1em;
  box-shadow: var(--shadow-sm);
}
.tag-pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
  animation: blink 1.6s steps(2) infinite;
}

.wallet-mini {
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 7px 12px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.wallet-mini:hover { background: var(--lime); transform: translate(-2px,-2px); box-shadow: var(--shadow); }

/* marquee strip */
.marquee {
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  background: var(--ink);
  color: var(--lime);
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}
.marquee-track {
  display: inline-flex;
  gap: 0;
  animation: marquee 26s linear infinite;
  padding: 7px 0;
}
.marquee-track span {
  padding: 0 22px;
  font-size: 11px;
  letter-spacing: 0.12em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.marquee-track span::after { content: "\2726"; color: var(--red); }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------- hero ---------------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 26px;
  align-items: stretch;
}

.hero-copy { display: flex; flex-direction: column; justify-content: center; gap: 18px; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 5.4vw, 74px);
  line-height: 0.92;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin: 0;
}
.hero-title .accent { color: var(--red); position: relative; display: inline-block; }
.hero-title .ticker-sym {
  display: inline-flex;
  align-items: center;
  font-size: 0.42em;
  vertical-align: middle;
  border: 2px solid var(--line);
  background: var(--panel);
  padding: 4px 10px;
  margin-left: 10px;
  box-shadow: var(--shadow-sm);
}

.hero-tagline {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 46ch;
  border-left: 3px solid var(--red);
  padding-left: 14px;
}
.hero-tagline b { background: var(--lime); padding: 0 3px; }

.btn {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  border: 2px solid var(--line);
  padding: 13px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease, color 0.12s ease;
  color: var(--ink);
  background: var(--panel);
}
.btn:hover { background: var(--lime); transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--line); }
.btn:active { transform: translate(0,0); box-shadow: 1px 1px 0 var(--line); }
.btn-primary { background: var(--lime); }
.btn-primary:hover { background: var(--lime-dark); }

.hero-media {
  position: relative;
  border: 2px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 320px;
  background: #bfe8ff;
}
.hero-media img,
.hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-media-inner { position: absolute; inset: 0; transition: transform 0.25s ease-out; will-change: transform; }
.hero-video { background: #bfe8ff; }

@keyframes blink {
  50% { opacity: 0.15; }
}

/* ---------------- sections shared ---------------- */
.section { display: flex; flex-direction: column; gap: 16px; scroll-margin-top: 90px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--lime);
  border: 2px solid var(--line);
  padding: 9px 14px;
  box-shadow: var(--shadow-sm);
}
.section-head h2 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  font-weight: 700;
}
.section-head .chip {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 2px 8px;
}

.section-body { font-size: 13px; line-height: 1.8; color: var(--ink); }

/* ---------------- stat grid ---------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.stat-card {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.stat-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.stat-card .stat-icon {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  font-size: 13px;
}
.stat-card .stat-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-transform: uppercase;
  line-height: 1.4;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: clamp(18px, 2vw, 24px);
  letter-spacing: -0.01em;
}
.stat-card .stat-delta { font-size: 10.5px; color: var(--pos); }
.stat-card .stat-delta.muted-delta { color: var(--muted); }

/* ---------------- dashboard row ---------------- */
.dash-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.9fr;
  gap: 16px;
  align-items: stretch;
}
.panel {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel-title {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.panel-title::before { content: "\276F"; color: var(--red); }

/* pending-data placeholder (chart area, awaiting launch) */
.data-pending {
  height: 160px;
  border: 2px dashed var(--line);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.airdrop-box {
  border: 2px solid var(--line);
  background: var(--bg-soft);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.airdrop-box .k { font-size: 9px; letter-spacing: 0.08em; color: var(--muted); }
.airdrop-box .countdown { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.02em; }
.airdrop-box .sub { font-size: 10px; color: var(--muted); }

/* index status list */
.status-list { display: flex; flex-direction: column; gap: 0; }
.status-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--bg-soft);
  font-size: 11.5px;
  gap: 8px;
}
.status-row:last-child { border-bottom: none; }
.status-row .k { color: var(--muted); letter-spacing: 0.05em; }
.status-row .v { font-weight: 700; text-align: right; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--pos); display: inline-block; box-shadow: 0 0 6px var(--pos); animation: blink 2s steps(2) infinite; }

/* join panel */
.join-panel {
  background: var(--black-panel);
  color: var(--lime);
  border-color: var(--line);
  justify-content: space-between;
}
.join-panel h3 {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
  color: #fff;
  text-transform: uppercase;
}
.join-panel h3 span { color: var(--lime); }
.join-panel .btn-primary { align-self: flex-start; }
.social-row { display: flex; gap: 10px; margin-top: 4px; }
.social-row a {
  width: 34px; height: 34px;
  border: 2px solid var(--lime);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  color: var(--lime);
  font-size: 13px;
  transition: background 0.12s ease, color 0.12s ease;
}
.social-row a:hover { background: var(--lime); color: var(--black-panel); }

/* ---------------- generic content sections ---------------- */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.info-card {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.info-card h4 { margin: 0; font-family: var(--font-display); font-size: 15px; text-transform: uppercase; }
.info-card p { margin: 0; font-size: 12px; line-height: 1.7; color: var(--ink); }

.link-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.link-card {
  background: var(--panel);
  border: 2px solid var(--line);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.link-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.link-card .link-icon { font-size: 20px; }
.link-card .link-name { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; }
.link-card .link-desc { font-size: 11px; color: var(--muted); }

.disclaimer {
  font-size: 10.5px;
  color: var(--muted);
  border-left: 3px solid var(--red);
  padding: 8px 12px;
  background: var(--bg-soft);
}

/* pending / not-yet-live data */
.pending-value {
  color: var(--muted);
  letter-spacing: 0.08em;
  animation: blink 1.3s steps(2) infinite;
}
.wallet-mini.is-pending { cursor: default; }
.wallet-mini.is-pending:hover { background: var(--panel); transform: none; box-shadow: var(--shadow-sm); }
.ticker-live.pending .dot { background: var(--muted); box-shadow: none; animation: none; }

/* ---------------- ticker bar + footer ---------------- */
.ticker-bar {
  background: var(--black-panel);
  color: var(--lime);
  border-top: 2px solid var(--line);
  margin-top: 30px;
  position: relative;
  z-index: 1;
}
.ticker-inner {
  max-width: 1480px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 11.5px;
}
.ticker-live { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.ticker-live .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ecf5e; box-shadow: 0 0 8px #3ecf5e; animation: blink 1.2s steps(2) infinite; }
.ticker-sep { color: #45463c; }
.ticker-inner .chain-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #3ecf5e;
}
.ticker-inner .k { color: #8f9184; }

.site-footer {
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px 24px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.footer-hints { display: flex; gap: 8px; }
.footer-hints span {
  border: 1px solid var(--line);
  padding: 4px 8px;
  font-size: 9.5px;
  color: var(--ink);
}

/* ---------------- glitch text ---------------- */
.glitch { position: relative; display: inline-block; }
.glitch.glitching::before,
.glitch.glitching::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 0);
}
.glitch.glitching::before {
  color: var(--lime);
  animation: glitch-a 0.35s steps(2) 1;
  transform: translate(2px, 0);
  mix-blend-mode: multiply;
}
.glitch.glitching::after {
  color: var(--red);
  animation: glitch-b 0.35s steps(2) 1;
  transform: translate(-2px, 0);
  mix-blend-mode: multiply;
}
@keyframes glitch-a {
  0% { clip-path: inset(0 0 80% 0); }
  30% { clip-path: inset(10% 0 60% 0); }
  60% { clip-path: inset(70% 0 5% 0); }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}
@keyframes glitch-b {
  0% { clip-path: inset(60% 0 10% 0); }
  30% { clip-path: inset(5% 0 70% 0); }
  60% { clip-path: inset(30% 0 40% 0); }
  100% { clip-path: inset(0 0 0 0); opacity: 0; }
}

/* ---------------- reveal on scroll ---------------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---------------- responsive ---------------- */
@media (max-width: 1180px) {
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
  .dash-row { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .link-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: relative;
    top: 0;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
  }
  .sidebar-actions { flex-direction: row; flex-wrap: wrap; }
  .sidebar-actions .btn { flex: 1 1 120px; }
  .nav-list { flex-direction: row; flex-wrap: wrap; }
  .nav-item a { padding: 7px 9px; }
  .sidebar-spacer { display: none; }
  .nav-hint { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; min-height: 260px; }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 40px; }
  .site-footer { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
