/* Anime Zero Codes — site styles
   Dark gaming palette. Single accent (violet) + semantic green/amber/red. */

:root {
  --bg: #0b0d17;
  --bg-soft: #10131f;
  --surface: #141829;
  --surface-2: #1a1f34;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #e9ebf5;
  --text-2: #9aa1bd;
  --text-3: #6d7490;

  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-line: rgba(139, 92, 246, 0.45);

  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(248, 113, 113, 0.1);

  --radius: 14px;
  --radius-sm: 9px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; max-width: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: clip;
  max-width: 100%;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(760px 380px at 50% -160px, rgba(139, 92, 246, 0.18), transparent 70%);
  background-repeat: no-repeat;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: #d8c9ff;
  white-space: nowrap;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 5.2vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.25rem, 3.2vw, 1.65rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 10px 16px; z-index: 99;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 13, 23, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 62px; }

.brand { flex: none; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px; flex: none;
  background: linear-gradient(150deg, #a78bfa, #6d28d9);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 6px 18px rgba(139, 92, 246, 0.4);
}
.brand-text { font-size: 15px; white-space: nowrap; }
.brand-text b { color: #c4b5fd; }

.nav { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  font-size: 13.5px; color: var(--text-2); padding: 7px 11px; border-radius: 8px; white-space: nowrap;
}
.nav a:hover { color: var(--text); background: var(--surface); text-decoration: none; }
.nav a[aria-current="page"] { color: #ddd6fe; background: var(--accent-soft); }

/* ---------- hero ---------- */

.hero { padding: 44px 0 8px; }
.hero .wrap { display: grid; gap: 26px; }
.hero-top { display: grid; gap: 14px; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: #b39dff; margin: 0;
}
.lede { font-size: 1.06rem; color: var(--text-2); max-width: 62ch; margin: 0; }

.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  font-size: 12.5px; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px;
}
.pill-live { color: #86efac; border-color: rgba(52, 211, 153, 0.3); background: var(--ok-soft); }
.pill-live::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); margin-right: 7px; vertical-align: middle;
}

/* ---------- quick answer ---------- */

.answer {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.03));
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.answer-title {
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: #c4b5fd; margin: 0 0 12px;
}
.answer-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.answer-list li { margin: 0; font-size: 14.5px; color: var(--text-2); }
.answer-list b { color: var(--text); }

/* ---------- stats ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-num { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.03em; }
.stat-label { font-size: 12.5px; color: var(--text-3); margin: 4px 0 0; }

/* ---------- sections ---------- */

.section { padding: 40px 0 0; }
.section-head { margin-bottom: 18px; }
.section-sub { color: var(--text-2); font-size: 14.5px; margin: 8px 0 0; max-width: 70ch; }
.page-head { padding-top: 40px; }
.page-head h1 { margin-bottom: 14px; }
.page-head .hero-meta { margin-top: 16px; }

.crumbs { font-size: 13px; color: var(--text-3); margin-bottom: 14px; display: flex; gap: 8px; }
.crumbs a { color: var(--text-3); }
.crumbs a:hover { color: var(--text); }

.fineprint { font-size: 13.5px; color: var(--text-3); margin-top: 16px; }
.fineprint a { color: #b39dff; }

/* ---------- toolbar ---------- */

.toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px; margin-bottom: 16px;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
  position: sticky; top: 62px; z-index: 10;
}
#q {
  flex: 1 1 190px; min-width: 0;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 9px 13px; font-size: 14px; font-family: inherit;
}
#q::placeholder { color: var(--text-3); }
#q:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.toggle {
  font: inherit; font-size: 13px; cursor: pointer;
  color: var(--text-2); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 13px; white-space: nowrap;
}
.toggle:hover { color: var(--text); border-color: var(--line-strong); }
.toggle[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- code list ---------- */

.code-list { display: grid; gap: 10px; }

.code-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: grid; gap: 10px;
}
.code-card:hover { border-color: var(--line-strong); }
.code-card.is-hidden { display: none; }

.code-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.code-line { display: flex; align-items: center; gap: 10px; min-width: 0; }
.code {
  font-size: 1.02rem; font-weight: 700; letter-spacing: 0.01em;
  background: transparent; border: 0; padding: 0; min-width: 0;
  color: #ede9fe; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.copy {
  font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: #ddd6fe; background: var(--accent-soft);
  border: 1px solid var(--accent-line); border-radius: var(--radius-sm);
  padding: 6px 14px; flex: none;
  transition: background 0.12s ease, color 0.12s ease;
}
.copy:hover { background: var(--accent); color: #fff; }
.copy.is-done { background: var(--ok); border-color: var(--ok); color: #05261a; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge {
  font-size: 11.5px; font-weight: 600; letter-spacing: 0.01em;
  border-radius: 999px; padding: 3px 10px; border: 1px solid transparent; white-space: nowrap;
}
.badge-free { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, 0.28); }
.badge-gate { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.3); }
.badge-ok { color: var(--ok); background: transparent; border-color: rgba(52, 211, 153, 0.28); }
.badge-todo { color: var(--text-3); background: transparent; border-color: var(--line-strong); }
.badge-new { color: #c4b5fd; background: var(--accent-soft); border-color: var(--accent-line); }
.badge-warn { color: var(--danger); background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.3); }

.code-rewards { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  font-size: 13px; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 4px 11px;
}
.chip b { color: var(--text); font-weight: 700; }
.chip-lg { border-color: rgba(139, 92, 246, 0.35); background: var(--accent-soft); }
.chip-lg b { color: #ddd6fe; }
.chip-empty { color: var(--text-3); font-style: italic; }

.code-note { font-size: 13.5px; color: var(--text-2); margin: 0; }
.code-disputed {
  font-size: 13px; color: var(--danger); margin: 0;
  padding-left: 12px; border-left: 2px solid rgba(248, 113, 113, 0.4);
}
.code-seen { font-size: 12px; color: var(--text-3); margin: 0; }

.empty { color: var(--text-3); text-align: center; padding: 28px 0; }

/* ---------- callouts ---------- */

.callout { border-radius: var(--radius); padding: 18px 20px; margin-top: 22px; border: 1px solid var(--line); }
.callout p:last-child { margin-bottom: 0; }
.callout-title { font-weight: 700; margin: 0 0 6px; font-size: 14px; }
.callout-warn { background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.28); }
.callout-warn .callout-title { color: #fca5a5; }
.callout-info { background: var(--surface); }
.callout-info .callout-title { color: #c4b5fd; }

/* ---------- expired ---------- */

.expired-list { display: grid; gap: 8px; }
.expired-row {
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 16px;
}
.expired-row code { color: var(--text-3); text-decoration: line-through; }
.expired-row span { font-size: 13.5px; color: var(--text-3); }

/* ---------- steps / reasons ---------- */

.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li {
  counter-increment: s;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 18px 15px 58px; position: relative; margin: 0; font-size: 14.5px; color: var(--text-2);
}
.steps li b { color: var(--text); }
.steps li::before {
  content: counter(s);
  position: absolute; left: 16px; top: 14px;
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--accent-soft); border: 1px solid var(--accent-line);
  color: #c4b5fd; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.reasons { display: grid; gap: 10px; }
.reason {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 18px;
  border-left: 3px solid var(--accent);
}
.reason p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.reason-num { display: none; }
.reason-title { font-weight: 700 !important; color: var(--text) !important; margin-bottom: 6px !important; font-size: 15px !important; }

/* ---------- info cards ---------- */

.cards-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.info-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px;
}
.info-card p:last-child { margin-bottom: 0; }
.info-card p { font-size: 14.5px; color: var(--text-2); }
.info-title { font-weight: 700 !important; color: var(--text) !important; margin-bottom: 8px !important; font-size: 15px !important; }

/* ---------- table ---------- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); font-weight: 600; background: var(--bg-soft); }
.table tr:last-child td { border-bottom: 0; }
.table td { color: var(--text-2); }
.table td b { color: var(--text); }

/* ---------- FAQ ---------- */

.faq { display: grid; gap: 8px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.faq summary {
  cursor: pointer; padding: 15px 18px; font-weight: 600; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: #b39dff; font-size: 20px; font-weight: 400; line-height: 1; flex: none; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary:hover { color: #fff; }
.faq-body { padding: 0 18px 16px; }
.faq-body p { margin: 0; font-size: 14.5px; color: var(--text-2); }

/* ---------- buttons ---------- */

.btn {
  display: inline-block; font-size: 14.5px; font-weight: 600;
  background: var(--accent); color: #fff; border-radius: var(--radius-sm); padding: 11px 20px;
}
.btn:hover { background: #7c4ded; color: #fff; text-decoration: none; }

/* ---------- footer ---------- */

.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--bg-soft); }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; padding: 36px 0 44px;
}
.footer-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-3); font-weight: 700; margin: 0 0 10px; }
.footer-note { font-size: 13px; color: var(--text-3); margin: 0; line-height: 1.7; }
.footer-note b { color: var(--text-2); }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer-links a { font-size: 13.5px; color: var(--text-2); }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .toolbar { position: static; }
  .code-main { flex-direction: column; align-items: stretch; }
  .code-line { justify-content: space-between; }
  .hero { padding-top: 32px; }
  .section { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
