/* XBH Theme - Glass Morphism */
*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Inter','Noto Sans SC',sans-serif;min-height:100vh;background:linear-gradient(135deg,#f9fafb 0%,#f0fdf4 50%,#d1fae5 100%);background-attachment:fixed}
.glass{background:rgba(255,255,255,.45);backdrop-filter:blur(16px) saturate(180%);-webkit-backdrop-filter:blur(16px) saturate(180%);border:1px solid rgba(255,255,255,.65);box-shadow:0 4px 24px rgba(0,0,0,.06)}
html.dark .glass{background:rgba(8,15,30,.82)!important;backdrop-filter:blur(24px) saturate(220%)!important;-webkit-backdrop-filter:blur(24px) saturate(220%)!important;border-color:rgba(148,163,184,.12)!important;box-shadow:0 8px 32px rgba(0,0,0,.6),inset 0 1px 0 rgba(255,255,255,.06)!important}
.nav-item:hover{background:rgba(20,184,166,.12)}
.nav-item.active{background:rgba(20,184,166,.18)}
.nav-item.active span{color:#0d9488;font-weight:600}
.nav-item.active svg{color:#0d9488}
.btn-h{transition:all .18s ease}
.btn-h:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.15)}
/* Post content typography */
.post-content h1,.post-content h2,.post-content h3,.post-content h4{color:#1e293b;font-weight:700;margin:1.5em 0 .6em}
.post-content h1{font-size:1.6rem;border-bottom:2px solid rgba(20,184,166,.3);padding-bottom:.4em}
.post-content h2{font-size:1.3rem;border-left:3px solid #14b8a6;padding-left:.6em}
.post-content h3{font-size:1.1rem}
.post-content p{color:#374151;line-height:1.8;margin:.8em 0}
.post-content a{color:#0d9488;text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;transition:color .15s}
.post-content a:hover{color:#0f766e}
.post-content code{background:rgba(20,184,166,.12);color:#0d6b61;padding:2px 7px;border-radius:4px;font-size:.85em;font-weight:500;font-family:'JetBrains Mono','Fira Code',monospace}
.post-content pre{background:#1e293b;border-radius:12px;padding:1.2em;overflow-x:auto;margin:1em 0}
.post-content pre code{background:none;color:#e2e8f0;font-size:.88em;padding:0}
.post-content blockquote{border-left:3px solid #14b8a6;background:rgba(20,184,166,.06);padding:.8em 1.2em;border-radius:0 8px 8px 0;margin:1em 0;color:#475569;font-style:italic}
.post-content img{max-width:100%;border-radius:12px;margin:.8em 0}
.post-content ul,.post-content ol{padding-left:1.5em;color:#374151;line-height:1.8}
.post-content li{margin:.3em 0}
.post-content table{width:100%;border-collapse:collapse;margin:1em 0;font-size:.9em}
.post-content th{background:rgba(20,184,166,.15);color:#0f766e;padding:.6em 1em;text-align:left;font-weight:600}
.post-content td{padding:.6em 1em;border-bottom:1px solid rgba(0,0,0,.06)}
.post-content tr:hover td{background:rgba(255,255,255,.5)}
.post-content hr{border:none;border-top:1px solid rgba(20,184,166,.2);margin:2em 0}
.tag-pill{display:inline-block;padding:2px 10px;border-radius:999px;font-size:.72rem;font-weight:600}
.post-card:hover{transform:translateY(-2px);box-shadow:0 12px 32px rgba(0,0,0,.1)}
.post-card{transition:all .2s ease}
/* Hexo highlight.js code block - Mac style */
.post-content figure.highlight{background:#1a1e2e;border-radius:14px;margin:1.2em 0;overflow:hidden;box-shadow:0 8px 32px rgba(0,0,0,.25);position:relative}
.post-content figure.highlight::before{content:'';display:block;background:#2a2f45;padding:.65em 1em .65em 1em;border-bottom:1px solid rgba(255,255,255,.06)}
.post-content figure.highlight::after{content:'';position:absolute;top:.55em;left:1em;width:12px;height:12px;border-radius:50%;background:#ff5f57;box-shadow:20px 0 0 #febc2e,40px 0 0 #28c840;pointer-events:none}
.post-content figure.highlight table{width:100%;border-collapse:collapse;margin:0}
.post-content figure.highlight td{padding:0;border:none;vertical-align:top}
.post-content figure.highlight td.gutter{width:46px;background:rgba(255,255,255,.03);text-align:right;user-select:none;padding:.9em .8em;border-right:1px solid rgba(255,255,255,.06)}
.post-content figure.highlight td.gutter .line{color:#3d4466;font-size:.8em;line-height:1.8;font-family:'JetBrains Mono',monospace}
.post-content figure.highlight td.code{padding:.9em 1.3em}
.post-content figure.highlight td.code pre{background:none;padding:0;margin:0;border-radius:0;overflow-x:auto}
.post-content figure.highlight td.code .line{color:#cdd6f4;line-height:1.8;display:block;white-space:pre;font-family:'JetBrains Mono',monospace;font-size:.88em}
.post-content figure.highlight .comment{color:#6c7086;font-style:italic}
.post-content figure.highlight .string{color:#a6e3a1}
.post-content figure.highlight .keyword{color:#89dceb}
.post-content figure.highlight .built_in{color:#fab387}
.post-content figure.highlight .number{color:#f38ba8}
.post-content figure.highlight .attr{color:#89b4fa}
.post-content figure.highlight .title{color:#cba6f7}
.post-content figure.highlight .variable{color:#f2cdcd}
.post-content figure.highlight figcaption{display:flex;align-items:center;background:rgba(255,255,255,.04);padding:.3em 1em;color:#6c7086;font-size:.72em;font-family:'JetBrains Mono',monospace;border-bottom:1px solid rgba(255,255,255,.06)}
/* 覆盖 pre 的旧样式避免冲突 */
.post-content figure.highlight pre{background:none!important;padding:0!important;margin:0!important;border-radius:0!important;box-shadow:none!important}
.post-content figure.highlight code{background:none!important;color:inherit!important;padding:0!important;border-radius:0!important;font-size:inherit!important}
/* 防止 Tailwind/浏览器默认 hover 变白 */
.post-content figure.highlight tr:hover,.post-content figure.highlight tr:hover td,.post-content figure.highlight td:hover{background:transparent!important}
.post-content figure.highlight *{transition:none!important}
/* 代码块复制按钮 */
.copy-btn{position:absolute;top:10px;right:10px;padding:3px 10px;font-size:11px;border-radius:6px;border:1px solid rgba(255,255,255,.2);background:rgba(255,255,255,.1);color:#94a3b8;cursor:pointer;transition:all .15s;font-family:'Inter',sans-serif}
.copy-btn:hover{background:rgba(20,184,166,.3);color:#5eead4;border-color:rgba(20,184,166,.4)}
.copy-btn.copied{background:rgba(20,184,166,.4);color:#5eead4}
/* 图片点击放大 */
.img-zoom-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:999;align-items:center;justify-content:center;cursor:zoom-out}
.img-zoom-overlay.open{display:flex}
.img-zoom-overlay img{max-width:90vw;max-height:90vh;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.5);object-fit:contain}
/* 全局美化 */
html{scroll-behavior:smooth}
::selection{background:rgba(20,184,166,.25);color:#0f766e}
html.dark ::selection{background:rgba(20,184,166,.35);color:#ccfbf1}
::-webkit-scrollbar{width:6px;height:6px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:rgba(20,184,166,.4);border-radius:99px}
::-webkit-scrollbar-thumb:hover{background:rgba(20,184,166,.7)}
.post-content img{transition:transform .2s ease,box-shadow .2s ease}
.post-content img:hover{transform:scale(1.02);box-shadow:0 12px 40px rgba(0,0,0,.18)}
.tag-pill{transition:transform .15s ease,box-shadow .15s ease}
.tag-pill:hover{transform:translateY(-1px);box-shadow:0 4px 12px rgba(0,0,0,.1)}
html.dark .tag-pill.bg-teal-100{background:rgba(20,184,166,.18)!important;color:#5eead4!important}
html.dark .tag-pill.bg-violet-100{background:rgba(139,92,246,.18)!important;color:#c4b5fd!important}
html.dark .tag-pill.bg-amber-100{background:rgba(245,158,11,.18)!important;color:#fcd34d!important}
html.dark .tag-pill.bg-rose-100{background:rgba(244,63,94,.18)!important;color:#fda4af!important}
html.dark .tag-pill.bg-sky-100{background:rgba(14,165,233,.18)!important;color:#7dd3fc!important}
html.dark .tag-pill.bg-emerald-100{background:rgba(16,185,129,.18)!important;color:#6ee7b7!important}
/* 暗色模式 - post-content */
html.dark body{background:linear-gradient(135deg,#0f172a 0%,#0d1f18 50%,#0a1f1a 100%)!important}
html.dark .post-content h1,html.dark .post-content h2,html.dark .post-content h3,html.dark .post-content h4{color:#e2e8f0}
html.dark .post-content p,html.dark .post-content ul,html.dark .post-content ol,html.dark .post-content li{color:#cbd5e1}
html.dark .post-content a{color:#5eead4}
html.dark .post-content a:hover{color:#99f6e4}
html.dark .post-content code{background:rgba(20,184,166,.15);color:#5eead4}
html.dark .post-content blockquote{background:rgba(20,184,166,.08);color:#94a3b8}
html.dark .post-content td{border-bottom-color:rgba(255,255,255,.06)}
html.dark .post-content tr:hover td{background:rgba(255,255,255,.04)!important}
html.dark .post-content th{background:rgba(20,184,166,.2);color:#5eead4}
html.dark .post-content hr{border-top-color:rgba(20,184,166,.25)}
html.dark .post-content h1{border-bottom-color:rgba(20,184,166,.25)}
/* 暗色模式 - archive */
.archive-post-link{color:#334155;text-decoration:none}
.archive-post-link:hover{color:#0d9488}
#archive-search{color:#1e293b}
html.dark #archive-search{color:#cbd5e1!important;background:rgba(15,23,42,.5)!important;border-color:rgba(148,163,184,.15)!important}
html.dark #archive-search::placeholder{color:#475569!important}
html.dark .archive-title{color:#e2e8f0!important}
html.dark .archive-year{color:#cbd5e1!important}
html.dark .archive-post-link{color:#cbd5e1!important}
html.dark .archive-post-link:hover{color:#5eead4!important}
/* 暗色模式 - dark-toggle-btn */
html.dark .dark-toggle-btn{background:rgba(30,41,59,.8)!important;border-color:rgba(148,163,184,.2)!important}
/* 响应式 */
@media(max-width:768px){
  .max-w-6xl.mx-auto{grid-template-columns:1fr!important;padding:0}
  body{padding:.75rem!important}
  .row-span-3{row-span:unset!important}
  [style*="position:sticky"]{position:relative!important;top:auto!important}
}
