/*
Theme Name: 吃丹修仙 · 仙气主题
Theme URI:
Description: 为吃丹修仙攻略打造的清雅古风仙侠主题，素白青玉配色，适配 Typecho。
Version: 1.0.0
Author: 站长
Author URI:
*/

/* ============================================
   吃丹修仙 · 仙气主题
   素白 / 青玉 / 淡金 / 天青
   ============================================ */

:root {
  --color-bg: #f6f4ee;
  --color-bg-alt: #f0ede3;
  --color-paper: rgba(255, 255, 255, 0.72);
  --color-border: rgba(120, 130, 160, 0.16);
  --color-ink: #3a3f4a;
  --color-ink-strong: #24262e;
  --color-muted: #7c8490;
  --color-jade: #4f7f87;
  --color-jade-light: #7fb0b5;
  --color-gold: #b9925a;
  --color-gold-light: #d6b87a;
  --color-crimson: #a36a5e;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(90, 110, 130, 0.14);
  --shadow-soft: 0 6px 24px rgba(90, 110, 130, 0.10);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "STSong", "SimSun", "Songti SC", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-serif);
  color: var(--color-ink);
  line-height: 1.75;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(168, 207, 207, 0.35), transparent 60%),
    radial-gradient(1000px 500px at 90% 10%, rgba(214, 184, 122, 0.18), transparent 55%),
    linear-gradient(180deg, #fbfaf6 0%, var(--color-bg) 100%);
  background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
img { max-width: 100%; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* ============ 顶部导航 ============ */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 249, 244, 0.78);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--color-border);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-weight: 700; font-size: 20px; color: #fff;
  background: radial-gradient(circle at 30% 25%, var(--color-jade-light), var(--color-jade) 60%, #3a6b72);
  box-shadow: 0 4px 14px rgba(79, 127, 135, 0.35);
}
.logo-text { font-size: 21px; font-weight: 700; letter-spacing: 2px; color: var(--color-ink-strong); }
.logo-text em { font-style: normal; color: var(--color-jade); }

.nav { display: flex; gap: 4px; }
.nav a {
  padding: 9px 17px; border-radius: 40px;
  color: var(--color-muted); transition: all 0.2s; font-size: 15px;
}
.nav a:hover { color: var(--color-jade); background: rgba(127, 176, 181, 0.12); }
.nav a.current { color: #fff; background: linear-gradient(135deg, var(--color-jade-light), var(--color-jade)); box-shadow: 0 4px 12px rgba(79,127,135,0.3); }

.search-btn { font-size: 18px; padding: 8px 10px; border-radius: 50%; color: var(--color-muted); cursor: pointer; background: none; border: none; }
.search-btn:hover { color: var(--color-jade); background: rgba(127,176,181,0.12); }

/* ============ 主横幅 ============ */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 90px 20px 100px;
}
.hero::before {
  content: "";
  position: absolute; left: -5%; right: -5%; bottom: -30px; height: 200px;
  background:
    radial-gradient(50% 100% at 18% 100%, rgba(79,127,135,0.16), transparent),
    radial-gradient(45% 90% at 45% 100%, rgba(79,127,135,0.12), transparent),
    radial-gradient(50% 100% at 78% 100%, rgba(79,127,135,0.16), transparent);
  filter: blur(2px); opacity: 0.8; pointer-events: none;
}
.hero-title {
  font-size: clamp(30px, 5vw, 48px); letter-spacing: 6px; font-weight: 700;
  color: var(--color-ink-strong); margin-bottom: 8px;
  text-shadow: 0 4px 24px rgba(79,127,135,0.25);
}
.hero-title span { color: var(--color-jade); }
.hero-sub { color: var(--color-muted); font-size: 16px; letter-spacing: 2px; }
.hero-sep {
  width: 90px; height: 2px; margin: 22px auto 30px;
  background: linear-gradient(90deg, transparent, var(--color-gold), transparent);
  position: relative;
}
.hero-sep::after {
  content: "✦"; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%); color: var(--color-gold);
  background: var(--color-bg); padding: 0 10px; font-size: 13px;
}

/* ============ 主布局 ============ */
.main { padding: 40px 0; }
.main .container { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.main-content { min-width: 0; }

/* ============ 文章列表 ============ */
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 24px; }
.section-title {
  font-size: 23px; letter-spacing: 3px; font-weight: 600; color: var(--color-ink-strong);
  position: relative; padding-left: 18px;
}
.section-title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; background: linear-gradient(180deg, var(--color-jade-light), var(--color-gold)); border-radius: 3px;
}

.post-card {
  background: var(--color-paper); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 26px 28px; margin-bottom: 20px;
  backdrop-filter: blur(6px); box-shadow: var(--shadow-soft); transition: all 0.28s;
  color: inherit; text-decoration: none; position: relative;
}
.post-card:hover { transform: translateY(-3px); border-color: rgba(79,127,135,0.4); box-shadow: var(--shadow); background: rgba(255,255,255,0.92); }
.post-card .stretched-link::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}
.post-title { font-size: 21px; color: var(--color-ink-strong); margin-bottom: 8px; line-height: 1.4; }
.post-title a { color: inherit; text-decoration: none; position: relative; z-index: 2; }
.sticky {
  display: inline-block; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, var(--color-crimson), #c96a5a);
  padding: 1px 8px; border-radius: 4px; margin-right: 8px; vertical-align: 2px;
}
.post-card:hover .post-title a { color: var(--color-jade); }
.post-meta { color: var(--color-muted); font-size: 13px; margin-bottom: 10px; }
.post-excerpt { color: var(--color-muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; overflow: hidden; text-overflow: ellipsis; }
.post-cat {
  display: inline-block; font-size: 12px; color: var(--color-jade);
  background: rgba(79,127,135,0.12); padding: 2px 12px; border-radius: 20px; margin-bottom: 10px;
  position: relative; z-index: 2;
}

/* ============ 文章详情 ============ */
.article {
  background: var(--color-paper); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 36px; backdrop-filter: blur(6px); box-shadow: var(--shadow-soft);
}
.article-head { border-bottom: 1px dashed var(--color-border); padding-bottom: 20px; margin-bottom: 24px; }
.article-title { font-size: 28px; margin: 12px 0; line-height: 1.4; color: var(--color-ink-strong); }
.article-meta { color: var(--color-muted); font-size: 14px; }
.article-content { font-size: 16px; }
.article-content p { margin-bottom: 16px; }
.article-content h2 { font-size: 20px; margin: 30px 0 12px; color: var(--color-jade); padding-left: 12px; border-left: 3px solid var(--color-jade-light); }
.article-content h3 { font-size: 18px; color: var(--color-gold); margin: 20px 0 10px; }
.article-content ul, .article-content ol { list-style: disc; padding-left: 24px; margin-bottom: 16px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote {
  border-left: 3px solid var(--color-gold); background: linear-gradient(90deg, rgba(214,184,122,0.14), transparent);
  padding: 14px 18px; margin: 16px 0; border-radius: 0 10px 10px 0; color: var(--color-muted);
}
.article-content img { border-radius: 8px; margin: 12px 0; }
.article-content strong { color: var(--color-ink-strong); }
.article-content table {
  width: 100%; border-collapse: separate; border-spacing: 0; margin: 24px 0;
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-soft); border: 1px solid var(--color-border);
}
.article-content thead { background: linear-gradient(135deg, var(--color-jade-light), var(--color-jade)); color: #fff; }
.article-content th { padding: 14px 16px; font-weight: 600; font-size: 15px; text-align: left; }
.article-content td { padding: 12px 16px; border-bottom: 1px solid var(--color-border); font-size: 14px; }
.article-content tbody tr:last-child td { border-bottom: none; }
.article-content tbody tr:hover td { background: rgba(127,176,181,0.08); }
.article-content code { background: rgba(79,127,135,0.1); padding: 2px 6px; border-radius: 4px; font-size: 14px; }
.article-content .tag {
  display: inline-block;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  margin-left: 6px;
  vertical-align: middle;
}

/* ============ 分页 ============ */
.page-nav {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 6px; margin-top: 30px;
}
.page-nav a, .page-nav span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px;
  border-radius: 8px;
  background: var(--color-paper); border: 1px solid var(--color-border); color: var(--color-muted); font-size: 14px;
  white-space: nowrap;
}
.page-nav a:hover { border-color: var(--color-jade); color: var(--color-jade); }
.page-nav .pagecurrent { background: linear-gradient(135deg, var(--color-jade-light), var(--color-jade)); color: #fff; border-color: transparent; }

/* ============ 侧边栏 ============ */
.sidebar { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 20px; }
.side-card {
  background: var(--color-paper); border: 1px solid var(--color-border);
  border-radius: var(--radius); padding: 22px; backdrop-filter: blur(6px); box-shadow: var(--shadow-soft);
}
.side-card h3 { color: var(--color-jade); margin-bottom: 14px; font-size: 16px; letter-spacing: 1px; padding-left: 12px; border-left: 3px solid var(--color-jade-light); }
.side-card li { margin-bottom: 9px; }
.side-card a { color: var(--color-muted); font-size: 14px; }
.side-card a:hover { color: var(--color-jade); }

/* ============ 页脚 ============ */
.footer {
  margin-top: auto; background: linear-gradient(180deg, rgba(240,237,227,0.4), rgba(230,230,220,0.6));
  border-top: 1px solid var(--color-border); padding: 36px 0 20px;
}
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 32px; margin-bottom: 20px; }
.footer-col h4 { color: var(--color-jade); font-size: 16px; margin-bottom: 14px; letter-spacing: 2px; }
.footer-col p, .footer-col li { color: var(--color-muted); font-size: 14px; }
.footer-col li { margin-bottom: 8px; }
.footer-col a:hover { color: var(--color-gold); }
.footer-contact-link {
  color: var(--color-jade);
  text-decoration: none;
  border-bottom: 1px dashed var(--color-jade-light);
  transition: color 0.2s ease;
}
.footer-contact-link:hover {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold-light);
}
.footer-bottom { border-top: 1px solid var(--color-border); padding-top: 16px; text-align: center; color: var(--color-muted); font-size: 13px; }

/* ============ 搜索框 ============ */
.search-wrap { max-width: 600px; margin: 0 auto 30px; display: flex; }
.search-wrap input {
  flex: 1; padding: 12px 16px; border: 1px solid var(--color-border); border-radius: 40px 0 0 40px;
  background: var(--color-paper); color: var(--color-ink); outline: none; font-size: 15px; font-family: inherit;
}
.search-wrap button {
  padding: 12px 24px; border: none; border-radius: 0 40px 40px 0;
  background: linear-gradient(135deg, var(--color-jade-light), var(--color-jade)); color: #fff; cursor: pointer; font-size: 15px;
}

/* ============ 置顶专区样式 ============ */
/* 置顶区标题（金色系，和普通青玉色区分） */
.sticky-section-head { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--color-gold); }
.sticky-section-title {
  font-size: 20px; letter-spacing: 3px; color: var(--color-gold);
  display: inline-flex; align-items: center; gap: 10px;
}
.sticky-section-title::before {
  content: "📌";
}

/* 置顶卡片：淡金色背景 + 左边金色竖条 */
.sticky-card {
  position: relative;
  background: linear-gradient(135deg, rgba(240,215,153,0.12), rgba(230,200,130,0.06));
  border: 1px solid rgba(240,200,120,0.4);
  border-left: 4px solid var(--color-gold);
}
.sticky-card:hover {
  border-color: rgba(240,200,120,0.8) !important;
  border-left-color: var(--color-gold) !important;
  background: linear-gradient(135deg, rgba(240,215,153,0.18), rgba(230,200,130,0.1));
}

/* 置顶红色角标（和原 .sticky 兼容） */
.sticky-badge,
.sticky {
  display: inline-block; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, var(--color-crimson), #c96a5a);
  padding: 2px 10px; border-radius: 4px; margin-right: 8px; vertical-align: 2px;
  position: relative; z-index: 2;
}

/* 置顶文章标题稍粗一点 */
.sticky-post-title { font-weight: 600; }

/* ============ 分页（青玉色风格，整齐胶囊）============ */
.page-navigator {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; margin: 32px auto 12px; padding: 0; list-style: none;
}
.page-navigator li {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--color-ink); font-size: 14px;
  transition: all .2s ease;
}
.page-navigator li a {
  color: inherit; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; padding: 0 2px;
}
.page-navigator li:hover {
  border-color: var(--color-jade-light);
  color: var(--color-jade);
  box-shadow: 0 2px 10px rgba(58,142,122,0.08);
}
.page-navigator li.current {
  background: linear-gradient(135deg, var(--color-jade-light), var(--color-jade));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(58,142,122,0.28);
  font-weight: 500;
}
.page-navigator li.current a { color: #fff; }

/* ============ 响应式 ============ */
@media (max-width: 1100px) {
  .main .container { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .nav { display: none; }
  .article { padding: 24px 20px; }
  .article-title { font-size: 22px; }
  .hero { padding: 64px 20px 76px; }
}

/* ============ 置顶专区样式 ============ */
/* 置顶区标题（金色系，和普通青玉色区分） */
.sticky-section-head { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid var(--color-gold); }
.sticky-section-title {
  font-size: 20px; letter-spacing: 3px; color: var(--color-gold);
  display: inline-flex; align-items: center; gap: 10px;
}
.sticky-section-title::before {
  content: "📌";
}

/* 置顶卡片：淡金色背景 + 左边金色竖条 */
.sticky-card {
  position: relative;
  background: linear-gradient(135deg, rgba(240,215,153,0.12), rgba(230,200,130,0.06));
  border: 1px solid rgba(240,200,120,0.4);
  border-left: 4px solid var(--color-gold);
}
.sticky-card:hover {
  border-color: rgba(240,200,120,0.8) !important;
  border-left-color: var(--color-gold) !important;
  background: linear-gradient(135deg, rgba(240,215,153,0.18), rgba(230,200,130,0.1));
}

/* 置顶红色角标（和原 .sticky 兼容） */
.sticky-badge,
.sticky {
  display: inline-block; font-size: 12px; color: #fff;
  background: linear-gradient(135deg, var(--color-crimson), #c96a5a);
  padding: 2px 10px; border-radius: 4px; margin-right: 8px; vertical-align: 2px;
  position: relative; z-index: 2;
}

/* 置顶文章标题稍粗一点 */
.sticky-post-title { font-weight: 600; }
