/* ============================================================
   Dracgrave - 《龙冢》设定站 样式 (中世纪魔幻风 v2)
   行距拉大 / 板块间隔控制 / 中古纹章分割线 / 开源字体本地化
   字体素材: public/fonts/ (Cinzel + UnifrakturMaguntia, OFL)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #12100e;
  --bg-2: #1a1613;
  --bg-3: #221d18;
  --border: #3a3128;
  --gold: #d4a04a;
  --gold-light: #e8c37a;
  --text: #e8e0d4;
  --text-dim: #a89a84;
  --text-mute: #7a6c58;
  /* 中古纹章分割线 (内联 SVG, 菱形+两侧细线) */
  --orn-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 14'%3E%3Cline x1='0' y1='7' x2='128' y2='7' stroke='%23d4a04a' stroke-width='1' opacity='0.45'/%3E%3Cpath d='M160 0.5 L173 7 L160 13.5 L147 7 Z' fill='%23d4a04a'/%3E%3Cpath d='M167 3.6 L171.4 7 L167 10.4 L162.6 7 Z' fill='%2312100e'/%3E%3Ccircle cx='160' cy='7' r='1.7' fill='%23e8c37a'/%3E%3Cline x1='192' y1='7' x2='320' y2='7' stroke='%23d4a04a' stroke-width='1' opacity='0.45'/%3E%3C/svg%3E");
}

/* ---------- 开源字体 (OFL, 本地化) ---------- */
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/cinzel-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/cinzel-latinext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'UnifrakturMaguntia';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/unifraktur.woff2') format('woff2');
}

body {
  font-family: "Georgia", "Noto Serif SC", "Songti SC", serif;
  background: var(--bg);
  color: var(--text);
  line-height: 2.0;                 /* 行距拉大 */
  letter-spacing: 0.03em;           /* 字距微调 */
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(212,160,74,0.06), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(120,40,30,0.08), transparent 50%);
  min-height: 100vh;
}
.container { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* ---------- 头部 ---------- */
.site-header {
  background: rgba(18,16,14,0.92);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  position: sticky; top: 0; z-index: 100;
  backdrop-filter: blur(6px);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.logo {
  color: var(--gold); text-decoration: none;
  font-family: 'UnifrakturMaguntia', 'Cinzel', 'Georgia', serif;
  font-size: 27px; letter-spacing: 2px; line-height: 1.3;
}
.logo .glyph { color: #e05a3a; }
.logo .sub { display: block; color: var(--text-mute); font-size: 12px; letter-spacing: 3px; margin-top: 3px; }
.main-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.main-nav a {
  color: var(--text-dim); text-decoration: none; font-size: 14px;
  padding: 6px 12px; border-radius: 6px; transition: all .2s;
  border: 1px solid transparent;
}
.main-nav a:hover { color: var(--gold-light); background: var(--bg-2); border-color: var(--border); }
.main-nav a.active { color: var(--gold); border-color: var(--border); background: var(--bg-2); }

/* ---------- 首页英雄区 ---------- */
.hero {
  text-align: center; padding: 64px 0 46px;
  border-bottom: 1px solid var(--border); margin-bottom: 36px;
}
.hero h1 {
  color: var(--gold); font-size: 42px; letter-spacing: 6px; margin-bottom: 14px;
  font-family: 'Cinzel', 'Georgia', serif;
  text-shadow: 0 0 30px rgba(212,160,74,0.25);
}
.hero .tagline { color: var(--text-dim); font-size: 16px; max-width: 640px; margin: 0 auto; line-height: 2.0; }
.hero .stats { margin-top: 24px; display: flex; justify-content: center; gap: 36px; }
.hero .stats span { color: var(--text-mute); font-size: 14px; }

/* ---------- 板块导览 (切换按钮) ---------- */
.section-nav { display: flex; gap: 10px; justify-content: center; margin: 34px 0; flex-wrap: wrap; }
.section-nav a {
  color: var(--text-dim); text-decoration: none; font-size: 15px;
  padding: 10px 22px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--bg-2); transition: all .2s;
}
.section-nav a:hover, .section-nav a.active {
  color: var(--gold); border-color: var(--gold); background: var(--bg-3);
  box-shadow: 0 0 12px rgba(212,160,74,0.15);
}

/* ---------- 首页文章列表 板块分隔 ---------- */
.list-head { text-align: center; margin: 42px 0 28px; }
.list-title {
  color: var(--gold); font-family: 'Cinzel', 'Georgia', serif;
  letter-spacing: 5px; font-size: 18px; margin-bottom: 14px;
}
.orn-hr { height: 14px; background: var(--orn-divider) no-repeat center / 320px 14px; opacity: 0.8; }

/* ---------- 文章卡片 ---------- */
.post-card {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px;
  padding: 20px 24px; margin-bottom: 20px; transition: all .2s;
}
.post-card:hover { border-color: var(--gold); transform: translateX(3px); }
.post-card .title { color: var(--gold-light); text-decoration: none; font-size: 19px; display: block; }
.post-card .title:hover { color: var(--gold); }
.post-card .meta { color: var(--text-mute); font-size: 12px; margin-top: 10px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-card .meta .badge {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 8px; color: var(--gold);
}
.post-card .excerpt { color: var(--text-dim); font-size: 14px; margin-top: 10px; line-height: 1.9; }
.card-cover { display: block; margin: -20px -24px 16px; overflow: hidden; border-radius: 10px 10px 0 0; }
.card-cover img { width: 100%; max-height: 300px; object-fit: cover; display: block; transition: transform .3s; }
.card-cover:hover img { transform: scale(1.02); }

/* ---------- 文章页 ---------- */
.post-article { background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; padding: 46px 52px; }
.post-article h1 {
  color: var(--gold); font-size: 32px; letter-spacing: 2px;
  font-family: 'Cinzel', 'Georgia', serif; line-height: 1.5;
}
.post-meta { color: var(--text-mute); font-size: 13px; margin: 14px 0 28px; display: flex; gap: 14px; flex-wrap: wrap; }
.post-meta .badge { background: var(--bg-3); border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px; color: var(--gold); }
.post-content { font-size: 16px; }
.post-content p { margin-bottom: 20px; }
.post-content img {
  max-width: 100%; height: auto; border-radius: 10px;
  border: 1px solid var(--border); margin: 26px auto; display: block;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
/* 板块标题: 加大间隔 + 上方纹章装饰线 */
.post-content h2 {
  color: var(--gold-light); font-family: 'Cinzel', 'Georgia', serif;
  letter-spacing: 2px; margin: 54px 0 18px; padding-top: 20px;
  position: relative; line-height: 1.6;
}
.post-content h2::before {
  content: ''; display: block; height: 14px; margin-bottom: 16px;
  background: var(--orn-divider) no-repeat left center / 260px 14px;
  opacity: 0.75;
}
.post-content h3 {
  color: var(--gold-light); font-family: 'Cinzel', 'Georgia', serif;
  letter-spacing: 1.5px; margin: 38px 0 14px; line-height: 1.7;
}
/* 列表间距 */
.post-content ul, .post-content ol { margin: 12px 0 22px; padding-left: 1.7em; }
.post-content li { margin-bottom: 9px; }
/* 引用块: 中世纪金边 */
.post-content blockquote {
  border-left: 3px solid var(--gold); background: var(--bg-3);
  padding: 16px 22px; margin: 26px 0; border-radius: 0 8px 8px 0;
  color: var(--text-dim);
}
.post-content blockquote p { margin-bottom: 10px; }
.post-content blockquote p:last-child { margin-bottom: 0; }
/* 分割线: 纹章式 */
.post-content hr {
  border: none; height: 14px; margin: 44px auto;
  background: var(--orn-divider) no-repeat center / 320px 14px;
  opacity: 0.85;
}
/* 表格: 金色表头 */
.post-content table {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14.5px; line-height: 1.9;
}
.post-content th {
  background: var(--bg-3); color: var(--gold); border: 1px solid var(--border);
  padding: 11px 13px; font-weight: 600; text-align: left;
}
.post-content td {
  border: 1px solid var(--border); padding: 10px 13px;
  color: var(--text); vertical-align: top;
}
.post-content tr:nth-child(even) td { background: rgba(255,255,255,0.018); }
.post-content pre {
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 8px;
  padding: 16px; overflow-x: auto; margin: 18px 0; font-size: 13px;
}
.post-content code { font-family: ui-monospace, monospace; }
.back-link { margin-top: 28px; }
.back-link a { color: var(--gold); text-decoration: none; }

/* ---------- 分类页 ---------- */
.page-title {
  color: var(--gold); font-size: 28px; margin: 32px 0 24px;
  font-family: 'Cinzel', 'Georgia', serif; letter-spacing: 2px;
  padding-bottom: 18px; position: relative;
}
.page-title::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 200px; height: 14px;
  background: var(--orn-divider) no-repeat left center / 200px 14px;
  opacity: 0.75;
}
.empty { color: var(--text-mute); text-align: center; padding: 70px 0; font-size: 16px; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 24px 0; margin-top: 56px; color: var(--text-mute); font-size: 13px; text-align: center; }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: 110px 0; }
.not-found h1 { color: var(--gold); font-size: 60px; font-family: 'Cinzel', serif; }
.not-found p { color: var(--text-dim); margin: 18px 0; }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .site-header .container { flex-direction: column; align-items: flex-start; }
  .post-article { padding: 24px; }
  .hero h1 { font-size: 30px; }
  .post-content h2 { margin-top: 44px; }
}
