

/* =========================================================
   FULL BLOG EXTENSION — pages, posts, archive, sidebar,
   comments, admin, footer, responsive
   ========================================================= */

/* ---------- Global layout helpers ---------- */
.layout{display:grid;grid-template-columns:1fr 320px;gap:38px;}
@media(max-width:960px){.layout{grid-template-columns:1fr;}}
.sidebar__sticky{position:sticky;top:20px;}

/* ---------- Hero for inner pages (smaller) ---------- */
.hero--inner{min-height:340px;justify-content:center;}
.hero--inner .hero__body{max-width:820px;margin:0 auto;padding:40px 0;}
.hero--inner .hero__headline{font-size:clamp(24px,3.2vw,40px);font-weight:800;}
.hero--inner h1{margin-top:8px;}
.page-intro{color:rgba(255,255,255,.9);font-size:16px;max-width:640px;}

/* ---------- Breadcrumbs ---------- */
.crumbs{position:relative;z-index:2;font-size:12.5px;color:rgba(255,255,255,.75);margin-bottom:14px;display:flex;gap:8px;flex-wrap:wrap;}
.crumbs a{color:var(--accent-2);}
.crumbs b{font-weight:600;color:#fff;}

/* ---------- Section shell ---------- */
.page{background:#fff;padding:46px 0 70px;}
.page__head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:26px;flex-wrap:wrap;}
.page__head h1{font-family:var(--font-head);font-size:30px;font-weight:700;position:relative;padding-left:16px;}
.page__head h1::before{content:"";position:absolute;left:0;top:6px;bottom:6px;width:4px;background:var(--accent);border-radius:2px;}
.page__head--alt h1{padding-left:0;}
.page__head--alt h1::before{display:none;}

/* ---------- Cards grid ---------- */
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:26px;}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:26px;}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:26px;}
@media(max-width:960px){
  .grid-3,.grid-4{grid-template-columns:repeat(2,1fr);}
}
@media(max-width:560px){
  .grid-3,.grid-4,.grid-2{grid-template-columns:1fr;}
}
.card--meta{display:flex;align-items:center;gap:12px;font-size:12.5px;color:#9a9a9a;margin-top:14px;}
.card__date{margin-top:10px;font-size:12.5px;color:#9a9a9a;}

/* ---------- List layout (archive) ---------- */
.list-row{display:grid;grid-template-columns:220px 1fr;gap:22px;padding:20px 0;border-bottom:1px solid var(--line);align-items:center;}
.list-row:first-of-type{border-top:1px solid var(--line);}
.list-row img{width:220px;height:140px;object-fit:cover;border-radius:10px;}
.list-row h3{font-family:var(--font-head);font-size:19px;line-height:1.3;margin:6px 0;}
@media(max-width:700px){.list-row{grid-template-columns:1fr;}.list-row img{width:100%;height:auto;}}

/* ---------- Pagination ---------- */
.pagination{display:flex;gap:10px;margin-top:40px;justify-content:center;}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:40px;height:40px;padding:0 12px;border:1px solid var(--line);border-radius:8px;font-weight:600;font-size:14px;}
.pagination .active{background:var(--accent);color:#fff;border-color:var(--accent);}
.pagination a:hover{border-color:var(--accent);color:var(--accent);}

/* ---------- Sidebar widgets ---------- */
.widget{background:#fff;border:1px solid var(--line);border-radius:12px;padding:22px;margin-bottom:24px;}
.widget__title{font-family:var(--font-head);font-size:18px;font-weight:700;padding-bottom:12px;margin-bottom:14px;border-bottom:2px solid #f1f1f1;position:relative;}
.widget__title::after{content:"";position:absolute;left:0;bottom:-2px;width:42px;height:2px;background:var(--accent);}
.widget__list a{display:flex;gap:12px;align-items:center;padding:9px 0;border-bottom:1px dashed #eee;font-size:14px;}
.widget__list a:last-child{border-bottom:0;}
.widget__list a:hover{color:var(--accent);}
.widget__list .thumb{width:46px;height:46px;border-radius:50%;overflow:hidden;flex:none;border:1px solid var(--line);}
.widget__list .thumb img{width:100%;height:100%;object-fit:cover;}
.widget__list .tt{line-height:1.3;}
.tags{display:flex;flex-wrap:wrap;gap:8px;}
.tag{background:#f5f4f3;border-radius:20px;padding:6px 13px;font-size:12.5px;font-weight:600;color:#555;}
.tag:hover{background:var(--accent);color:#fff;}

/* ---------- Single post ---------- */
.article__body{background:#fff;}
.article__content{max-width:740px;font-size:17px;color:#333;line-height:1.85;}
.article__content p{margin-bottom:1.3em;}
.article__content h2{font-family:var(--font-head);font-size:26px;color:var(--ink);margin:1.6em 0 .6em;}
.article__content h3{font-family:var(--font-head);font-size:21px;color:var(--ink);margin:1.4em 0 .5em;}
.article__content blockquote{border-left:4px solid var(--accent);background:#faf7f6;padding:14px 20px;font-style:italic;color:#555;margin:1.4em 0;border-radius:0 8px 8px 0;}
.article__content img{width:100%;border-radius:10px;margin:1.4em 0;}
.article__content a{color:var(--accent);text-decoration:underline;}
/* article hero inside the white page: a big cover band */
.article-cover{width:100%;max-width:1000px;height:360px;object-fit:cover;border-radius:14px;margin:0 0 30px;position:relative;}
.article-meta-strip{display:flex;align-items:center;gap:16px;flex-wrap:wrap;color:#9a9a9a;font-size:13.5px;margin-bottom:30px;}
.article-meta-strip .author{display:flex;align-items:center;gap:10px;font-weight:600;color:var(--ink);}

/* ---------- Comments ---------- */
.comments{max-width:740px;margin-top:50px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:28px;}
.comments h3{font-family:var(--font-head);font-size:22px;margin-bottom:20px;}
.comment{border-bottom:1px solid #eee;padding:14px 0;display:flex;gap:12px;}
.comment:last-child{border-bottom:0;}
.comment .avatar{width:40px;height:40px;flex:none;font-weight:800;color:#fff;background:var(--accent);display:flex;align-items:center;justify-content:center;border-radius:50%;}
.comment .cbody{flex:1;}
.comment .cmeta{font-size:12.5px;color:#999;margin-bottom:4px;}
.comment .cbody p{color:#444;font-size:14.5px;}
.form-row{margin-bottom:14px;}
.form-row label{display:block;font-weight:600;font-size:13px;margin-bottom:6px;}
.form-row input,.form-row textarea,.form-row select{width:100%;padding:11px 13px;border:1px solid var(--line);border-radius:8px;font-size:14px;font-family:inherit;background:#fff;}
.form-row textarea{min-height:110px;resize:vertical;}
.form-row input:focus,.form-row textarea:focus,.form-row select:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px rgba(216,46,42,.12);}
.btn{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:#fff;border:0;border-radius:8px;padding:12px 24px;font-weight:700;font-size:14px;cursor:pointer;text-align:center;}
.btn:hover{opacity:.9;}
.btn--dark{background:var(--ink);}
.btn--ghost{background:#fff;color:var(--ink);border:1px solid var(--line);}
.flash{background:#e8f7ee;color:#1b7a45;border:1px solid #bfe6cd;border-radius:8px;padding:12px 16px;margin-bottom:12px;font-size:14px;}

/* ---------- Search ---------- */
.searchbar{display:flex;gap:10px;max-width:560px;margin-bottom:28px;}
.searchbar input{flex:1;padding:13px 16px;border:1px solid var(--line);border-radius:8px;font-size:15px;}
.searchbar .btn{padding:13px 26px;}

/* ---------- Header nav (already defined) + dropdown adds ---------- */
.nav .brand{user-select:none;}
.site-header{
  /* 默认随页面滚动(毛玻璃盖在 hero 上)；滚过一定距离后被 JS 加 .is-frozen 冻结回顶部 */
  position:relative;z-index:50;
  transition:transform .25s ease, box-shadow .25s ease;
}
.site-header.is-frozen{
  position:fixed;top:0;left:0;right:0;z-index:1000;
  animation:navDown .3s ease;
}
.site-header.is-frozen .nav{ box-shadow:0 2px 14px rgba(0,0,0,0.18); }
@keyframes navDown{ from{transform:translateY(-100%);opacity:.4} to{transform:translateY(0);opacity:1} }

/* 让 hero 背景延伸到导航下方，毛玻璃才能透出 hero 图片；导航随页面滚动(不吸顶) */
.hero, .hero--inner{ margin-top: calc(-1 * var(--nav-h)); }
.hero__body{ padding-top: calc(var(--nav-h) + 60px); }
.hero--inner .hero__body{ padding-top: calc(var(--nav-h) + 40px); }
.hero--inner .pages-nudge, .hero--inner .crumbs{ margin-top: 0; }
/* swap the hero bg to a scenic page-header band for inner pages */
.page-hero .hero__bg{background:radial-gradient(140% 120% at 20% 30%, rgba(190,32,30,.7), transparent 60%),linear-gradient(150deg,#2a1517,#4a0f13 55%,#180609);}

/* ---------- Footer ---------- */
footer.site-footer{background:#151010;color:#cfc8c8;padding:0;border-top:3px solid var(--accent);}
.footer-top{display:grid;grid-template-columns:2fr 1fr 1fr;gap:36px;padding:44px 0;}
.footer-top h4{color:#fff;font-family:var(--font-head);font-size:17px;margin-bottom:14px;}
.footer-top p{font-size:13.5px;color:#a89d9d;line-height:1.7;}
.footer-top ul li{margin-bottom:9px;}
.footer-top ul a{color:#cfc8c8;font-size:13.5px;}
.footer-top ul a:hover{color:var(--accent-2);}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding:18px 0;text-align:center;font-size:12.5px;color:#8d8383;}
.footer-logo{display:flex;align-items:center;gap:8px;margin-bottom:12px;color:#fff;font-weight:800;font-size:18px;}
@media(max-width:820px){.footer-top{grid-template-columns:1fr;}}

/* ---------- Admin ---------- */
.admin-panel{background:#fff;border:1px solid var(--line);border-radius:14px;padding:30px;max-width:820px;}
.admin-panel h2{font-family:var(--font-head);margin-bottom:18px;}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:0 18px;}
.admin-post-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid #eee;font-size:14px;}
.admin-post-row h4{font-size:15px;}
.admin-post-row .meta{font-size:12px;color:#999;margin-top:2px;}
.admin-actions{display:flex;gap:8px;flex-wrap:wrap;}
.mini-btn{font-size:12px;padding:6px 12px;border-radius:6px;border:1px solid var(--line);background:#fff;cursor:pointer;font-weight:600;}
.mini-btn--del{color:var(--accent);border-color:#f2c4c2;}
.mini-btn--del:hover{background:var(--accent);color:#fff;}

/* ---------- States ---------- */
.empty{padding:50px 0;text-align:center;color:#999;font-size:15px;}

/* =========================================================
   PRINT / MISC
   ========================================================= */
.two-cols{display:grid;grid-template-columns:1fr 1fr;gap:22px;}
@media(max-width:700px){.two-cols{grid-template-columns:1fr;}}


/* =========================================================
   FROSTED-GLASS DROPDOWN / MOBILE MENU  (requirement #5)
   Translucent + backdrop blur so page content shows through.
   =========================================================
*/
.nav {
  background: rgba(28,16,16,0.55);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 1px 10px rgba(0,0,0,0.15);
}
.dropdown {
  background: rgba(255,255,255,0.78) !important;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 18px 44px rgba(0,0,0,0.20) !important;
}
.dropdown a { color:#333; }
.dropdown a:hover { background: rgba(216,46,42,0.08); color: var(--accent); }
.mobile-menu {
  background: rgba(255,255,255,0.82) !important;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,0.4);
}

/* ---------- Tables (Markdown / 导入的表格) ---------- */
.article__content table, .preview table {
  width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15px;
  border: 1px solid #e3e1df; border-radius: 8px; overflow: hidden;
}
.article__content th, .preview th {
  background: #faf8f6; color: #333; font-weight: 700; text-align: left;
  padding: 10px 14px; border: 1px solid #e3e1df;
}
.article__content td, .preview td {
  padding: 9px 14px; border: 1px solid #e7e5e3;
}
.article__content tr:nth-child(even) td, .preview tr:nth-child(even) td { background: #fbfafa; }
.article__content table a, .preview table a { color: var(--accent); }

/* ============ BGM 播放器（长条椭圆形） ============ */
.bgm-player{
  display:flex;align-items:center;gap:10px;max-width:720px;margin:6px auto 26px;
  padding:10px 18px;border-radius:999px;background:linear-gradient(180deg,#f7f5f3,#eceae7);
  border:1px solid #e2dfdb;box-shadow:0 4px 16px rgba(0,0,0,.06);position:relative;
}
.bgm-thumb{font-size:22px;flex:none;}
.bgm-btn{
  width:36px;height:36px;border-radius:50%;border:0;background:#d82e2a;color:#fff;
  font-size:15px;cursor:pointer;display:flex;align-items:center;justify-content:center;flex:none;
  transition:.15s;
}
.bgm-btn:hover{background:#a81f1c;}
.bgm-btn[data-act='toggle']{width:44px;height:44px;font-size:17px;}
.bgm-info{flex:1;min-width:0;}
.bgm-name{font-size:13px;font-weight:700;color:#333;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-bottom:4px;}
.bgm-track{display:flex;align-items:center;gap:8px;}
.bgm-seek{flex:1;height:6px;-webkit-appearance:none;appearance:none;border-radius:3px;background:#d8d4cf;outline:none;cursor:pointer;}
.bgm-seek::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;background:#d82e2a;cursor:pointer;}
.bgm-time{font-size:11px;color:#888;font-variant-numeric:tabular-nums;white-space:nowrap;}

@media(max-width:600px){
  .bgm-player{flex-wrap:wrap;padding:12px 16px;border-radius:22px;}
}

/* Mermaid 容器 */
#main-content .mermaid-host,
.article__content svg.mermaid{max-width:100%;}
.article__content pre{background:#1e1e1e;color:#eee;padding:12px 14px;border-radius:8px;overflow:auto;font-size:14px;}
.article__content code.language-mermaid svg{max-width:100%;height:auto;background:#fff;border-radius:8px;}

/* ============ 首页大图轮转（淡入淡出） ============ */

.hero__dots{position:absolute;bottom:96px;left:0;right:0;z-index:4;display:flex;justify-content:center;gap:8px;}
.hero__dots .dot{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.5);cursor:pointer;transition:.2s;}
.hero__dots .dot.active{background:#fff;width:20px;border-radius:4px;}
/* ============ 全屏搜索覆盖层 ============ */
.search-overlay{position:fixed;inset:0;z-index:2000;background:rgba(8,6,6,.5);backdrop-filter:blur(6px);display:none;flex-direction:column;align-items:center;padding:12vh 20px 20px;}
.search-overlay.show{display:flex;}
.search-overlay .search-box{width:min(640px,92%);display:flex;align-items:center;gap:10px;background:#fff;border-radius:999px;padding:12px 20px;box-shadow:0 18px 50px rgba(0,0,0,.3);}
.search-box input{flex:1;border:0;outline:0;font-size:18px;font-weight:600;background:transparent;color:#222;}
.search-x{cursor:pointer;font-size:20px;color:#999;}
.search-x:hover{color:#d82e2a;}
.search-results{width:min(640px,92%);margin-top:14px;max-height:60vh;overflow:auto;}
.search-results a{display:flex;gap:14px;align-items:center;background:#fff;border-radius:12px;padding:12px 16px;margin-bottom:8px;box-shadow:0 6px 22px rgba(0,0,0,.12);transition:.15s;}
.search-results a:hover{transform:translateY(-2px);border:1px solid #d82e2a;}
.search-results img{width:56px;height:44px;object-fit:cover;border-radius:6px;flex:none;}
.search-results .st{font-weight:700;color:#222;}
.search-results .st small{display:block;font-weight:600;color:#d82e2a;font-size:12px;}
.search-results .snone{color:#eee;text-align:center;padding:20px;background:rgba(255,255,255,.1);border-radius:12px;}

/* ============ 浅色毛玻璃导航（Bug修复：白底黑字可读） ============ */
.site-header,
.site-header .nav {
  background: rgba(255,255,255,.42) !important;
  backdrop-filter: blur(26px) saturate(190%);
  -webkit-backdrop-filter: blur(26px) saturate(190%);
  border-bottom: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 4px 22px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.55);
}
.site-header .brand span,
.site-header .menu a,
.site-header .menu a:visited,
.site-header .brand,
.site-header .nav a { color: #20242b !important; }
.site-header .brand svg { stroke: var(--accent) !important; }
.site-header .menu a:hover { color: var(--accent) !important; }
.site-header .search svg { stroke: #20242b !important; }
.site-header .burger span { background: #20242b !important; }
.site-header .menu .caret { color: #8a8a8f !important; }
.site-header .dropdown a { color: #333; }
.site-header .pin--new, .pin--hot { color: #fff; }
/* ============ 首页大图轮转（重写：双层淡入淡出，最稳妥） ============ */
.hero-slider{position:relative;overflow:hidden;min-height:720px;display:block;background:#111;}
.hero-slider .hero-bg{position:absolute;inset:0;background-color:#111;
  background-size:cover;background-position:center center;background-repeat:no-repeat;
  opacity:0;transition:opacity .9s ease;}
.hero-slider .hero-bg.on{opacity:1;}
.hero-slider .hero-copy{position:absolute;inset:0;z-index:5;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(90deg, rgba(0,0,0,.52) 0%, rgba(0,0,0,.20) 42%, rgba(0,0,0,0) 68%);}
.hero-slider .hero-copy .copy-inner{max-width:var(--maxw);width:100%;padding:0 20px;}
.hero-slider .hero__headline a{color:#fff;text-shadow:0 2px 12px rgba(0,0,0,.8),0 1px 3px rgba(0,0,0,.6);}
.hero-slider .hero__meta{color:rgba(255,255,255,.92);}
.hero-slider .hero__meta .meta-author,.hero-slider .hero__meta .meta-cat{color:#fff;text-shadow:0 1px 6px rgba(0,0,0,.7);}
@media(max-width:720px){ .hero-slider{min-height:560px;} }
/* BGM 播放器图标（线性/描边风格，替换 emoji） */
.bgm-thumb{display:flex;align-items:center;justify-content:center;color:#d82e2a;}
.bgm-thumb svg{width:22px;height:22px;}
.bgm-btn{display:flex;align-items:center;justify-content:center;padding:0;}
.bgm-btn svg{width:20px;height:20px;display:block;}
.bgm-btn[data-act="toggle"] svg{width:18px;height:18px;}
.ic-pause{display:none;}
.bgm-player.is-playing .ic-play{display:none;}
.bgm-player.is-playing .ic-pause{display:block;}
/* 快退/快进：更轻的幽灵按钮，避免突兀 */
.bgm-btn[data-act="rwd"],.bgm-btn[data-act="fwd"]{
  width:34px;height:34px;background:transparent;color:#b3271f;border:1px solid rgba(216,46,42,.35);
}
.bgm-btn[data-act="rwd"]:hover,.bgm-btn[data-act="fwd"]:hover{background:rgba(216,46,42,.10);color:#a81f1c;}
/* ============ 文章标签 ============ */
.article-tags{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px;}
.article-tags .tag{font-size:12.5px;padding:4px 11px;border-radius:999px;text-decoration:none;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.35);color:#fff;transition:opacity .18s;}
.article-tags .tag:hover{opacity:.82;}
.widget .tags .tag em{font-style:normal;opacity:.75;font-size:11px;margin-left:3px;}
.widget .tags .tag{text-decoration:none;}

