:root {
  --bg: #0a0b0f;
  --bg-2: #101218;
  --surface: #14161d;
  --surface-2: #1b1e27;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f3f5f8;
  --text-dim: #9aa1b0;
  --text-faint: #666d7d;
  --accent: #3b82f6;
  --accent-2: #06b6d4;
  --accent-3: #22d3ee;
  --danger: #ef4444;
  --ok: #22c55e;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px -16px rgba(0, 0, 0, 0.7);
  --shadow-sm: 0 2px 10px -4px rgba(0, 0, 0, 0.5);
  --glow: 0 0 30px -10px var(--accent);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ------------------------------------------------------ animated backdrop */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(59, 130, 246, 0.10), transparent 45%),
    radial-gradient(circle at 85% 15%, rgba(6, 182, 212, 0.08), transparent 45%),
    var(--bg);
}

.backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%);
}

.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  z-index: -1;
  animation: float 28s ease-in-out infinite;
  pointer-events: none;
}
.blob.b1 { width: 380px; height: 380px; background: var(--accent); top: -80px; left: -60px; }
.blob.b2 { width: 320px; height: 320px; background: var(--accent-2); bottom: -60px; right: -40px; animation-delay: -9s; }
.blob.b3 { width: 260px; height: 260px; background: var(--accent-3); top: 40%; left: 55%; animation-delay: -17s; opacity: 0.14; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.1); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}

/* --------------------------------------------------------------- topbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 6vw;
  backdrop-filter: blur(14px);
  background: rgba(10, 11, 15, 0.72);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.logo .dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: var(--glow);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
}
.logo b { background: linear-gradient(135deg, #fff, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a { color: var(--text-dim); font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
  white-space: nowrap;
  color: var(--text);
  background: transparent;
}
.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: #4f8ff7; transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(59, 130, 246, 0.55); }

.btn-ghost {
  border-color: var(--border-strong);
  background: var(--surface);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--accent); }

.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }

/* ------------------------------------------------------------------ hero */
.hero {
  text-align: center;
  padding: 90px 6vw 60px;
  max-width: 900px;
  margin: 0 auto;
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.badge-pill .live {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--accent), var(--accent-3), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: clamp(1rem, 2.4vw, 1.25rem);
  color: var(--text-dim);
  max-width: 620px;
  margin: 0 auto 36px;
}

/* claim box */
.claim {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto 18px;
  padding: 7px 7px 7px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.claim:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15); }
.claim .prefix { color: var(--text-faint); font-weight: 600; }
.claim input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  min-width: 0;
}
.claim input::placeholder { color: var(--text-faint); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 44px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero-stats .stat b {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-stats .stat span { color: var(--text-faint); font-size: 0.9rem; }

/* --------------------------------------------------------------- sections */
.section {
  padding: 70px 6vw;
  max-width: 1200px;
  margin: 0 auto;
}
.section-head { text-align: center; margin-bottom: 50px; }
.section-head h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.section-head p { color: var(--text-dim); max-width: 560px; margin: 0 auto; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature {
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--surface-2); box-shadow: var(--shadow); }
.feature .ico {
  width: 48px; height: 48px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid var(--border);
}
.feature h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature p { color: var(--text-dim); font-size: 0.95rem; }

/* CTA band */
.cta {
  margin: 40px 6vw 90px;
  max-width: 1000px;
  margin-inline: auto;
  text-align: center;
  padding: 60px 30px;
  border-radius: 24px;
  border: 1px solid var(--border-strong);
  background:
    radial-gradient(circle at 50% 0%, rgba(59,130,246,0.2), transparent 60%),
    var(--surface);
}
.cta h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: 14px; }
.cta p { color: var(--text-dim); margin-bottom: 28px; }

/* footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--text-faint);
  font-size: 0.9rem;
}
.footer .foot-links { display: flex; gap: 22px; }
.footer .foot-links a:hover { color: var(--text); }

/* toast */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  animation: toastIn 0.3s ease;
  max-width: 90vw;
}
.toast.err { border-color: rgba(239, 68, 68, 0.5); }
.toast.ok { border-color: rgba(34, 197, 94, 0.5); }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 720px) {
  .nav-links { display: none; }
  .hero-stats { gap: 28px; }
  .dir-scroll { max-height: 320px; }
}

/* --------------------------------------------------------------- directory */
.dir-panel {
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.dir-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}
.dir-bar .dir-ico { color: var(--text-faint); flex: none; }
.dir-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  min-width: 0;
}
.dir-bar input::placeholder { color: var(--text-faint); }
.dir-count { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; }

.dir-scroll {
  max-height: 380px;
  overflow-y: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}
.dir-scroll::-webkit-scrollbar { width: 10px; }
.dir-scroll::-webkit-scrollbar-track { background: transparent; }
.dir-scroll::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--accent), var(--accent-2));
  border-radius: 999px;
  border: 2px solid var(--bg);
}
.dir-scroll::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.dir-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
  min-width: 0;
}
.dir-card:hover { transform: translateY(-2px); border-color: var(--accent); background: var(--surface-2); }
.dir-av {
  width: 40px; height: 40px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: 0.95rem; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  overflow: hidden;
}
.dir-av img { width: 100%; height: 100%; object-fit: cover; }
.dir-meta { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.dir-name { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-user { color: var(--text-faint); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dir-views { margin-left: auto; color: var(--text-faint); font-size: 0.8rem; white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 10px; }
.dir-stat { display: inline-flex; align-items: center; gap: 4px; }
.dir-views svg { width: 14px; height: 14px; }
.dir-empty { grid-column: 1 / -1; text-align: center; color: var(--text-faint); padding: 40px 20px; font-size: 0.95rem; }

/* ------------------------------------------------------------------ motion */
@keyframes floatUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hero entrance — staggered, plays once on load. */
.hero > * { animation: floatUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) both; }
.hero .badge-pill   { animation-delay: 0.05s; }
.hero h1            { animation-delay: 0.12s; }
.hero p.sub         { animation-delay: 0.20s; }
.hero .claim        { animation-delay: 0.28s; }
.hero > p:not(.sub) { animation-delay: 0.34s; }
.hero .hero-stats   { animation-delay: 0.42s; }

/* Scroll reveal — the hidden state is only applied by JS to off-screen items. */
.reveal { opacity: 0; transform: translateY(20px); }
.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Icon tile lifts slightly with its card. */
.feature .ico { transition: transform 0.25s ease; }
.feature:hover .ico { transform: scale(1.06); }

@media (prefers-reduced-motion: reduce) {
  .hero > *, .blob { animation: none !important; }
  .reveal, .reveal.in { opacity: 1 !important; transform: none !important; transition: none !important; }
  .feature:hover .ico { transform: none; }
}

/* ---------------------------------------------------------------- icons */
/* Injected inline SVGs (data-icon) scale to the element's font-size. */
[data-icon] svg { width: 1em; height: 1em; display: block; }
.feature .ico { color: var(--accent); }
.feature .ico[data-icon] svg { width: 26px; height: 26px; }
.feature .ico.step { font-weight: 800; font-size: 1.35rem; }
.btn-ico { display: inline-flex; align-items: center; }
.btn-ico svg { width: 18px; height: 18px; }
