:root {
  --bg: #0b0e1a;
  --bg-2: #10152a;
  --panel: #171c33;
  --panel-2: #1d2440;
  --line: #2a3357;
  --text: #eef1fb;
  --muted: #9aa3c4;
  --accent: #ffb454;
  --accent-2: #6c8cff;
  --good: #46e08a;
  --bad: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(0,0,0,.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Rubik', system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 80% -10%, #1b2350 0%, transparent 60%),
              radial-gradient(1000px 600px at -10% 60%, #2a1736 0%, transparent 55%),
              var(--bg);
  line-height: 1.6;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Background layers */
.bg, .bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
.bg-glow::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(2px 2px at 20% 30%, #ffffff33, transparent),
    radial-gradient(2px 2px at 70% 60%, #ffffff2e, transparent),
    radial-gradient(2px 2px at 40% 80%, #ffffff33, transparent),
    radial-gradient(1px 1px at 90% 20%, #ffffff44, transparent),
    radial-gradient(1px 1px at 10% 90%, #ffffff44, transparent);
}

/* Navbar */
.navbar { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px);
  background: rgba(13,17,32,.7); border-bottom: 1px solid var(--line); }
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center;
  justify-content: space-between; padding: 14px 24px; }
.brand { font-weight: 800; font-size: 1.3rem; }
.brand span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--muted); font-weight: 600; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.active { color: var(--accent); position: relative; }
.nav-links a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--accent); border-radius: 2px; }

/* Buttons */
.btn { display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 700;
  border: 2px solid transparent; cursor: pointer; font-size: 1rem; transition: .18s; }
.btn-cta { background: var(--accent); color: #14101f; }
.btn-cta:hover { background: #ffc46e; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #14101f; border-color: var(--accent); }
.btn-primary:hover { background: #ffc46e; transform: translateY(-2px); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent-2); }
.btn-block { width: 100%; }

/* Hero */
.hero { max-width: 1100px; margin: 0 auto; padding: 110px 24px 80px; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.2rem); line-height: 1.05; margin: 0 0 18px; }
.hero .accent { color: var(--accent); }
.tagline { color: var(--muted); font-size: 1.25rem; max-width: 640px; margin: 0 0 32px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.status-line { margin-top: 34px; color: var(--muted); font-weight: 600; display: flex;
  align-items: center; gap: 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
.dot.on { background: var(--good); box-shadow: 0 0 12px var(--good); }

/* Sections */
.section { padding: 70px 24px; }
.section-alt { background: rgba(255,255,255,.02); border-block: 1px solid var(--line); }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section h2 { font-size: 2.2rem; margin: 0 0 14px; }
.section > .section-inner > p { color: var(--muted); max-width: 720px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin-top: 30px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); margin: 0; }

/* Steps */
.steps { padding-left: 20px; color: var(--text); display: grid; gap: 10px; max-width: 760px; }
code { background: var(--panel-2); padding: 3px 10px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--accent); font-family: 'Consolas', monospace; }
.note { color: var(--muted); }

/* Auth */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; }
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 40px 24px; }
.auth-wrap > form { width: 100%; max-width: 420px; background: var(--panel);
  border: 1px solid var(--line); padding: 30px; border-radius: var(--radius);
  box-shadow: var(--shadow); }
.auth-sub { color: var(--muted); margin-top: -6px; }
.auth-wrap label { display: block; margin: 14px 0 6px; font-weight: 600; }
.auth-wrap label em { color: var(--muted); font-weight: 400; font-size: .85rem; }
.auth-wrap input { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; }
.auth-wrap input:focus { outline: none; border-color: var(--accent-2); }
.auth-wrap small { color: var(--muted); display: block; margin-top: 4px; }
.form-status { padding: 10px 14px; border-radius: 10px; margin: 16px 0 4px; font-weight: 600; }
.form-status.ok { background: rgba(70,224,138,.14); color: var(--good); border: 1px solid var(--good); }
.form-status.err { background: rgba(255,107,107,.14); color: var(--bad); border: 1px solid var(--bad); }
.form-status.info { background: rgba(108,140,255,.14); color: var(--accent-2); border: 1px solid var(--accent-2); }
.auth-foot { color: var(--muted); text-align: center; margin-top: 18px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 30px 24px; margin-top: 60px; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px; }
.footer .tiny { color: var(--muted); font-size: .85rem; }

/* NPC drop database */
.search-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
#npc-search { flex: 1; min-width: 260px; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; }
#npc-search:focus { outline: none; border-color: var(--accent-2); }
.npc-count { color: var(--muted); white-space: nowrap; }
.npc-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.npc-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); }
.npc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.npc-name { font-weight: 800; font-size: 1.05rem; }
.npc-id { color: var(--muted); font-size: .8rem; }
.npc-drops { display: flex; flex-direction: column; gap: 6px; }
.drop { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 6px 10px; background: var(--panel-2); border-radius: 8px; font-size: .9rem; }
.drop-name { font-weight: 600; }
.drop-range { color: var(--muted); font-size: .82rem; }
.drop-rate { color: var(--accent); font-weight: 700; font-size: .85rem; white-space: nowrap; }
.empty { color: var(--muted); text-align: center; padding: 24px; }

@media (max-width: 640px) {
  .nav-links a { font-size: .9rem; }
  .nav-links li:nth-child(2), .nav-links li:nth-child(3) { display: none; }
  .hero { padding-top: 70px; }
}