@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Syne:wght@400;600;700;800&display=swap');

:root {
  --bg:       #080b10;
  --bg2:      #0d1117;
  --bg3:      #111827;
  --border:   #1e2d40;
  --accent:   #00e5ff;
  --accent2:  #7c3aed;
  --green:    #00ff88;
  --red:      #ff3b6b;
  --yellow:   #ffd60a;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --card-bg:  #0d1520;
  --radius:   12px;
  --glow:     0 0 20px rgba(0,229,255,.18);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed; 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.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4;
}

/* ── Grid bg ── */
body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,229,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,229,255,.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8,11,16,.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}

.nav-brand {
  font-family: 'Space Mono', monospace;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  letter-spacing: -1px;
  display: flex; align-items: center; gap: .5rem;
}

.nav-brand span { color: var(--text); }

.nav-links { display: flex; align-items: center; gap: 1rem; }

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-points {
  background: linear-gradient(135deg, rgba(0,229,255,.1), rgba(124,58,237,.1));
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-family: 'Space Mono', monospace;
  font-size: .8rem;
  color: var(--accent);
  display: flex; align-items: center; gap: .4rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  border: none;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .5px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  position: relative;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 20px rgba(0,229,255,.3);
}
.btn-primary:hover {
  box-shadow: 0 0 35px rgba(0,229,255,.5);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-outline:hover {
  background: rgba(0,229,255,.08);
}

.btn-purple {
  background: var(--accent2);
  color: #fff;
  box-shadow: 0 0 20px rgba(124,58,237,.3);
}
.btn-purple:hover { box-shadow: 0 0 35px rgba(124,58,237,.5); transform: translateY(-1px); }

.btn-sm { padding: .4rem .9rem; font-size: .78rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-danger { background: var(--red); color: #fff; }
.btn-success { background: var(--green); color: #000; }

/* ── Cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  position: relative;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover {
  border-color: rgba(0,229,255,.25);
  box-shadow: var(--glow);
}

.card-header {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .75rem;
}

/* ── Forms ── */
.form-group { margin-bottom: 1.2rem; }
.form-label {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .4rem;
}

.form-control {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .7rem 1rem;
  color: var(--text);
  font-family: 'Syne', sans-serif;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,229,255,.1);
}

/* ── Alerts ── */
.alert {
  padding: .75rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .5rem;
}
.alert-success { background: rgba(0,255,136,.1); border: 1px solid rgba(0,255,136,.3); color: var(--green); }
.alert-error   { background: rgba(255,59,107,.1); border: 1px solid rgba(255,59,107,.3); color: var(--red); }
.alert-info    { background: rgba(0,229,255,.1);  border: 1px solid rgba(0,229,255,.3);  color: var(--accent); }
.alert-warn    { background: rgba(255,214,10,.1); border: 1px solid rgba(255,214,10,.3); color: var(--yellow); }

/* ── Badge ── */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .5px;
}
.badge-green  { background: rgba(0,255,136,.15); color: var(--green); }
.badge-red    { background: rgba(255,59,107,.15); color: var(--red); }
.badge-blue   { background: rgba(0,229,255,.15);  color: var(--accent); }
.badge-yellow { background: rgba(255,214,10,.15); color: var(--yellow); }

/* ── Stat box ── */
.stat-box {
  text-align: center;
  padding: 1.5rem 1rem;
}
.stat-value {
  font-family: 'Space Mono', monospace;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .25rem;
}
.stat-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Profile card ── */
.profile-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: .75rem;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.profile-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  opacity: 0;
  transition: opacity .25s;
}
.profile-card:hover {
  border-color: rgba(0,229,255,.3);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.profile-card:hover::before { opacity: 1; }

.profile-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
  flex-shrink: 0;
}

.profile-info { flex: 1; min-width: 0; }
.profile-name {
  font-weight: 700; font-size: .95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-handle {
  font-size: .78rem; color: var(--muted);
  font-family: 'Space Mono', monospace;
}

/* ── Grid layouts ── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.profiles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }

/* ── Page wrapper ── */
.page-wrap {
  position: relative; z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* ── Page header ── */
.page-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: .25rem;
}
.page-subtitle {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 2rem;
}

/* ── Tabs ── */
.tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; }
.tab {
  padding: .6rem 1.2rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  border: none; background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .2s;
  text-decoration: none;
}
.tab.active, .tab:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Countdown timer ── */
.countdown-badge {
  font-family: 'Space Mono', monospace;
  font-size: .75rem;
  color: var(--yellow);
  background: rgba(255,214,10,.1);
  border: 1px solid rgba(255,214,10,.2);
  border-radius: 999px;
  padding: .2rem .6rem;
  display: inline-block;
}

/* ── Progress bar ── */
.progress {
  height: 6px; background: var(--bg3);
  border-radius: 99px; overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  transition: width .5s ease;
}

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; }
th {
  font-size: .7rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--muted);
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
td { padding: .75rem 1rem; border-bottom: 1px solid rgba(30,45,64,.5); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,229,255,.02); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  width: 90%; max-width: 440px;
  transform: translateY(20px) scale(.97);
  transition: transform .25s;
}
.modal-backdrop.open .modal { transform: none; }

/* ── Utility ── */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--muted); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-yellow  { color: var(--yellow); }
.text-center  { text-align: center; }
.mono         { font-family: 'Space Mono', monospace; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.fw-700 { font-weight: 700; }
.fs-sm { font-size: .82rem; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }

/* ── Glow dot indicator ── */
.dot-live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s infinite;
  display: inline-block;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .4; }
}

/* ── Limit bar ── */
.limit-info {
  font-size: .75rem; color: var(--muted);
  font-family: 'Space Mono', monospace;
}

/* ── Landing page ── */
.hero {
  min-height: 80vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(0,229,255,.08);
  border: 1px solid rgba(0,229,255,.2);
  border-radius: 999px;
  padding: .3rem 1rem;
  margin-bottom: 1.5rem;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 500px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  position: relative; z-index: 1;
}

.feature-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: .75rem;
}

/* ── Auth page ── */
.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  position: relative; z-index: 1;
}

.auth-card {
  width: 100%; max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
}

.auth-logo {
  font-family: 'Space Mono', monospace;
  font-size: 1.4rem; font-weight: 700;
  color: var(--accent);
  text-align: center;
  margin-bottom: 1.5rem;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar { padding: 0 1rem; }
  .page-wrap { padding: 1.5rem 1rem; }
  .nav-links { gap: .6rem; }
  .nav-links .hide-mobile { display: none; }
}
