/* 航海王正版观看指引与作品资料站 — 本地样式，无外部依赖 */

:root {
  --deep: #07121f;
  --deep-2: #0c1d31;
  --card: #112a44;
  --card-2: #16344f;
  --line: #22496c;
  --ink: #e9f1fa;
  --ink-dim: #a8bed4;
  --ink-faint: #7b93ab;
  --gold: #efb949;
  --gold-soft: #f6d79a;
  --sea: #4fc9d9;
  --coral: #ef7a62;
  --ok: #58c98a;
  --radius: 14px;
  --maxw: 1080px;
  --font: "PingFang SC", "Hiragino Sans GB", "Heiti SC", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79, 201, 217, .10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(239, 185, 73, .08), transparent 55%),
    var(--deep);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; }

a { color: var(--sea); }
a:hover { color: var(--gold); }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--gold);
  color: #1a1206;
  padding: 10px 16px;
  z-index: 50;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

/* ---------- 顶栏 ---------- */

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(7, 18, 31, .88);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
}

.topbar .wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
  padding-bottom: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: .02em;
}
.brand .mark { width: 30px; height: 30px; flex: 0 0 30px; }
.brand b { font-size: 1.02rem; }
.brand span {
  font-size: .72rem;
  color: var(--ink-faint);
  font-weight: 400;
  letter-spacing: .08em;
}

nav.main {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
nav.main ul {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0 0 3px;
  white-space: nowrap;
}
nav.main a {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: .9rem;
  border: 1px solid transparent;
}
nav.main a:hover { background: var(--card); color: var(--ink); }
nav.main a[aria-current="page"] {
  color: var(--gold);
  border-color: rgba(239, 185, 73, .45);
  background: rgba(239, 185, 73, .10);
}

@media (min-width: 760px) {
  .topbar .wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  nav.main ul { padding-bottom: 0; }
}

/* ---------- 通用版块 ---------- */

main { display: block; }

section { padding: 34px 0; }
section + section { border-top: 1px solid rgba(34, 73, 108, .5); }

h1 {
  font-size: clamp(1.5rem, 5.2vw, 2.4rem);
  line-height: 1.3;
  margin: 0 0 12px;
  letter-spacing: .01em;
}
h2 {
  font-size: clamp(1.18rem, 3.4vw, 1.5rem);
  line-height: 1.4;
  margin: 0 0 14px;
}
h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
}

.lede {
  color: var(--ink-dim);
  font-size: 1.02rem;
  margin: 0 0 18px;
}

.eyebrow {
  display: inline-block;
  font-size: .74rem;
  letter-spacing: .16em;
  color: var(--gold);
  text-transform: uppercase;
  margin: 0 0 10px;
}

.muted { color: var(--ink-faint); font-size: .88rem; }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  padding: 44px 0 38px;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 26px;
  align-items: center;
}
@media (min-width: 880px) {
  .hero-grid { grid-template-columns: 1.25fr .75fr; }
}
.hero-art {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
  pointer-events: none;
}

.notice {
  border: 1px solid rgba(239, 185, 73, .4);
  background: rgba(239, 185, 73, .08);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--gold-soft);
  font-size: .92rem;
}
.notice strong { color: var(--gold); }

/* ---------- 卡片 ---------- */

.cards {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: linear-gradient(180deg, var(--card), var(--deep-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h3 { color: var(--gold-soft); }
.card p { margin: 0 0 8px; color: var(--ink-dim); font-size: .93rem; }
.card p:last-child { margin-bottom: 0; }

a.card {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color .15s ease, transform .15s ease;
}
a.card:hover {
  border-color: var(--sea);
  transform: translateY(-2px);
}
a.card .go { color: var(--sea); font-size: .86rem; }

/* ---------- 平台条目 ---------- */

.plat {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  background: linear-gradient(180deg, var(--card), var(--deep-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
@media (min-width: 700px) {
  .plat { grid-template-columns: 92px 1fr; align-items: start; }
}
.plat .logo {
  width: 72px; height: 72px;
  pointer-events: none;
}
.plat h3 { font-size: 1.14rem; margin-bottom: 4px; }
.plat dl { margin: 12px 0 0; font-size: .92rem; }
.plat dt { color: var(--gold-soft); font-weight: 600; margin-top: 10px; }
.plat dd { margin: 2px 0 0; color: var(--ink-dim); }

.btn {
  display: inline-block;
  margin-top: 14px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: #1b1307;
  font-weight: 700;
  text-decoration: none;
  font-size: .92rem;
}
.btn:hover { background: var(--gold-soft); color: #1b1307; }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--sea);
}
.btn.ghost:hover { border-color: var(--sea); background: rgba(79, 201, 217, .08); }

/* ---------- 筛选控件 ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--deep-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1 1 180px; }
.field label { font-size: .8rem; color: var(--ink-faint); letter-spacing: .04em; }
.field input, .field select {
  width: 100%;
  background: var(--deep);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: .93rem;
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: 2px solid var(--sea);
  outline-offset: 1px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.chip {
  font: inherit;
  font-size: .85rem;
  cursor: pointer;
  background: var(--deep-2);
  border: 1px solid var(--line);
  color: var(--ink-dim);
  padding: 6px 13px;
  border-radius: 999px;
}
.chip:hover { color: var(--ink); border-color: var(--sea); }
.chip[aria-pressed="true"] {
  background: rgba(239, 185, 73, .14);
  border-color: var(--gold);
  color: var(--gold);
}

.result-count {
  font-size: .88rem;
  color: var(--ink-faint);
  margin: 0 0 14px;
}
.empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  color: var(--ink-faint);
}

/* ---------- 篇章时间轴 ---------- */

.arc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.arc {
  background: linear-gradient(180deg, var(--card), var(--deep-2));
  border: 1px solid var(--line);
  border-left: 3px solid var(--sea);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 18px;
}
.arc[data-stage="东海"] { border-left-color: var(--ok); }
.arc[data-stage="前半段"] { border-left-color: var(--sea); }
.arc[data-stage="后半段"] { border-left-color: var(--gold); }
.arc-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 6px;
}
.arc-head h3 { margin: 0; font-size: 1.05rem; color: var(--ink); }
.tag {
  font-size: .72rem;
  letter-spacing: .06em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-faint);
  white-space: nowrap;
}
.tag.stage { color: var(--sea); border-color: rgba(79, 201, 217, .45); }
.arc p { margin: 0; color: var(--ink-dim); font-size: .93rem; }

/* ---------- 表格 ---------- */

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: .92rem;
}
caption {
  caption-side: top;
  text-align: left;
  padding: 12px 14px 0;
  color: var(--ink-faint);
  font-size: .85rem;
}
th, td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(34, 73, 108, .6);
  vertical-align: top;
}
th {
  color: var(--gold-soft);
  font-weight: 600;
  background: var(--deep-2);
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(79, 201, 217, .05); }

/* ---------- 清单 ---------- */

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li {
  background: var(--deep-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
}
.checklist label {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  cursor: pointer;
}
.checklist input[type="checkbox"] {
  margin: 5px 0 0;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--gold);
}
.checklist .t { font-weight: 600; }
.checklist .d { display: block; color: var(--ink-faint); font-size: .88rem; font-weight: 400; }
.checklist li.done { border-color: rgba(88, 201, 138, .5); }
.checklist li.done .t { color: var(--ok); text-decoration: line-through; text-decoration-color: rgba(88,201,138,.5); }

.progress-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.bar {
  flex: 1 1 180px;
  height: 9px;
  background: var(--deep-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  min-width: 0;
}
.bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--sea), var(--gold));
  transition: width .25s ease;
}

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

details.faq {
  background: linear-gradient(180deg, var(--card), var(--deep-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 4px 16px;
  margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer;
  padding: 12px 0;
  font-weight: 600;
  color: var(--gold-soft);
  list-style-position: inside;
}
details.faq summary:focus-visible { outline: 2px solid var(--sea); outline-offset: 3px; }
details.faq > p, details.faq > ul { color: var(--ink-dim); font-size: .94rem; margin-top: 0; }
details.faq[open] summary { color: var(--gold); }

/* ---------- 页脚 ---------- */

footer.site {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding: 28px 0 40px;
  background: rgba(7, 18, 31, .6);
}
footer.site .cols {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  margin-bottom: 20px;
}
footer.site h4 { margin: 0 0 8px; font-size: .9rem; color: var(--ink); }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 5px; }
footer.site a { color: var(--ink-dim); text-decoration: none; font-size: .9rem; }
footer.site a:hover { color: var(--gold); }
.disclaimer {
  border-top: 1px solid rgba(34, 73, 108, .6);
  padding-top: 16px;
  color: var(--ink-faint);
  font-size: .82rem;
  line-height: 1.8;
}

/* ---------- 404 ---------- */
.nf { text-align: center; padding: 60px 0 40px; }
.nf svg { width: 150px; margin: 0 auto 18px; display: block; pointer-events: none; }
.nf .links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }

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