/* =====================================================================
   UFO IN TAIWAN — 保留舊站風格：星空背景、金黃文字、綠色連結、紅色大標題
   ===================================================================== */
:root {
  color-scheme: dark;
  --gold: #f5d76e;
  --gold-2: #d9c27a;
  --text: #f1e6b8;
  --green: #4cff7a;
  --green-v: #a0cc00;
  --red: #ff4d4d;
  --yellow: #ffe14d;
  --cyan: #2effc9;
  --line: rgba(245, 215, 110, 0.22);
  --panel: rgba(0, 0, 0, 0.62);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #000 url('/spac.gif') repeat;
  color: var(--text);
  font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
  font-size: 17px;
  line-height: 1.85;
}
a { color: var(--green); text-decoration: none; }
a:visited { color: var(--green-v); }
a:hover { color: #fff; text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { width: min(980px, 100% - 28px); margin: 0 auto; }

/* 頁首 */
.top { background: rgba(0, 0, 0, 0.82); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(4px); }
.top-inner { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold) !important; text-decoration: none !important; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.brand b { display: block; font-size: 19px; letter-spacing: 0.08em; color: var(--yellow); }
.brand small { display: block; font-size: 12.5px; color: var(--gold-2); }
.top-search { margin-left: auto; display: flex; gap: 6px; }
.top-search input, .big-search input { background: #111; color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 15px; width: 200px; }
.top-search button, .big-search button { background: #1d3; color: #000; border: 0; border-radius: 6px; padding: 6px 14px; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.menu { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 6px 0 10px; font-size: 15.5px; }
.menu a { display: inline-flex; align-items: center; gap: 4px; color: var(--green); }
.menu img { width: 16px; height: 16px; }
.menu-new { color: var(--cyan) !important; }

/* 版塊 */
main { padding: 22px 0 40px; }
.box { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 22px 26px; margin-bottom: 22px; }
.center { text-align: center; }
.crumb { font-size: 14px; color: var(--gold-2); margin-bottom: 12px; }
.title-red { font-family: 'Noto Serif TC', serif; color: var(--red); font-size: clamp(26px, 4vw, 34px); text-align: center; letter-spacing: 0.15em; margin: 0 0 12px; text-shadow: 0 0 12px rgba(255, 60, 60, 0.4); }
.title-green { font-family: 'Noto Serif TC', serif; color: var(--green); font-size: clamp(24px, 3.4vw, 32px); line-height: 1.45; text-align: center; margin: 0 0 14px; }
.title-yellow { color: var(--yellow); font-size: 22px; margin: 0 0 14px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; }
.title-yellow small { font-size: 14px; color: var(--gold-2); }
.intro { color: var(--gold-2); text-align: center; }
.intro p { margin: 0 0 6px; }
.count { color: var(--gold-2); font-size: 14px; text-align: right; }

/* 首頁 */
.hero { text-align: center; padding: 26px 0 10px; }
.hero .motto { color: var(--gold); font-size: clamp(18px, 2.6vw, 24px); letter-spacing: 0.2em; margin: 0 0 18px; }
.hero-img { border: 1px solid var(--line); border-radius: 6px; }
.hero-menu { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin: 20px 0; font-size: 18px; }
.hero-menu a { display: inline-flex; align-items: center; gap: 4px; }
.hero-org { color: #6f8cff; font-size: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stats b { display: block; font-size: 26px; color: var(--yellow); }
.stats span { font-size: 14px; color: var(--gold-2); }
.years, .sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.years a, .sections a { display: flex; flex-direction: column; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, 0.03); text-decoration: none; }
.years a:hover, .sections a:hover { border-color: var(--green); }
.years b, .sections b { font-size: 19px; color: var(--green); }
.years small, .sections small { color: var(--gold-2); font-size: 13px; }
.about-box p { margin: 0 0 12px; }

/* 列表 */
.children { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin: 10px 0 16px; }
.children a { display: inline-flex; align-items: center; gap: 4px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 14px; }
.jump a { font-size: 13.5px; padding: 2px 10px; border: 1px solid var(--line); border-radius: 99px; }
.group { display: flex; align-items: center; gap: 8px; color: var(--yellow); font-size: 20px; margin: 26px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); scroll-margin-top: 120px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 7px 0; border-bottom: 1px dotted rgba(245, 215, 110, 0.12); line-height: 1.65; }
.list .d { display: inline-block; min-width: 54px; color: var(--gold-2); font-size: 14.5px; font-variant-numeric: tabular-nums; }
.list .t { font-size: 16.5px; }
.list .note { color: var(--gold-2); font-size: 13.5px; margin-left: 6px; }
.list .tag { font-size: 11.5px; padding: 0 6px; margin-left: 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--gold-2); vertical-align: 1px; }
.list .tag-v { color: var(--cyan); border-color: rgba(46, 255, 201, 0.4); }
.list .icon { width: 64px; height: 48px; object-fit: cover; vertical-align: middle; margin-right: 8px; border-radius: 4px; }
.list .missing .t { color: #8a8466; }
.list .excerpt { margin: 2px 0 0 58px; font-size: 14px; color: var(--gold-2); }
.verdict { margin-left: 8px; padding: 0 8px; border-radius: 4px; font-size: 13px; }
.v-false { background: #5a1010; color: #ffb3b3; }
.v-true { background: #0f4a20; color: #b3ffcb; }

/* 文章 */
.article .meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; color: var(--gold-2); font-size: 15px; margin-bottom: 18px; }
.fig { margin: 0 0 20px; text-align: center; }
.fig img, .gallery img { border: 1px solid var(--line); border-radius: 6px; }
.fig figcaption, .gallery figcaption { color: var(--gold-2); font-size: 14.5px; margin-top: 6px; }
.content { font-size: 18px; line-height: 2; color: var(--text); max-width: 760px; margin: 0 auto; }
.content p { margin: 0 0 1.1em; text-indent: 2em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; margin: 22px 0; }
.gallery figure { margin: 0; text-align: center; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 760px; margin: 0 auto 20px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.file { text-align: center; }
.file small, .muted { color: var(--gold-2); }
.in-cols { margin-top: 24px; font-size: 14.5px; color: var(--gold-2); }
.in-cols a { margin-right: 12px; }
.prevnext { display: flex; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; }
.prevnext a { max-width: 48%; }
.prevnext .next { text-align: right; margin-left: auto; }

/* 搜尋 */
.big-search { display: flex; gap: 8px; justify-content: center; margin: 10px 0 16px; }
.big-search input { width: min(460px, 100%); font-size: 17px; padding: 9px 14px; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 18px; }
.pager a, .pager b { padding: 2px 10px; border: 1px solid var(--line); border-radius: 4px; }

/* 頁尾 */
.foot { background: rgba(0, 0, 0, 0.85); border-top: 1px solid var(--line); padding: 26px 0 34px; text-align: center; font-size: 14.5px; color: var(--gold-2); }
.foot .motto { color: var(--gold); letter-spacing: 0.2em; font-size: 16px; }
.foot .small { font-size: 12.5px; opacity: 0.8; }
.to-top { position: fixed; right: 16px; bottom: 16px; width: 40px; height: 40px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.8); border: 1px solid var(--line); border-radius: 50%; color: var(--gold) !important; text-decoration: none !important; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top-search input { width: 120px; }
  .brand small { display: none; }
  .box { padding: 18px 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .content { font-size: 17px; }
  .list .excerpt { margin-left: 0; }
  .prevnext { flex-direction: column; }
  .prevnext a { max-width: 100%; }
}

/* 手機頁首精簡 */
@media (max-width: 640px) {
  .top { position: static; }
  .top-inner { gap: 8px; padding: 8px 0; }
  .brand img { width: 34px; height: 34px; }
  .brand b { font-size: 15px; white-space: nowrap; letter-spacing: 0.04em; }
  .top-search input { width: 96px; padding: 5px 8px; font-size: 14px; }
  .top-search button { padding: 5px 10px; font-size: 14px; white-space: nowrap; }
  .menu a { margin-right: 10px; }
  .menu { flex-wrap: nowrap; overflow-x: auto; gap: 14px; font-size: 14.5px; padding: 4px 0 8px; white-space: nowrap; scrollbar-width: none; }
  .menu::-webkit-scrollbar { display: none; }
}
