/* ==========================================================================
   看片网站 · 基础样式层 (toolkit)
   DNA：夜航频道 / Neon Channel —— 明亮底 + 霓虹紫青、频道编号、16:9 宽幅卡
   图层：令牌 → 复位 → 工具类 → 共享组件（页头 / 频道带 / 页脚）→ 响应式
   ========================================================================== */

/* --- 1. 设计令牌 --------------------------------------------------------- */
:root {
  --violet: #6d3bff;
  --violet-2: #9b6bff;
  --cyan: #22d3ee;
  --magenta: #ff4d8d;
  --amber: #ffc94d;
  --deep: #221b4b;
  --deep-2: #171436;
  --ink: #171436;
  --ink-2: #57507f;
  --ink-3: #8f88b5;
  --paper: #f8f8ff;
  --line: #e7e5f5;
  --line-2: #d3cfee;
  --r-s: 8px;
  --r-m: 14px;
  --r-l: 22px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-num: "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1220px;
}

/* --- 2. 复位 ------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.75 var(--font-sans); overflow-x: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.3; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* --- 3. 工具类 ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.num { font-family: var(--font-num); }
.muted { color: var(--ink-2); }
.center { text-align: center; }
.tag {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  background: #f1eeff; color: #5b3fd0; font-size: 11.5px;
}
.tag--cyan { background: #e2fbff; color: #0d7d92; }
.tag--magenta { background: #ffe9f1; color: #c22a63; }
.tag--amber { background: #fff6dd; color: #9a7008; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: var(--r-m); cursor: pointer;
  background: linear-gradient(120deg, var(--violet), var(--cyan));
  color: #fff; font-weight: 600; font-size: 14px;
}
.btn:hover { filter: brightness(1.06); }
.btn--ghost { background: #fff; color: var(--violet); border: 1px solid var(--line-2); }
.btn--sm { padding: 7px 13px; font-size: 13px; }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; }

/* --- 4. 共享组件：页头 / 频道带 / 页脚 ---------------------------------- */
.topbar { background: var(--deep-2); color: rgba(255, 255, 255, .8); font-size: 12.5px; }
.topbar__in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; height: 36px; }
.topbar b { color: #fff; }
.topbar__r { margin-left: auto; display: flex; gap: 14px; }
.topbar a { color: var(--cyan); }

.site-head { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.site-head__bar { display: flex; align-items: center; gap: 20px; height: 74px; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand__logo { height: 42px; width: auto; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a {
  padding: 8px 14px; border-radius: 999px; font-size: 14.5px; color: var(--ink-2);
}
.nav a:hover { background: #f1eeff; color: var(--violet); }
.nav a[aria-current="page"] {
  background: linear-gradient(120deg, #efeaff, #e4fbff);
  color: var(--violet); font-weight: 600;
}
.nav-toggle {
  display: none; width: 42px; height: 42px; margin-left: auto; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r-m); background: #fff;
  align-items: center; justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; background: var(--ink); content: "";
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }

.chanrail { border-bottom: 1px solid var(--line); background: #fcfbff; }
.chanrail__in { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0; }
.chanrail a {
  flex: 0 0 auto; padding: 6px 14px; border-radius: 999px; font-size: 13px;
  color: var(--ink-2); border: 1px solid var(--line);
}
.chanrail a:hover { border-color: var(--violet-2); color: var(--violet); }

.site-foot { background: var(--deep); color: rgba(255, 255, 255, .76); margin-top: 8px; padding: 46px 0 24px; }
.site-foot__grid { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 26px; }
.site-foot h3 { color: #fff; font-size: 14.5px; margin-bottom: 12px; }
.site-foot a { display: block; padding: 4px 0; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.site-foot a:hover { color: var(--cyan); }
.site-foot__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.site-foot__brand img { height: 38px; width: auto; background: #fff; border-radius: var(--r-m); padding: 4px 8px; }
.site-foot__note { font-size: 13px; line-height: 1.9; color: rgba(255, 255, 255, .62); }
.site-foot__bar {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: 12.5px; color: rgba(255, 255, 255, .5);
}
.totop {
  position: fixed; right: 20px; bottom: 24px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; cursor: pointer; color: #fff; font-size: 16px;
  background: linear-gradient(120deg, var(--violet), var(--cyan));
}

/* --- 5. 响应式栅格 ------------------------------------------------------ */
@media (max-width: 1080px) {
  .site-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .nav { display: none; }
  .nav.is-open {
    display: grid; position: absolute; left: 16px; right: 16px; top: 74px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-m);
    padding: 10px; gap: 2px; box-shadow: 0 16px 36px rgba(34, 27, 75, .12);
  }
  .nav-toggle { display: inline-flex; }
  .site-head__bar { flex-wrap: wrap; height: auto; padding: 12px 0; gap: 12px; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .rail { grid-auto-columns: minmax(220px, 1fr); }
}
@media (max-width: 430px) {
  .site-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .totop { right: 12px; bottom: 14px; }
}
