/* ===== 安南风俗志 · 设计系统 ===== */
:root {
  --paper:        #f6f1e7;
  --paper-2:      #efe7d8;
  --surface:      #fffdf8;
  --ink:          #2b2620;
  --ink-soft:     #4a4239;
  --muted:        #8a7f70;
  --line:         #ddd2bf;
  --crimson:      #9e2b25;
  --crimson-soft: #c2503f;
  --gold:         #b8893b;
  --jade:         #3f6b5e;
  --shadow:       0 10px 30px rgba(60, 45, 25, 0.10);
  --shadow-sm:    0 4px 14px rgba(60, 45, 25, 0.08);
  --radius:       14px;
  --serif:        "Noto Serif SC", "Songti SC", "STSong", "SimSun", "Source Han Serif SC", Georgia, serif;
  --sans:         "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 18%, rgba(184,137,59,0.06), transparent 42%),
    radial-gradient(circle at 88% 8%, rgba(158,43,37,0.05), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' fill='%23f6f1e7'/%3E%3Crect width='120' height='120' fill='%23f6f1e7' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: min(1080px, 92vw); margin: 0 auto; }

/* ===== 顶部导航 ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, 0.86);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .seal {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--crimson); color: #fff;
  border-radius: 8px;
  font-family: var(--serif); font-weight: 700; font-size: 19px;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,0.25);
}
.brand .name { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: 1px; }
.brand .sub  { font-size: 12px; color: var(--muted); letter-spacing: 2px; margin-top: -3px; }

.nav-links { display: flex; gap: 6px; align-items: center; }
.nav-links a {
  padding: 8px 14px; border-radius: 8px; font-size: 15px; color: var(--ink-soft);
  transition: background .2s, color .2s;
}
.nav-links a:hover { background: var(--paper-2); color: var(--crimson); }
.nav-links a.active { color: var(--crimson); background: var(--paper-2); font-weight: 600; }

.menu-btn {
  display: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 8px; width: 42px; height: 38px; cursor: pointer; color: var(--ink);
  font-size: 18px;
}

/* ===== Hero ===== */
.hero {
  position: relative; padding: 72px 0 56px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255,253,248,0.4), transparent),
    radial-gradient(circle at 80% 0%, rgba(184,137,59,0.10), transparent 55%);
}
.hero .kicker {
  display: inline-block; font-size: 13px; letter-spacing: 4px; color: var(--crimson);
  border: 1px solid var(--crimson); padding: 5px 14px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--serif); font-size: clamp(38px, 6vw, 64px); line-height: 1.1;
  margin: 0 0 14px; letter-spacing: 2px;
}
.hero h1 .accent { color: var(--crimson); }
.hero p.lead { font-size: 18px; color: var(--ink-soft); max-width: 640px; margin: 0 0 26px; }
.hero .meta { font-size: 14px; color: var(--muted); }
.hero .meta span { margin-right: 18px; }

.hero-stats { display: flex; gap: 30px; margin-top: 34px; flex-wrap: wrap; }
.hero-stats .stat .n { font-family: var(--serif); font-size: 30px; color: var(--crimson); font-weight: 700; }
.hero-stats .stat .t { font-size: 13px; color: var(--muted); }

/* ===== 通用区块 ===== */
section.block { padding: 56px 0; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 26px; }
.section-head h2 {
  font-family: var(--serif); font-size: 28px; margin: 0; letter-spacing: 1px;
  position: relative; padding-left: 16px;
}
.section-head h2::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 5px;
  background: var(--crimson); border-radius: 3px;
}
.section-head .note { color: var(--muted); font-size: 14px; }
.section-head .more { margin-left: auto; font-size: 14px; color: var(--crimson); }
.section-head .more:hover { text-decoration: underline; }

/* ===== 文章卡片 ===== */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card .tag {
  align-self: flex-start; font-size: 12px; color: var(--jade); border: 1px solid var(--jade);
  padding: 3px 10px; border-radius: 999px; margin-bottom: 12px;
}
.card h3 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; line-height: 1.35; }
.card p { color: var(--ink-soft); font-size: 15px; margin: 0 0 16px; flex: 1; }
.card .foot { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; }

/* ===== 编者按 ===== */
.editor-note {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.editor-note h3 { font-family: var(--serif); margin: 0 0 10px; font-size: 20px; }
.editor-note p { margin: 0 0 12px; color: var(--ink-soft); }
.editor-note p:last-child { margin-bottom: 0; }
.editor-note .sign { text-align: right; color: var(--muted); font-family: var(--serif); }

/* ===== 常识介绍：分类网格 ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat:hover { transform: translateY(-3px); border-color: var(--crimson); box-shadow: var(--shadow-sm); }
.cat .ico {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--paper-2); color: var(--crimson); font-size: 20px; margin-bottom: 12px;
}
.cat h4 { font-family: var(--serif); margin: 0 0 6px; font-size: 17px; }
.cat p { font-size: 13px; color: var(--muted); margin: 0; }

/* ===== 常识详情条目 ===== */
.knowledge { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.toc {
  position: sticky; top: 84px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm);
}
.toc h4 { font-family: var(--serif); margin: 0 0 12px; font-size: 16px; color: var(--ink); }
.toc a {
  display: block; padding: 7px 10px; border-radius: 8px; font-size: 14px; color: var(--ink-soft);
  border-left: 3px solid transparent; transition: all .15s;
}
.toc a:hover { background: var(--paper-2); color: var(--crimson); }
.toc a.active { background: var(--paper-2); color: var(--crimson); border-left-color: var(--crimson); font-weight: 600; }

.kb article {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 32px; margin-bottom: 26px; box-shadow: var(--shadow-sm); scroll-margin-top: 84px;
}
.kb article h3 {
  font-family: var(--serif); font-size: 24px; margin: 0 0 6px; letter-spacing: .5px;
  display: flex; align-items: center; gap: 10px;
}
.kb article h3 .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--crimson); flex: none; }
.kb article .sub { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.kb article p { color: var(--ink-soft); margin: 0 0 14px; }
.kb article ul { color: var(--ink-soft); margin: 0 0 14px; padding-left: 22px; }
.kb article ul li { margin-bottom: 7px; }
.kb article strong { color: var(--ink); }
.kb .fact {
  background: var(--paper-2); border-radius: 10px; padding: 14px 16px; font-size: 14px;
  color: var(--ink-soft); margin: 16px 0; border: 1px dashed var(--line);
}
.kb .fact b { color: var(--crimson); }

/* ===== 页脚 ===== */
.site-footer {
  background: #211d18; color: #d8cfc0; margin-top: 30px; padding: 44px 0 30px;
}
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.site-footer h4 { font-family: var(--serif); color: #fff; margin: 0 0 12px; font-size: 16px; }
.site-footer p, .site-footer a { color: #b6ab9a; font-size: 14px; line-height: 1.9; }
.site-footer a:hover { color: var(--gold); }
.site-footer .brandf { font-family: var(--serif); font-size: 20px; color: #fff; margin-bottom: 8px; }
.site-footer .bottom {
  border-top: 1px solid #38322a; margin-top: 30px; padding-top: 18px;
  font-size: 13px; color: #8d8374; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ===== 响应式 ===== */
@media (max-width: 860px) {
  .knowledge { grid-template-columns: 1fr; }
  .toc { position: static; }
  .site-footer .cols { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .menu-btn { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 12px 4vw; gap: 4px; box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; }
  .hero { padding: 48px 0 40px; }
}

/* =========================================
   合作与投稿区域样式 (About Page) - 美化版
   ========================================= */

.contact-section {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.contact-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--crimson), var(--gold), var(--jade));
  border-radius: var(--radius) var(--radius) 0 0;
}

.contact-section h2 {
  font-family: var(--serif);
  font-size: 28px;
  margin: 0 0 12px;
  color: var(--ink);
  letter-spacing: 1px;
  font-weight: 700;
}

.contact-section > p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 32px;
}

/* 联系方式容器 */
.contact-info {
  background: var(--paper-2);
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 36px;
  border-left: 4px solid var(--gold);
}

.contact-info p {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}

.contact-info strong {
  color: var(--ink);
  font-weight: 600;
}

.contact-info a {
  color: var(--crimson);
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

.contact-info a:hover {
  color: var(--crimson-soft);
  text-decoration: underline;
}

/* 社交按钮容器 */
.social-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 28px;
}

/* 按钮基础样式 */
.btn-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: #ffffff;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-social::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.2);
  transition: left 0.3s ease;
}

.btn-social:hover::before {
  left: 100%;
}

/* YouTube 品牌色 */
.btn-youtube {
  background: linear-gradient(135deg, #FF0000 0%, #cc0000 100%);
}

.btn-youtube:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 0, 0, 0.3);
}

.btn-youtube svg {
  transition: transform 0.3s ease;
}

.btn-youtube:hover svg {
  transform: scale(1.15);
}

/* Bilibili 品牌色 */
.btn-bilibili {
  background: linear-gradient(135deg, #00A1D6 0%, #0088b3 100%);
}

.btn-bilibili:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 161, 214, 0.3);
}

.btn-bilibili svg {
  transition: transform 0.3s ease;
}

.btn-bilibili:hover svg {
  transform: scale(1.15);
}

/* 响应式设计 */
@media (max-width: 600px) {
  .contact-section {
    padding: 40px 24px;
  }

  .contact-section h2 {
    font-size: 24px;
  }

  .social-buttons {
    gap: 12px;
    flex-direction: column;
  }

  .btn-social {
    width: 100%;
    padding: 14px 20px;
  }

  .contact-info {
    padding: 14px 16px;
  }
}
