/* 闪词静态页（词表页 / 单词页）样式 —— 与首页同一套深色配色 */
:root {
  --bg: #0f1117;
  --text: #eef1f7;
  --muted: #8a93a6;
  --accent: #5b8cff;
  --accent-2: #7c5cff;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.03);
  --border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 20px 60px;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1b2340 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

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

/* ---------- 顶栏 ---------- */
.site-head {
  max-width: 860px;
  margin: 0 auto;
  padding: 26px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; font-size: 17px; }
.site-brand:hover { text-decoration: none; }
.logo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.brand-en { color: var(--muted); font-weight: 500; font-size: 14px; }

.book-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.book-nav a {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
}
.book-nav a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }

/* ---------- 内容 ---------- */
.wrap { max-width: 860px; margin: 0 auto; }

.crumbs { font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs span { margin: 0 4px; }

h1 { font-size: 30px; line-height: 1.25; margin: 0 0 14px; letter-spacing: -0.01em; }

.lede { color: var(--muted); font-size: 15px; margin: 0 0 10px; max-width: 720px; }
.meta-line { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }

/* ---------- FAQ ---------- */
.faq { margin: 0 0 26px; }
.faq h2 { font-size: 17px; margin: 0 0 12px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: var(--card);
}
.faq-item summary { cursor: pointer; font-weight: 600; font-size: 14.5px; }
.faq-item p { margin: 10px 0 0; color: var(--muted); font-size: 14px; }

.book-nav-inline { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 22px; font-size: 14px; }

/* ---------- 词表 ---------- */
.word-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.word-table th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: #12151d;
}
.word-table td { padding: 10px 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
.word-table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.word-table .num { width: 56px; color: #5b6377; font-size: 12.5px; }
.word-table .en { font-weight: 600; white-space: nowrap; }
.word-table .ipa { color: var(--muted); font-size: 13px; font-family: "SF Mono", Consolas, monospace; white-space: nowrap; }
.word-table .zh { color: #c7cfdd; }

.ad-row td { padding: 0; border-bottom: none; }

/* ---------- 广告位 ---------- */
.banner-slot {
  display: flex;
  justify-content: center;
  margin: 0;
  min-height: 1px;
}
.banner-slot[data-ad-loaded] { margin: 22px 0; min-height: 50px; }
.banner-slot iframe { max-width: 100%; }

.side-ad { display: none; }

@media (min-width: 1180px) {
  .side-ad {
    display: block;
    position: fixed;
    top: 96px;
    width: 160px;
  }
  .side-ad-left { left: calc(50% - 430px - 160px - 24px); }
  .side-ad-right { right: calc(50% - 430px - 160px - 24px); }
}

/* ---------- 单词页 ---------- */
.word-h1 { font-size: 38px; margin: 0 0 6px; }
.word-ipa { color: var(--muted); font-family: "SF Mono", Consolas, monospace; font-size: 16px; margin: 0 0 14px; }
.word-meaning { font-size: 17px; margin: 0 0 10px; color: #dfe6f2; }
.word-books { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.word-books a { margin-right: 8px; }

.block { margin: 0 0 26px; }
.block h2 { font-size: 16px; margin: 0 0 10px; }
.example-en { font-size: 16px; margin: 0 0 6px; }
.example-zh { color: var(--muted); font-size: 14px; margin: 0 0 12px; }

.say-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}
.say-btn:hover { border-color: var(--accent); color: var(--text); }

.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a {
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text);
}
.related a:hover { border-color: var(--accent); text-decoration: none; }

/* ---------- 页脚 ---------- */
.site-foot {
  max-width: 860px;
  margin: 40px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
}
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.foot-links a { color: var(--muted); }
.foot-note { margin: 0; }
.foot-note a { color: var(--muted); text-decoration: underline; }

@media (max-width: 640px) {
  h1 { font-size: 24px; }
  .word-h1 { font-size: 30px; }
  .word-table { font-size: 13.5px; }
  .word-table .ipa { display: none; }
  .word-table th:nth-child(3), .word-table td:nth-child(3) { display: none; }
}

/* ---------- 赞助位（每个页面底部） ---------- */
.support-wrap {
  max-width: 860px;
  margin: 30px auto 0;
  display: flex;
  justify-content: center;
  padding: 0 4px;
}
.support-link {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
  transition: border-color .15s, background .15s;
}
.support-link:hover { border-color: #333a4d; background: rgba(255, 255, 255, .04); text-decoration: none; }
.support-icon { font-size: 16px; flex-shrink: 0; line-height: 1; }
.support-text { flex: 1; min-width: 0; }
.support-text b { color: var(--text); font-weight: 600; }

/* ---------- 广告位 ---------- */
.ad-slot {
  display: flex;
  justify-content: center;
  min-height: 1px;
  overflow: hidden;
}
.ad-slot[data-ad-loaded] { margin: 20px 0; }
.ad-slot iframe, .ad-slot img { max-width: 100%; }
.ad-slot > div { max-width: 100%; }

/* ---------- 名言页 ---------- */
.quote-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  counter-reset: q;
}
.quote {
  position: relative;
  padding: 16px 18px 16px 46px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.quote::before {
  counter-increment: q;
  content: counter(q);
  position: absolute;
  left: 16px;
  top: 17px;
  font-size: 12px;
  color: #5b6377;
  font-weight: 600;
}
.quote-en {
  margin: 0 0 8px;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text);
}
.quote-zh {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}
.quote-author {
  margin: 0;
  font-size: 12.5px;
  color: #5b6377;
}

/* ---------- 顶部阅读进度 + 回到顶部 ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0;
  transition: opacity .2s ease;
  z-index: 9999;
  pointer-events: none;
}
.scroll-progress.visible { opacity: 1; }

.to-top {
  position: fixed;
  right: 18px;
  bottom: 24px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(30, 34, 48, .92);
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease, border-color .15s ease;
  z-index: 9999;
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { border-color: var(--accent); }
