@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=DM+Mono:wght@300;400;500&family=Outfit:wght@300;400;500&display=swap');

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

:root {
  --bg-0: #090b0f;
  --bg-1: #0e1118;
  --bg-2: #141720;
  --bg-3: #1c2030;
  --bg-4: #242840;
  --border: rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.13);
  --accent: #c8f03e;
  --accent-dim: rgba(200,240,62,0.12);
  --accent-dim2: rgba(200,240,62,0.06);
  --text-1: #f0f2f8;
  --text-2: #8a8fa8;
  --text-3: #4e5368;
  --red: #f04f4f;
  --green: #3ecf8e;
  --red-dim: rgba(240,79,79,0.1);
  --green-dim: rgba(62,207,142,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Typography ─── */
.font-display { font-family: 'Bricolage Grotesque', sans-serif; }
.font-mono { font-family: 'DM Mono', monospace; }

h1,h2,h3,h4,h5 { font-family: 'Bricolage Grotesque', sans-serif; }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 2px; }

/* ─── Nav ─── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2.5rem;
  height: 64px;
  background: rgba(9,11,15,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--text-1);
  text-decoration: none;
  display: flex; align-items: center; gap: 8px;
}

.nav-logo .dot { color: var(--accent); }

.nav-links {
  display: flex; align-items: center; gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.85rem;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
  letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--text-1); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-2);
  color: var(--text-1);
  border-color: var(--border-bright);
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-0);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #d8ff4a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(200,240,62,0.25);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: rgba(200,240,62,0.3);
}
.btn-outline:hover {
  background: var(--accent-dim);
  border-color: rgba(200,240,62,0.6);
}

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(240,79,79,0.2);
}
.btn-danger:hover { background: rgba(240,79,79,0.18); }

.btn-sm { padding: 0.4rem 1rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ─── Forms ─── */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: 'Bricolage Grotesque', sans-serif;
}

.form-input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: 'DM Mono', monospace;
  font-size: 0.9rem;
  color: var(--text-1);
  transition: all 0.2s;
  outline: none;
  width: 100%;
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus {
  border-color: rgba(200,240,62,0.4);
  background: var(--bg-3);
  box-shadow: 0 0 0 3px rgba(200,240,62,0.08);
}
.form-input.error { border-color: rgba(240,79,79,0.4); }

.form-hint { font-size: 0.78rem; color: var(--text-3); }
.form-error { font-size: 0.78rem; color: var(--red); display: none; }
.form-error.visible { display: block; }

/* ─── Cards ─── */
.card {
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.card-dark {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* ─── Badge ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.badge-accent {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid rgba(200,240,62,0.2);
}
.badge-green {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(62,207,142,0.2);
}
.badge-red {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(240,79,79,0.2);
}
.badge-gray {
  background: rgba(255,255,255,0.05);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* ─── Tag accent line ─── */
.tag-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.tag-label::before {
  content: '';
  width: 18px; height: 1px;
  background: var(--accent);
  display: inline-block;
}

/* ─── Section ─── */
.section { padding: 6rem 2.5rem; }
.section-sm { padding: 4rem 2.5rem; }
.container { max-width: 1100px; margin: 0 auto; }
.container-sm { max-width: 760px; margin: 0 auto; }
.container-xs { max-width: 480px; margin: 0 auto; }

/* ─── Grid noise overlay ─── */
.noise-bg {
  position: relative;
  overflow: hidden;
}
.noise-bg::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  opacity: 0.5;
  z-index: 0;
}

/* ─── Divider ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 1.5rem 0;
}

/* ─── Alert ─── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  display: flex; align-items: flex-start; gap: 8px;
  margin-bottom: 1rem;
}
.alert-error { background: var(--red-dim); color: var(--red); border: 1px solid rgba(240,79,79,0.2); }
.alert-success { background: var(--green-dim); color: var(--green); border: 1px solid rgba(62,207,142,0.2); }
.alert-info { background: var(--accent-dim2); color: var(--accent); border: 1px solid rgba(200,240,62,0.15); }

/* ─── Glow line ─── */
.glow-line {
  width: 60px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 12px rgba(200,240,62,0.5);
}

/* ─── Stat ─── */
.stat-value {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  color: var(--text-1);
  line-height: 1;
}
.stat-label {
  font-size: 0.78rem;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 4px;
}

/* ─── Spinner ─── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(9,11,15,0.3);
  border-top-color: var(--bg-0);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Animations ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim-fade-up { animation: fadeUp 0.6s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ─── Ticker strip ─── */
.ticker-wrap {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-1);
  padding: 0.5rem 0;
}
.ticker-inner {
  display: flex; gap: 2.5rem;
  animation: ticker 30s linear infinite;
  width: max-content;
}
.ticker-item {
  display: flex; align-items: center; gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  color: var(--text-2);
  white-space: nowrap;
}
.ticker-item .sym { color: var(--text-1); font-weight: 500; }
.ticker-item .up { color: var(--green); }
.ticker-item .dn { color: var(--red); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  font-size: 0.875rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ─── Modal ─── */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  align-items: center; justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
  background: var(--bg-1);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  animation: fadeUp 0.25s ease both;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.5rem;
}
.modal-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
}
.modal-close {
  width: 30px; height: 30px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  font-size: 1.1rem;
  transition: all 0.2s;
}
.modal-close:hover { background: var(--bg-4); color: var(--text-1); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nav { padding: 0 1.25rem; }
  .nav-links { display: none; }
  .section { padding: 4rem 1.25rem; }
  .section-sm { padding: 3rem 1.25rem; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-fade-in { animation: fadeIn 0.8s ease-out; }
.btn-premium { background: var(--accent); color: white; padding: 10px 20px; border-radius: 8px; cursor: pointer; border: none; }