/* ============================================================
   驿站前台统一视觉系统 —— PGOJ 主题版
   移植自 pgoj-blog assets/css.min.css 的视觉骨架（深色顶栏 + 砖红主色 + 白色圆角卡片）
   同时兼容门户页（index/nav/alliance/sitemap）与内容页（about/submit）
   ============================================================ */

/* === 主题令牌（对齐 pgoj-blog） === */
:root {
  --primary: #cc3b2e;
  --primary-dark: #9e2a20;
  --primary-light: #e8796c;
  --primary-bg-soft: rgba(204, 59, 46, .06);
  --primary-bg-light: rgba(204, 59, 46, .1);

  --header-bg: #1a1a2e;
  --header-dropdown-bg: #252540;
  --body-bg: #f5f5f5;
  --card-bg: #fff;
  --footer-bg: #1a1a2e;

  --text-dark: #333;
  --text-title: #222;
  --text-body: #444;
  --text-muted: #888;
  --text-light: #aaa;
  --text-white: #fff;
  --text-header-link: #ccc;
  --text-header-hover: #e8796c;

  --border-light: #eee;
  --border-input: #ddd;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-md: 0 8px 20px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, .12);

  --container-max: 900px;
  --header-height: 60px;
  --search-radius: 6px;
  --search-bg: rgba(255, 255, 255, .1);
  --search-border: rgba(255, 255, 255, .2);
  --search-btn: rgba(255, 255, 255, .15);
  --search-btn-hover: rgba(255, 255, 255, .25);

  /* 旧变量兼容（模块强调色与卡片头像色） */
  --color_bg: var(--body-bg);
  --color_text: var(--text-dark);
  --color_text_light: var(--text-muted);
  --color_border: var(--border-light);
  --color_link: var(--primary);
  --color_header_bg: var(--header-bg);
  --color_card: var(--card-bg);
  --color_border_hover: #d3d6da;
  --radius_md: 12px;
  --radius_sm: 6px;
  --maxw: 760px;
  --maxw_wide: 1180px;
  --header_h: 60px;

  --c0: #56704A; --c1: #B0483C; --c2: #8A6A48; --c3: #7A5670; --c4: #6B645C; --c5: #3D6480;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--body-bg);
  color: var(--text-dark);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

img { max-width: 100%; height: auto; }

/* === 跳转辅助 === */
.skip-link {
  position: absolute;
  top: -999px; left: -999px;
  z-index: 9999;
  padding: 12px 24px;
  background: var(--primary); color: var(--text-white);
  font-size: 1rem; font-weight: 500;
  border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; left: 0; outline: 3px solid var(--text-white); outline-offset: 2px; }

/* === 容器 === */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}
.wrap-wide {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* === 顶部导航（PGOJ 深色顶栏） === */
.site-header {
  background: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  min-height: var(--header-height);
  gap: 20px;
}
/* portal 旧结构兼容（pageHeader 旧版用 .header-inner） */
.header-inner { justify-content: flex-start; }

.site-header.scrolled { box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }

.header-logo { flex-shrink: 0; }
.header-logo a,
.header-logo .logo-text {
  color: var(--text-white);
  font-size: 1.467rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}
.header-logo a:hover { color: var(--text-white); }
.brand-h, .brand { display: none; }

.header-nav { flex: 1; }
.header-nav ul { list-style: none; display: flex; gap: 5px; align-items: center; }
.header-nav ul li { position: relative; list-style: none; }
.header-nav ul li a {
  color: var(--text-header-link);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: .933rem;
  transition: color .2s, background .2s, transform .2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}
.header-nav ul li a:hover,
.header-nav ul li.active > a {
  color: var(--text-header-hover);
  background: var(--primary-bg-light);
  transform: translateY(-1px);
}
.header-nav li.has-dropdown > a .icon {
  font-size: .733rem;
  transition: transform .2s;
  display: inline-flex;
}
.header-nav li.has-dropdown:hover > a .icon { transform: rotate(180deg); }
.header-nav .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--header-dropdown-bg);
  min-width: 130px;
  border-radius: 6px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  padding: 5px 0;
  flex-direction: column;
  gap: 0;
  list-style: none;
}
.header-nav li.has-dropdown:hover .dropdown-menu { display: flex; }
.header-nav .dropdown-menu li { width: 100%; }
.header-nav .dropdown-menu li a {
  padding: 8px 16px;
  border-radius: 0;
  display: block;
  color: #bbb;
  font-size: .867rem;
  white-space: nowrap;
}
.header-nav .dropdown-menu li a:hover,
.header-nav .dropdown-menu li.active a {
  background: rgba(74, 158, 255, .15);
  color: var(--primary-light);
}

.header-search { display: flex; align-items: center; flex-shrink: 0; }
.header-search .search-form {
  display: flex;
  align-items: stretch;
  height: 32px;
  overflow: hidden;
  border-radius: var(--search-radius);
}
.header-search input {
  width: 150px;
  height: 32px;
  font-size: 16px;
  padding: 0 10px;
  border-radius: var(--search-radius) 0 0 var(--search-radius);
  border: 1px solid var(--search-border);
  border-right: none;
  background: var(--search-bg);
  color: var(--text-white);
  box-sizing: border-box;
  line-height: 32px;
  flex-shrink: 0;
  outline: none;
}
.header-search input::placeholder { color: rgba(255, 255, 255, .45); }
.header-search button {
  width: 34px; height: 32px;
  padding: 0;
  border-radius: 0 var(--search-radius) var(--search-radius) 0;
  border: 1px solid var(--search-border);
  border-left: none;
  background: var(--search-btn);
  color: var(--text-header-link);
  font-size: .9rem;
  display: flex; align-items: center; justify-content: center;
  box-sizing: border-box;
  cursor: pointer;
  transition: background .2s;
  flex-shrink: 0;
  font-family: inherit;
}
.header-search button:hover { background: var(--search-btn-hover); color: var(--text-white); }

.mobile-menu-toggle,
.mobile-search-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-white);
  cursor: pointer;
  padding: 0;
  width: 32px; height: 32px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  font-family: inherit;
}

/* 移动端搜索弹出层 */
.mobile-search-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--header-bg);
  z-index: 300;
  align-items: center;
  padding: 0 15px;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}
.mobile-search-overlay.open { display: flex; animation: slideDown .2s ease; }
.mobile-search-form {
  display: flex;
  flex: 1;
  align-items: stretch;
  height: 38px;
  overflow: hidden;
  border-radius: var(--search-radius);
}
.mobile-search-form input {
  flex: 1;
  height: 38px;
  background: var(--search-bg);
  border: 1px solid var(--search-border);
  border-right: none;
  color: var(--text-white);
  padding: 0 12px;
  border-radius: var(--search-radius) 0 0 var(--search-radius);
  font-size: 1rem;
  outline: none;
}
.mobile-search-form input::placeholder { color: rgba(255, 255, 255, .45); }
.mobile-search-form button {
  width: 38px; height: 38px;
  background: var(--search-btn);
  border: 1px solid var(--search-border);
  border-left: none;
  border-radius: 0 var(--search-radius) var(--search-radius) 0;
  color: var(--text-header-link);
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  font-family: inherit;
}
.mobile-search-form button:hover { background: var(--search-btn-hover); color: var(--text-white); }
.mobile-search-close {
  width: 38px; height: 38px;
  background: none;
  border: 1px solid var(--search-border);
  border-radius: var(--search-radius);
  color: var(--text-header-link);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  font-family: inherit;
}
.mobile-search-close:hover { background: var(--search-btn); color: var(--text-white); }

/* === 主体 === */
.main, .site-main {
  flex: 1;
  padding: 0;
  min-height: calc(100vh - var(--header_h) - 90px);
  min-width: 0;
  width: 100%;
}
.main-content {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 15px;
  min-width: 0;
  width: 100%;
}

/* === 首页工具区（按栏目分组，桌面/移动均一行四） === */
.tool-strip {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 18px 0;
  padding: 16px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  animation: fadeInUp .4s ease backwards;
}
.tool-group { display: block; }
.tool-group-title {
  margin: 0 0 10px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-title);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.tool-group-title .tgt-c { font-size: .6875rem; font-weight: 500; color: var(--text-muted); }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.tool-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--body-bg);
  transition: background .2s, transform .2s;
  min-width: 0;
}
.tool-item:hover { background: var(--primary-bg-soft); }
.tool-item .ti-ic {
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg-soft);
}
.tool-item .ti-bd { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.tool-item .ti-n { font-size: .8125rem; font-weight: 600; color: var(--text-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-item .ti-d { font-size: .6875rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-item .ti-t {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: .625rem;
  padding: 1px 6px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-bg-soft);
}

/* === 首页聚合文章流（PGOJ post-card） === */
.post-list { display: flex; flex-direction: column; gap: 0; }
.post-card {
  background: var(--card-bg);
  padding: 20px 25px;
  margin-bottom: 15px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  opacity: 0;
  transform: translateY(12px);
  animation: fadeInUp .4s ease forwards;
}
.post-card:nth-of-type(2) { animation-delay: 60ms; }
.post-card:nth-of-type(3) { animation-delay: .12s; }
.post-card:nth-of-type(4) { animation-delay: .18s; }
.post-card:nth-of-type(5) { animation-delay: .24s; }
.post-card:nth-of-type(6) { animation-delay: .3s; }
.post-card:nth-of-type(7) { animation-delay: .36s; }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px) !important; }
.post-card-title {
  font-size: clamp(1.05rem, 1.8vw, 1.2rem);
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.5;
}
.post-card-title a { color: var(--text-title); }
.post-card-title a:hover { color: var(--primary); }
.post-card-excerpt { flex: 1; min-width: 0; }
.post-card-excerpt p {
  color: var(--text-body);
  line-height: 1.8;
  font-size: .95rem;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 3;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.post-card-meta {
  font-size: .867rem;
  color: var(--text-muted);
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.post-card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-card-meta .dot { opacity: .5; }
.post-card-meta .cat { color: var(--primary); font-size: .8rem; }

/* 首页区块标题（PGOJ 风格） */
.sec { scroll-margin-top: calc(var(--header_h) + 12px); margin-bottom: 1.75rem; }
.sec:last-of-type { margin-bottom: 0; }
.sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px 16px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.sec-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-title);
  position: relative;
  padding-left: 12px;
}
.sec-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em; bottom: .15em;
  width: 4px;
  border-radius: 2px;
  background: var(--primary);
}
.sec-title .sec-ic { color: var(--primary); margin-right: 4px; font-style: normal; }
.sec-count { font-size: .75rem; color: var(--text-muted); }
.sec-more {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-bg-soft);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 5px 11px;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: background .2s, box-shadow .2s, transform .08s;
}
.sec-more:hover { background: var(--primary-bg-soft); text-decoration: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.sec-more:active { transform: translateY(1px); }

/* === 分页（PGOJ） === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: .867rem;
  color: var(--text-body);
  border: 1px solid var(--border-input);
  border-radius: 6px;
  background: var(--card-bg);
}
.pagination a:hover { background: var(--primary); border-color: var(--primary); color: #fff; }
.pagination .active span { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* === 页脚（PGOJ 深色） === */
.site-footer {
  background: var(--footer-bg);
  color: var(--text-muted);
  padding: 20px 0;
  margin-top: 20px;
  font-size: .8rem;
}
.site-footer .container,
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.footer-left { color: var(--text-light); }
.footer-right { display: flex; gap: 12px; flex-wrap: wrap; }
.footer-right a, .site-footer a { color: var(--text-light); transition: color .2s; }
.footer-right a:hover, .site-footer a:hover { color: var(--text-white); }
.site-footer .sep { color: rgba(255, 255, 255, .25); }

/* === 模块切换条（chips，nav/alliance 页用） === */
.nav-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 6px;
}
.nav-chips .chip {
  font-size: .8125rem;
  padding: 4px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
  transition: color .2s, box-shadow .2s;
}
.nav-chips .chip:hover { color: var(--primary); box-shadow: var(--shadow-md); }
.nav-chips .chip.cur { background: var(--primary); color: #fff; }

/* === 工具网址卡片（宫格） === */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.nc {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
  animation: fadeInUp .4s ease backwards;
  min-width: 0;
}
.nc:nth-child(2) { animation-delay: 60ms; }
.nc:nth-child(3) { animation-delay: .12s; }
.nc:nth-child(4) { animation-delay: .18s; }
.nc:nth-child(5) { animation-delay: .24s; }
.nc:nth-child(6) { animation-delay: .3s; }
.nc:nth-child(7) { animation-delay: .36s; }
.nc:nth-child(8) { animation-delay: .42s; }
.nc:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.nc-ic {
  width: 34px; height: 34px;
  flex: 0 0 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9375rem; font-weight: 600; line-height: 1;
}
.nc-bd { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.nc-n { font-size: .875rem; font-weight: 600; color: var(--text-title); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-d { font-size: .6875rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-t {
  font-size: .6875rem;
  color: var(--text-muted);
  flex-shrink: 0;
  background: var(--body-bg);
  border-radius: 4px;
  padding: 1px 6px;
}

/* === 聚合搜索条 === */
.al-search {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: 1.25rem;
}
.al-search input {
  flex: 1;
  min-width: 0;
  padding: .5rem .75rem;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--card-bg);
  font-size: .875rem;
  color: var(--text-dark);
  font-family: inherit;
  outline: none;
}
.al-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg-light); }
.al-search select {
  padding: .5rem;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  background: var(--card-bg);
  font-size: .8125rem;
  color: var(--text-dark);
  font-family: inherit;
  cursor: pointer;
  outline: none;
}
.al-count { font-size: .8125rem; color: var(--text-muted); white-space: nowrap; }

/* === 聚合博客列表（与首页文章流统一的 post-card） === */
.al-teaser { display: flex; flex-direction: column; }
.post-card .al-bad, .post-card .al-sunset {
  font-size: .6875rem;
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  margin-left: 8px;
  vertical-align: 2px;
}
.al-bad { background: #fdecec; color: #a8504e; }
.al-sunset { background: #f3f0ea; color: #8a8377; }
.post-card--empty { background: var(--body-bg); }
.post-card--empty .post-card-title a { color: var(--text-muted); }
.pc-no-post { color: var(--text-muted); }
.post-card-meta .al-time { margin-left: 0; font-size: inherit; color: inherit; flex-shrink: 1; white-space: normal; }

/* 聚合分页 */
.al-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 1.5rem 0 .5rem;
}
.al-pager button {
  font-family: inherit;
  font-size: .8125rem;
  min-width: 34px;
  height: 32px;
  padding: 0 .5rem;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-dark);
  cursor: pointer;
}
.al-pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.al-pager button.cur { background: var(--primary); border-color: var(--primary); color: #fff; cursor: default; }
.al-pager button:disabled { opacity: .45; cursor: default; }
.al-pager .gap { padding: 0 .25rem; color: var(--text-muted); }

/* === 模块详情 / 页面 === */
.sec-page-head { padding: 1rem 0 .25rem; }
.sec-page-head h1 { margin: 0 0 .25rem; font-size: 1.25rem; font-weight: 600; color: var(--text-title); }
.sec-back { margin: 0 0 2rem; font-size: .8125rem; }
.nav-none { padding: 1.5rem 0; font-size: .875rem; color: var(--text-muted); text-align: center; }

/* === Markdown 内容页 === */
.page-md, .page-content {
  font-size: .95rem;
  line-height: 1.8;
}
.page-md h1, .page-md h2, .page-md h3,
.page-content h1, .page-content h2, .page-content h3 {
  margin: 1.4rem 0 .6rem;
  line-height: 1.3;
  color: var(--text-title);
}
.page-md h1, .page-content h1 { font-size: 1.75rem; }
.page-md h2, .page-content h2 { font-size: 1.375rem; }
.page-md h3, .page-content h3 { font-size: 1.125rem; }
.page-md p, .page-content p { margin: 0 0 1rem; }
.page-md a, .page-content a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.page-md a:hover, .page-content a:hover { color: var(--primary-dark); }
.page-md code, .page-content code {
  padding: .125rem .375rem;
  background: var(--body-bg);
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: .875em;
  color: var(--primary-dark);
}
.page-md pre, .page-content pre {
  background: #1a1a2e;
  color: #e2e0ea;
  border: none;
  border-radius: 12px;
  padding: 1rem;
  overflow: auto;
  margin: 1rem 0;
  font-size: .875rem;
  line-height: 1.6;
}
.page-md pre code, .page-content pre code { background: none; border: none; padding: 0; color: inherit; }
.page-md blockquote, .page-content blockquote {
  margin: 0 0 1rem;
  padding: .75rem 1rem;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: var(--primary-bg-soft);
  color: var(--text-muted);
}
.page-md ul, .page-md ol, .page-content ul, .page-content ol { padding-left: 1.4rem; margin: 0 0 1rem; }
.page-md li, .page-content li { margin-bottom: .375rem; }
.page-content img { border-radius: 8px; margin: 10px 0; }
.page-content hr { border: none; border-top: 1px solid var(--border-light); margin: 24px 0; }

/* === 关于 / 提交页 === */
.about-page {
  max-width: 800px;
  margin: 30px auto 0;
  padding: 28px 30px;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.submit-page {
  max-width: 700px;
  margin: 0 auto;
  padding: 20px 0;
}
.submit-card {
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.submit-info { padding: 24px 24px 0; }
.submit-info h3 { font-size: 1rem; margin-bottom: 12px; color: var(--text-title); }
.submit-info ul { list-style: none; padding: 0; }
.submit-info li {
  padding: 5px 0;
  font-size: 14px;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}
.submit-info li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: var(--primary);
}
.submit-info code {
  background: var(--body-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--primary-dark);
}
.submit-form { padding: 24px; }

/* === 表单与按钮 === */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-title);
}
.required { color: var(--primary-dark); }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-input);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: var(--card-bg);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg-light);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }

.form-actions { display: flex; gap: 10px; padding-top: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  font-family: inherit;
  line-height: 1;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 4px 12px rgba(204, 59, 46, .3);
}
.btn-outline {
  background: var(--card-bg);
  color: var(--text-dark);
  border: 1px solid var(--border-input);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg-soft); }
.btn-success { background: #2e7d5b; color: #fff; }
.btn-success:hover { background: #256b4e; color: #fff; }
.btn-warning { background: #b8860b; color: #fff; }
.btn-warning:hover { background: #a07609; color: #fff; }
.btn-danger { background: var(--primary-dark); color: #fff; }
.btn-danger:hover { background: #83221a; color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-block { width: 100%; }

/* === 提示框 === */
.alert {
  display: flex;
  gap: 12px;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  align-items: flex-start;
  background: var(--card-bg);
  box-shadow: var(--shadow-sm);
}
.alert-icon {
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.alert-success .alert-icon { background: #2e7d5b; color: #fff; }
.alert-error .alert-icon { background: var(--primary); color: #fff; }
.alert-warning .alert-icon { background: #b8860b; color: #fff; }
.alert-content strong { display: block; margin-bottom: 4px; font-size: 15px; color: var(--text-title); }
.alert-content p { font-size: 14px; color: var(--text-muted); }
.alert-content .btn { margin-top: 10px; margin-right: 8px; }

/* === 站点地图等简单页 === */
.sitemap-list { list-style: none; padding: 0; }
.sitemap-list li { margin-bottom: .5rem; }
.sitemap-list a { font-size: .9375rem; color: var(--primary); }

/* === 动画（对齐 pgoj：fadeInUp .4s ease + 递增 delay） === */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { transform: translateY(-100%); }
  to   { transform: translateY(0); }
}

/* === 响应式 === */
@media (max-width: 1024px) {
}

@media (max-width: 700px) {
  .wrap, .wrap-wide, .container, .main-content { padding: 0 12px; }
  .about-page { padding: 18px; margin: 20px 12px 0; }

  /* 顶栏：logo 居中，两侧展开按钮 */
  .header-inner { justify-content: center; gap: 0; position: relative; padding: 0 12px; }
  .header-logo { order: 2; flex: 1; text-align: center; }
  .header-logo a, .header-logo .logo-text { justify-content: center; font-size: 1.25rem; }
  .mobile-menu-toggle { display: flex; order: 1; width: 42px; height: 42px; font-size: 1.4rem; }
  .mobile-search-toggle { display: flex; order: 3; width: 42px; height: 42px; font-size: 1.2rem; }

  /* 导航移出画布，按钮展开 */
  .header-nav {
    order: 4;
    display: none;
    position: absolute;
    top: 100%; left: 0;
    width: 100%;
    background: var(--header-bg);
    z-index: 200;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, .2);
  }
  .header-nav.open { display: block; animation: fadeIn .2s ease; }
  .header-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .header-nav ul li { width: 100%; }
  .header-nav ul li a { padding: 12px 20px; border-top: 1px solid var(--search-bg); font-size: 1rem; border-radius: 0; }
  .header-nav .dropdown-menu {
    position: static;
    background: var(--header-dropdown-bg);
    box-shadow: none;
    padding-left: 20px;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .header-nav li.has-dropdown.open .dropdown-menu { display: block; max-height: 500px; }
  .header-nav li.has-dropdown > a .icon { float: right; margin-top: 4px; }
  .header-nav li.has-dropdown.open > a .icon { transform: rotate(180deg); }

  /* 桌面搜索隐藏，移动搜索走弹出层 */
  .header-search { display: none; }

  .nav-chips { padding-top: 1rem; }
  .nav-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .nc { padding: 10px 12px; gap: 8px; }
  .nc-ic { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; font-size: .8125rem; }
  .nc-d { display: none; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .tool-item { padding: 7px 8px; gap: 7px; }
  .tool-item .ti-ic { width: 26px; height: 26px; flex: 0 0 26px; font-size: .75rem; }
  .tool-item .ti-n { font-size: .75rem; }
  .tool-item .ti-d { display: none; }
  .tool-item .ti-t { display: none; }

  .al-search { flex-wrap: nowrap; gap: .375rem; }
  .al-search input { flex: 1 1 auto; min-width: 0; font-size: .8125rem; padding: .4rem .5rem; }
  .al-search select { flex: 0 0 auto; padding: .4rem .3rem; font-size: .75rem; }
  .al-count { flex: 0 0 auto; font-size: .75rem; }

  .post-card { padding: 16px 18px; }
  .post-card-excerpt p { -webkit-line-clamp: 3; font-size: 1rem; }
  .post-card-meta { gap: 8px; }

  .site-footer { text-align: center; }
  .site-footer .container,
  .site-footer .wrap { flex-direction: column; gap: 6px; }
}

@media (max-width: 380px) {
  .nav-grid { grid-template-columns: 1fr; }
}