/* ── Noto Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

/* ── 變數 ── */
:root {
  --c-green: #00ff80;
  --c-blue: #0000ff;
  --c-black: #000000;
  --c-white: #ffffff;
  --c-dark: #0a0a0a;
  --c-gray: #1a1a1a;
  --c-gray2: #2a2a2a;
  --c-text: #e8e8e8;
  --c-muted: #888;
  --border: 2px solid var(--c-green);
  --border-blue: 3px solid var(--c-blue);
  --ff-serif: 'Noto Serif TC', 'Georgia', serif;
  --ff-sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', system-ui, sans-serif;
  --max-w: 1200px;
  --aside-w: 240px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body {
  background: var(--c-black);
  color: var(--c-text);
  font-family: var(--ff-sans);
  font-weight: 400;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--c-green); text-decoration: none; transition: none; }
a:hover { color: var(--c-white); text-decoration: underline; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── 公告條 ── */
.top-ticker {
  background: var(--c-blue);
  color: var(--c-white);
  font-size: 0.8rem;
  padding: 6px 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  border-bottom: 2px solid var(--c-green);
  overflow: hidden;
}
.ticker-label {
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  padding: 1px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  letter-spacing: 0.1em;
}
.ticker-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Header ── */
.site-header {
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-green);
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 24px 10px;
  border-bottom: 1px solid var(--c-gray2);
}
.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand-logo { height: 36px; width: auto; }
.brand-name {
  font-family: var(--ff-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--c-green);
  letter-spacing: 0.04em;
}
.brand-tagline {
  font-size: 0.78rem;
  color: var(--c-muted);
  margin-left: auto;
  display: none;
}
.main-nav { padding: 0 24px; overflow-x: auto; }
.main-nav ul {
  display: flex;
  gap: 0;
  list-style: none;
  flex-wrap: nowrap;
}
.main-nav ul li a {
  display: block;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--c-text);
  border-right: 1px solid var(--c-gray2);
  white-space: nowrap;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: none;
}
.main-nav ul li a:hover,
.main-nav ul li a.nav-active {
  background: var(--c-blue);
  color: var(--c-white);
  text-decoration: none;
}
.main-nav ul li:first-child a { border-left: 1px solid var(--c-gray2); }

/* ── Hero ── */
.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background: var(--c-dark);
}
.hero-section.hero-compact {
  height: 40vh;
  min-height: 260px;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.hero-mask {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 32px 32px 40px;
  max-width: var(--max-w);
  width: 100%;
  margin: 0 auto;
}
.hero-bg-text {
  position: absolute;
  right: 24px;
  bottom: 24px;
  font-size: clamp(80px, 18vw, 200px);
  font-weight: 700;
  font-family: var(--ff-serif);
  color: rgba(0,255,128,0.07);
  line-height: 1;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}
.hero-eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--c-green);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.hero-h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--c-white);
  line-height: 1.25;
  margin-bottom: 12px;
  border-left: 5px solid var(--c-green);
  padding-left: 16px;
}
.hero-sub {
  font-size: 0.95rem;
  color: var(--c-text);
  max-width: 560px;
  margin-bottom: 20px;
}
.hero-cta {
  display: inline-block;
  background: var(--c-green);
  color: var(--c-black);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 28px;
  border: 2px solid var(--c-green);
  letter-spacing: 0.06em;
  min-height: 44px;
  line-height: 1.4;
  transition: none;
}
.hero-cta:hover {
  background: var(--c-black);
  color: var(--c-green);
  text-decoration: none;
}

/* ── 內容佈局 ── */
.main-wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 0 60px; }
.content-layout {
  display: flex;
  gap: 0;
  align-items: flex-start;
  margin-top: 0;
}

/* ── Aside（左側） ── */
.site-aside {
  width: var(--aside-w);
  flex-shrink: 0;
  border-right: 2px solid var(--c-green);
  min-height: 600px;
  padding: 28px 0;
  position: sticky;
  top: 80px;
  align-self: flex-start;
}
.site-aside nav ul {
  list-style: none;
}
.site-aside nav ul li a {
  display: block;
  padding: 9px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--c-text);
  border-left: 3px solid transparent;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: none;
}
.site-aside nav ul li a:hover,
.site-aside nav ul li a.nav-active {
  border-left-color: var(--c-green);
  color: var(--c-green);
  background: var(--c-gray);
  text-decoration: none;
}
.aside-related {
  margin-top: 28px;
  padding: 0 16px;
}
.aside-related h3 {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  margin-bottom: 8px;
  font-family: var(--ff-sans);
}
.aside-related hr {
  border: none;
  border-top: 1px solid var(--c-gray2);
  margin-bottom: 10px;
}
.related-list li a {
  display: block;
  padding: 6px 0;
  font-size: 0.8rem;
  color: var(--c-muted);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.related-list li a:hover { color: var(--c-green); text-decoration: none; }

/* ── Article ── */
.main-article {
  flex: 1;
  min-width: 0;
  padding: 36px 32px;
}

/* ── Sections ── */
.prose-section {
  margin-bottom: 48px;
}
.prose-section h2,
.main-article h2 {
  font-family: var(--ff-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--c-white);
  margin-bottom: 0;
  padding-bottom: 10px;
  border-bottom: none;
}
.main-article h2 + hr,
.prose-section h2 + hr {
  border: none;
  border-top: 2px solid var(--c-blue);
  margin: 0 0 16px;
}
.main-article h3 {
  font-family: var(--ff-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--c-green);
  margin: 24px 0 8px;
}
.main-article h3 + hr {
  border: none;
  border-top: 1px solid var(--c-gray2);
  margin: 0 0 12px;
}
.main-article p { margin-bottom: 16px; font-size: 1rem; }
.main-article ul, .main-article ol { padding-left: 24px; margin-bottom: 16px; }
.main-article ul { list-style: disc; }
.main-article ol { list-style: decimal; }
.main-article li { margin-bottom: 6px; }
.main-article strong { color: var(--c-green); font-weight: 700; }
.main-article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
  font-size: 0.9rem;
}
.main-article th {
  background: var(--c-blue);
  color: var(--c-white);
  padding: 10px 14px;
  text-align: left;
  font-weight: 700;
  border: 1px solid var(--c-gray2);
}
.main-article td {
  padding: 9px 14px;
  border: 1px solid var(--c-gray2);
  vertical-align: top;
}
.main-article tr:nth-child(even) td { background: var(--c-gray); }
.main-article blockquote {
  border-left: 4px solid var(--c-green);
  padding: 12px 20px;
  background: var(--c-gray);
  margin: 20px 0;
  font-style: italic;
  color: var(--c-text);
}

/* ── 頁面日期 ── */
.page-date, .page-date-inline {
  font-size: 0.82rem;
  color: var(--c-muted);
  margin-bottom: 16px;
}
.page-date time, .page-date-inline time { color: var(--c-green); }

/* ── 卡片列表（首頁） ── */
.card-section { margin-bottom: 40px; }
.card-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.card-item .card-link {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 2px solid var(--c-gray2);
  background: var(--c-dark);
  color: var(--c-text);
  text-decoration: none;
  transition: none;
}
.card-item .card-link:hover {
  border-color: var(--c-green);
  background: var(--c-gray);
  color: var(--c-white);
}
.card-num {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--ff-serif);
  color: var(--c-blue);
  min-width: 36px;
}
.card-body { flex: 1; min-width: 0; }
.card-title { display: block; font-weight: 700; font-size: 0.97rem; margin-bottom: 2px; }
.card-desc { display: block; font-size: 0.8rem; color: var(--c-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-arrow { color: var(--c-green); font-size: 1.2rem; font-weight: 700; }

/* ── 榜單列表 ── */
.ranking-list-section, .sibling-section { margin-bottom: 40px; }
.rank-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.rank-item a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 2px solid var(--c-gray2);
  background: var(--c-dark);
  color: var(--c-text);
  text-decoration: none;
  transition: none;
}
.rank-item a:hover { border-color: var(--c-green); background: var(--c-gray); color: var(--c-white); }
.rank-num {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: var(--ff-serif);
  color: var(--c-blue);
  min-width: 40px;
}
.rank-body { flex: 1; min-width: 0; }
.rank-body strong { display: block; font-size: 0.95rem; font-weight: 700; }
.rank-body small { display: block; font-size: 0.78rem; color: var(--c-muted); margin-top: 3px; }
.sib-list { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.sib-link {
  display: block;
  padding: 10px 18px;
  border: 2px solid var(--c-blue);
  color: var(--c-blue);
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: none;
}
.sib-link:hover { background: var(--c-blue); color: var(--c-white); text-decoration: none; }

/* ── Compare ── */
.compare-more-section, .nav-more-section { margin-bottom: 36px; }
.compare-more-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.compare-more-list li a, .quick-nav-list li a {
  display: block;
  padding: 10px 16px;
  border: 2px solid var(--c-gray2);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--c-text);
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: none;
}
.compare-more-list li a:hover, .quick-nav-list li a:hover {
  border-color: var(--c-green);
  color: var(--c-green);
  text-decoration: none;
}
.quick-nav-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }

/* ── Review ── */
.review-more-section, .review-cta-section { margin-bottom: 36px; }
.review-more-list { list-style: none; counter-reset: review-counter; display: flex; flex-direction: column; gap: 4px; }
.review-more-list li {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--c-gray2);
  background: var(--c-dark);
}
.review-more-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--c-text);
  font-weight: 700;
  font-size: 0.88rem;
  min-height: 44px;
  transition: none;
}
.review-more-list li a:hover { color: var(--c-green); text-decoration: none; background: var(--c-gray); }
.review-more-list li small { display: block; padding: 0 16px 10px; font-size: 0.78rem; color: var(--c-muted); }
.rlist-num { color: var(--c-blue); font-weight: 700; font-family: var(--ff-serif); font-size: 1.1rem; min-width: 28px; }
.cta-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.cta-list li a {
  display: block;
  padding: 11px 18px;
  background: var(--c-blue);
  color: var(--c-white);
  font-weight: 700;
  font-size: 0.88rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  transition: none;
}
.cta-list li a:hover { background: var(--c-green); color: var(--c-black); text-decoration: none; }

/* ── FAQ Hero ── */
.faq-hero {
  position: relative;
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-blue);
  padding: 60px 32px 48px;
  overflow: hidden;
}
.faq-hero-bg {
  position: absolute;
  right: -20px;
  top: -10px;
  font-size: clamp(80px, 20vw, 220px);
  font-weight: 700;
  font-family: var(--ff-serif);
  color: rgba(0,0,255,0.08);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.faq-h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  border-left: 5px solid var(--c-blue);
  padding-left: 16px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.faq-sub { font-size: 0.93rem; color: var(--c-muted); max-width: 540px; }
.faq-content { /* inherits prose-section */ }
.faq-nav-section { margin-bottom: 32px; }
.faq-nav-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.faq-nav-list li a {
  display: block;
  padding: 10px 16px;
  border: 2px solid var(--c-gray2);
  color: var(--c-text);
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: none;
}
.faq-nav-list li a:hover { border-color: var(--c-green); color: var(--c-green); text-decoration: none; }

/* ── About Hero ── */
.about-hero {
  position: relative;
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-green);
  padding: 60px 32px 48px;
  overflow: hidden;
}
.about-hero-bg {
  position: absolute;
  right: -10px;
  top: -10px;
  font-size: clamp(60px, 14vw, 180px);
  font-weight: 700;
  font-family: var(--ff-serif);
  color: rgba(0,255,128,0.06);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.about-h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  border-left: 5px solid var(--c-green);
  padding-left: 16px;
  line-height: 1.3;
}
.about-logo-wrap { margin-bottom: 24px; }
.about-logo { max-height: 60px; width: auto; }
.about-links-section { margin-bottom: 36px; }
.about-index-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.about-index-list li {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--c-gray2);
  background: var(--c-dark);
}
.about-index-list li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--c-text);
  font-weight: 700;
  font-size: 0.88rem;
  min-height: 44px;
  transition: none;
}
.about-index-list li a:hover { color: var(--c-green); text-decoration: none; background: var(--c-gray); }
.about-index-list li small { display: block; padding: 0 16px 10px; font-size: 0.78rem; color: var(--c-muted); }
.idx-num { color: var(--c-blue); font-weight: 700; font-family: var(--ff-serif); font-size: 1.1rem; min-width: 28px; }

/* ── Privacy Hero ── */
.privacy-hero {
  position: relative;
  background: var(--c-dark);
  border-bottom: 3px solid var(--c-green);
  padding: 60px 32px 48px;
  overflow: hidden;
}
.privacy-hero-bg {
  position: absolute;
  right: 0;
  top: 0;
  font-size: clamp(60px, 14vw, 180px);
  font-weight: 700;
  font-family: var(--ff-serif);
  color: rgba(0,255,128,0.05);
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.privacy-h1 {
  font-family: var(--ff-serif);
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--c-white);
  border-left: 5px solid var(--c-green);
  padding-left: 16px;
  line-height: 1.3;
}
.privacy-links-section { margin-bottom: 32px; }
.privacy-links-list { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.privacy-links-list li a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  border: 2px solid var(--c-green);
  color: var(--c-green);
  font-weight: 700;
  font-size: 0.85rem;
  min-height: 40px;
  transition: none;
}
.privacy-links-list li a:hover { background: var(--c-green); color: var(--c-black); text-decoration: none; }

/* ── Footer ── */
.site-footer {
  background: var(--c-dark);
  border-top: 3px solid var(--c-green);
  padding: 32px 24px 24px;
  text-align: center;
}
.site-footer p {
  font-size: 0.88rem;
  color: var(--c-muted);
  margin-bottom: 8px;
}
.site-footer p a { color: var(--c-green); }
.site-footer p a:hover { color: var(--c-white); }
.site-footer p strong { color: var(--c-text); }
.site-footer small {
  display: block;
  font-size: 0.75rem;
  color: var(--c-gray2);
  margin-top: 12px;
  border-top: 1px solid var(--c-gray2);
  padding-top: 12px;
  color: #555;
}

/* ── HR 裝飾 ── */
hr {
  border: none;
  border-top: 2px solid var(--c-blue);
  margin: 0 0 16px;
}
.aside-related hr { border-top-width: 1px; border-color: var(--c-gray2); }

/* ── 動效：輪播（純CSS） ── */
@media (prefers-reduced-motion: no-preference) {
  .card-item {
    animation: stagger-in 0.01s both;
  }
  .card-list .card-item:nth-child(1) { animation-delay: 0s; }
  .card-list .card-item:nth-child(2) { animation-delay: 0.04s; }
  .card-list .card-item:nth-child(3) { animation-delay: 0.08s; }
  .card-list .card-item:nth-child(4) { animation-delay: 0.12s; }
  .card-list .card-item:nth-child(5) { animation-delay: 0.16s; }
  .card-list .card-item:nth-child(6) { animation-delay: 0.20s; }
  @keyframes stagger-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .rank-item {
    animation: stagger-in 0.01s both;
  }
  .rank-list .rank-item:nth-child(n) { animation-delay: calc(0.04s * var(--i, 0)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── 響應式 ── */
@media (max-width: 900px) {
  .content-layout { flex-direction: column; }
  .site-aside {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid var(--c-green);
    position: static;
    padding: 16px 0;
    min-height: auto;
  }
  .site-aside nav ul { display: flex; flex-wrap: wrap; gap: 0; }
  .site-aside nav ul li a {
    padding: 8px 14px;
    border-left: none;
    border-bottom: 2px solid transparent;
    font-size: 0.8rem;
    min-height: 40px;
  }
  .site-aside nav ul li a:hover,
  .site-aside nav ul li a.nav-active {
    border-left: none;
    border-bottom-color: var(--c-green);
  }
  .aside-related { display: none; }
  .main-article { padding: 24px 16px; }
  .quick-nav-list { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  html { font-size: 16px; }
  .brand-row { padding: 10px 14px 8px; gap: 10px; }
  .brand-name { font-size: 1.1rem; }
  .main-nav { padding: 0 8px; }
  .main-nav ul li a { padding: 9px 10px; font-size: 0.75rem; }
  .hero-section { height: 65vh; }
  .hero-section.hero-compact { height: 36vh; min-height: 220px; }
  .hero-content { padding: 20px 16px 28px; }
  .hero-h1 { font-size: 1.4rem; }
  .hero-bg-text { font-size: 70px; }
  .faq-hero, .about-hero, .privacy-hero { padding: 36px 16px 28px; }
  .faq-h1, .about-h1, .privacy-h1 { font-size: 1.3rem; }
  .main-article { padding: 20px 14px; }
  .rank-num { font-size: 1.2rem; min-width: 30px; }
  .card-num { font-size: 1.1rem; }
  .top-ticker { font-size: 0.72rem; padding: 5px 10px; }
  .site-footer { padding: 24px 14px 16px; }
}

@media (min-width: 1100px) {
  .brand-tagline { display: block; }
}
