/* 深夜豆腐 midnightofu — 深色極簡主題（手機優先 RWD） */

:root {
  --bg: #0b0b0d;
  --bg-elevated: #17171a;
  --border: #2a2a2e;
  --text: #e7e7ea;
  --text-muted: #9a9aa2;
  --accent: #e0a85a;
  --accent-contrast: #14120c;
  --radius: 10px;
  --max-width: 760px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover,
a:focus {
  text-decoration: underline;
}

img {
  max-width: 100%;
  display: block;
}

/* ---- 年齡閘 ---- */

.age-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 6, 7, 0.96);
}

.age-gate--hidden {
  display: none;
}

.age-gate__box {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
}

.age-gate__title {
  margin: 0 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
}

.age-gate__text {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.age-gate__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}

/* ---- 版面 ---- */

.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-header__logo {
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 700;
}

.site-header__logo span {
  color: var(--text-muted);
  font-weight: 400;
}

.site-header__nav {
  display: flex;
  gap: 16px;
  font-size: 0.9rem;
}

.site-header__nav a {
  color: var(--text-muted);
}

.site-main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 12px 16px 40px;
}

.site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px 16px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ---- 內容排版 ---- */

.site-main h1 {
  font-size: 1.6rem;
  line-height: 1.4;
  margin: 8px 0 16px;
}

.site-main h2 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.site-main h3 {
  font-size: 1.1rem;
  margin: 24px 0 10px;
}

.site-main p {
  margin: 0 0 16px;
  color: var(--text);
}

.site-main ul,
.site-main ol {
  margin: 0 0 16px;
  padding-left: 22px;
  color: var(--text);
}

.site-main li {
  margin-bottom: 6px;
}

.site-main table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}

.site-main th,
.site-main td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.site-main th {
  background: var(--bg-elevated);
}

/* ---- 首頁平台區塊 ---- */

.platform-section {
  margin: 0 0 36px;
}

.platform-section h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.article-list a {
  color: var(--text);
  font-weight: 600;
}

.article-list p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.article-list__empty {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---- RWD：平板以上 ---- */

@media (min-width: 768px) {
  body {
    font-size: 17px;
  }

  .site-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
  }

  .site-main h1 {
    font-size: 2rem;
  }

  .age-gate__box {
    padding: 36px 32px;
  }
}
