/* =========================================================
   拾光笔记 · 样式表
   深色底 + 毛玻璃卡片 + 青绿/靛蓝渐变点缀
   ========================================================= */

:root {
    --ink: #e8eef6;
    --ink-soft: #c3ccda;
    --muted: #93a0b2;
    --bg: #080b10;
    --card: rgba(17, 22, 30, 0.72);
    --card-solid: #12171f;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #5eead4;
    --accent-2: #8b95ff;
    --accent-soft: rgba(94, 234, 212, 0.12);
    --danger: #ff7b8a;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
    --font-serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
    --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- 背景 ---------- */

.bg-layer {
    position: fixed;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    transform: scale(1.04);
    filter: saturate(0.9) brightness(0.55) blur(1px);
    z-index: -2;
    animation: bgIn 1.6s ease both;
}

@keyframes bgIn {
    from { opacity: 0; transform: scale(1.1); }
    to { opacity: 1; transform: scale(1.04); }
}

.bg-veil {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(1200px 600px at 15% -10%, rgba(94, 234, 212, 0.10), transparent 60%),
        radial-gradient(900px 520px at 88% 8%, rgba(139, 149, 255, 0.12), transparent 62%),
        linear-gradient(180deg, rgba(6, 9, 14, 0.62) 0%, rgba(6, 9, 14, 0.80) 45%, rgba(5, 7, 11, 0.92) 100%);
}

a { color: var(--ink); text-decoration: none; transition: color .2s ease, opacity .2s ease; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
p { margin: 0 0 1.1em; }

.wrap {
    width: min(var(--maxw), calc(100% - 48px));
    margin: 0 auto;
}

.main { padding-bottom: 80px; }

.muted { color: var(--muted); font-size: 13px; }
.center { justify-content: center; }

/* ---------- 顶部导航 ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    background: rgba(8, 11, 16, 0.62);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 66px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 17px;
    letter-spacing: .5px;
    color: var(--ink);
    flex-shrink: 0;
}

.brand-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 14px rgba(94, 234, 212, 0.8);
}

.nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
}

.nav a {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--ink-soft);
}

.nav a:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.nav a.active { color: var(--accent); background: var(--accent-soft); }
.nav a.nav-admin { color: #ffd479; }

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    color: var(--ink-soft);
}

.user-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.user-chip .user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font-size: 16px;
    padding: 4px 10px;
    cursor: pointer;
}

/* ---------- 通用部件 ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .2s ease;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06131a;
    box-shadow: 0 10px 26px rgba(94, 234, 212, 0.22);
}

.btn-primary:hover { color: #06131a; box-shadow: 0 14px 34px rgba(94, 234, 212, 0.32); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--line-strong);
    color: var(--ink);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); color: var(--ink); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(255, 123, 138, 0.14); border-color: rgba(255, 123, 138, 0.4); color: var(--danger); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-soft);
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.chip em { font-style: normal; font-size: 11px; color: var(--muted); }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on { background: var(--accent-soft); border-color: rgba(94, 234, 212, 0.45); color: var(--accent); }

.tag {
    font-size: 12px;
    color: var(--muted);
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.tag:hover { color: var(--accent); border-color: rgba(94, 234, 212, 0.35); }

.badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 5px;
    font-weight: 600;
    letter-spacing: .3px;
}

.badge-admin { background: rgba(255, 212, 121, 0.16); color: #ffd479; border: 1px solid rgba(255, 212, 121, 0.3); }

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(94, 234, 212, .28), rgba(139, 149, 255, .32));
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--ink);
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.avatar-xs { width: 24px; height: 24px; font-size: 12px; }
.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-md { width: 46px; height: 46px; font-size: 18px; }
.avatar-lg { width: 92px; height: 92px; font-size: 38px; letter-spacing: 2px; }

.flash {
    margin-top: 14px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.flash-ok { border-color: rgba(94, 234, 212, 0.35); background: rgba(94, 234, 212, 0.09); color: #b7fff2; }
.flash-warn { border-color: rgba(255, 212, 121, 0.35); background: rgba(255, 212, 121, 0.08); color: #ffe4a8; }
.flash-error { border-color: rgba(255, 123, 138, 0.35); background: rgba(255, 123, 138, 0.08); color: #ffc3ca; }

code {
    font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 6px;
    border-radius: 5px;
    color: #a7f3e6;
}

/* ---------- 首屏 ---------- */

.hero {
    text-align: center;
    padding: 84px 0 46px;
    animation: rise .9s ease both;
}

@keyframes rise {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero .avatar-lg {
    margin: 0 auto 22px;
    box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.03), 0 20px 50px rgba(0, 0, 0, 0.5);
    font-family: var(--font-serif);
}

.hero-kicker {
    font-size: 12px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: clamp(30px, 4.6vw, 48px);
    line-height: 1.3;
    margin: 0 0 18px;
    letter-spacing: 1px;
    background: linear-gradient(120deg, #ffffff 20%, #b8fff2 60%, #c9cfff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-text {
    max-width: 640px;
    margin: 0 auto 30px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.9;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 54px;
    margin: 32px 0 34px;
    flex-wrap: wrap;
}

.stat { text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: .5px; font-family: var(--font-serif); }
.stat span { font-size: 12px; color: var(--muted); letter-spacing: 1px; }

.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

/* ---------- 标签栏 ---------- */

.tag-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0 34px;
}

/* ---------- 布局 ---------- */

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.posts-col { min-width: 0; }

/* ---------- 置顶大卡 ---------- */

.post-featured {
    display: grid;
    grid-template-columns: 46% 1fr;
    gap: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 30px;
    backdrop-filter: blur(16px);
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}

.post-featured:hover {
    border-color: var(--line-strong);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.featured-cover { position: relative; overflow: hidden; min-height: 250px; }
.featured-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-featured:hover .featured-cover img { transform: scale(1.06); }

.pin-flag {
    position: absolute;
    top: 14px;
    left: 14px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(6, 10, 14, 0.72);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(8px);
    color: #ffe4a8;
}

.featured-body {
    padding: 30px 32px;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.post-featured h2 {
    font-family: var(--font-serif);
    font-size: 26px;
    line-height: 1.45;
    margin: 0 0 14px;
    font-weight: 600;
}

.post-featured h2 a { color: var(--ink); }
.post-featured h2 a:hover { color: var(--accent); }

.featured-excerpt { color: var(--ink-soft); font-size: 14.5px; line-height: 1.85; }

.post-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 16px;
}

.post-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.read-more { font-size: 13px; color: var(--accent); white-space: nowrap; }

/* ---------- 文章卡 ---------- */

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(16px);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
    animation: rise .7s ease both;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow);
}

.card-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0d1319; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.post-card:hover .card-cover img { transform: scale(1.07); }

.card-body { padding: 20px 22px 18px; display: flex; flex-direction: column; flex: 1; }

.card-body h3 {
    font-family: var(--font-serif);
    font-size: 18px;
    line-height: 1.55;
    margin: 0 0 10px;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-body h3 a { color: var(--ink); }
.card-body h3 a:hover { color: var(--accent); }

.card-excerpt {
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.75;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
}

.more-row { text-align: center; margin-top: 34px; }

.empty-state {
    text-align: center;
    padding: 70px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.02);
}

.empty-state h2 { font-size: 40px; color: var(--ink); margin: 0 0 8px; font-family: var(--font-serif); }

/* ---------- 侧栏 ---------- */

.aside { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 88px; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    backdrop-filter: blur(16px);
}

.panel-head {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--muted);
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-head::before {
    content: "";
    width: 14px;
    height: 1px;
    background: var(--accent);
}

.about-mini { display: flex; gap: 12px; align-items: flex-start; }
.about-mini strong { display: block; font-size: 15px; margin-bottom: 4px; }
.about-mini p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.7; }
.panel-link { display: inline-block; margin-top: 12px; font-size: 13px; color: var(--accent); }

.hot-list { list-style: none; margin: 0; padding: 0; }
.hot-list li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); font-size: 13.5px; line-height: 1.5; }
.hot-list li:last-child { border-bottom: 0; }
.hot-num { font-family: var(--font-serif); color: var(--accent); font-size: 13px; opacity: .8; }
.hot-list a { color: var(--ink-soft); }
.hot-list a:hover { color: var(--accent); }

.comment-mini { list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.comment-mini li { padding: 8px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); line-height: 1.6; }
.comment-mini li:last-child { border-bottom: 0; }
.comment-mini strong { color: var(--ink-soft); font-weight: 600; }
.comment-mini .muted { display: block; margin-top: 2px; }

.panel-text { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.8; }
.panel-text a { color: var(--accent); }

/* ---------- 文章页 ---------- */

.article {
    max-width: 780px;
    margin: 0 auto;
    padding-top: 56px;
}

.article-head { text-align: center; margin-bottom: 34px; }

.article-title {
    font-family: var(--font-serif);
    font-size: clamp(26px, 3.6vw, 38px);
    line-height: 1.45;
    margin: 18px 0 18px;
    letter-spacing: .5px;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--muted);
    flex-wrap: wrap;
}

.edit-link { color: var(--accent); margin-left: 6px; }

.article-cover {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.article-cover img { width: 100%; max-height: 420px; object-fit: cover; }

.article-body {
    font-size: 16.5px;
    line-height: 2;
    color: #dbe4ef;
}

.article-body p { margin: 0 0 1.35em; }
.article-body h2 { font-family: var(--font-serif); font-size: 24px; margin: 2em 0 .8em; color: #fff; }
.article-body h3 { font-family: var(--font-serif); font-size: 20px; margin: 1.7em 0 .7em; color: #fff; }
.article-body h4 { font-size: 17px; margin: 1.5em 0 .6em; color: #fff; }

.article-body ul, .article-body ol { padding-left: 1.4em; margin: 0 0 1.4em; }
.article-body li { margin-bottom: .5em; }
.article-body li::marker { color: var(--accent); }

.article-body strong { color: #fff; font-weight: 600; }

.code-block {
    background: #0b1016;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    overflow-x: auto;
    margin: 0 0 1.6em;
    position: relative;
}

.code-block::before {
    content: "CODE";
    position: absolute;
    top: 8px;
    right: 14px;
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.18);
}

.code-block code {
    background: none;
    padding: 0;
    font-size: 13.5px;
    line-height: 1.7;
    color: #b9f5e9;
    white-space: pre;
}

.article-end { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 6px; margin: 50px 0 34px; }

.post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 60px;
}

.post-nav a {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.03);
    font-size: 14px;
}

.post-nav a:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.06); }
.post-nav small { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.nav-next { text-align: right; }

.section-title {
    font-family: var(--font-serif);
    font-size: 20px;
    margin: 0 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title em { font-style: normal; font-size: 13px; color: var(--accent); }

.related { max-width: 780px; margin: 0 auto 48px; }

.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.related-item {
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    font-size: 13px;
    color: var(--ink-soft);
}

.related-item img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.related-item span { display: block; padding: 10px 12px; line-height: 1.5; }
.related-item:hover { border-color: var(--line-strong); color: var(--accent); }

/* ---------- 评论 ---------- */

.comments { max-width: 780px; margin: 0 auto 40px; }

.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }

.comment {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
}

.comment-main { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 14px; }
.comment-head .muted { margin-left: auto; }
.comment-main p { margin: 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.8; }

.comment-form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
}

.comment-form-head { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); margin-bottom: 12px; }
.comment-form-head strong { color: var(--ink); }

textarea, input[type="text"], input[type="password"], input[type="file"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--ink);
    font-family: inherit;
    font-size: 14.5px;
    line-height: 1.7;
    outline: none;
    transition: border-color .2s ease, background .2s ease;
}

textarea:focus, input:focus { border-color: rgba(94, 234, 212, 0.5); background: rgba(0, 0, 0, 0.4); }
textarea { resize: vertical; }

.comment-form-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }

.login-cta {
    text-align: center;
    padding: 34px 20px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.login-cta p { color: var(--muted); font-size: 14px; }

/* ---------- 归档 ---------- */

.page-head { padding: 64px 0 34px; text-align: center; }
.kicker { font-size: 11px; letter-spacing: 5px; color: var(--accent); margin: 0 0 10px; }
.page-head h1 { font-family: var(--font-serif); font-size: clamp(26px, 3.4vw, 38px); margin: 0 0 12px; }
.page-head p { color: var(--muted); font-size: 14px; margin: 0; }

.timeline { max-width: 820px; margin: 0 auto; }

.tl-year { display: flex; align-items: center; gap: 16px; margin: 30px 0 12px; }
.tl-year span {
    font-family: var(--font-serif);
    font-size: 26px;
    color: var(--accent);
    letter-spacing: 1px;
}
.tl-year::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tl-item {
    display: flex;
    gap: 18px;
    padding: 14px 0 14px 4px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    align-items: baseline;
}

.tl-date { font-size: 12.5px; color: var(--muted); width: 62px; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.tl-title { flex: 1; font-size: 15.5px; }
.tl-title a { color: var(--ink-soft); }
.tl-item:hover .tl-title a { color: var(--accent); }
.tl-tags { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---------- 关于页 ---------- */

.about-page { max-width: 860px; margin: 0 auto; }

.about-hero { text-align: center; padding: 20px 0 46px; }
.about-hero .avatar-lg { margin: 0 auto 20px; font-family: var(--font-serif); }
.about-hero h1 { font-family: var(--font-serif); font-size: clamp(26px, 3.6vw, 36px); margin: 0 0 14px; }
.about-hero p { color: var(--ink-soft); max-width: 620px; margin: 0 auto; font-size: 15px; line-height: 1.9; }

.about-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 44px; }

.about-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    backdrop-filter: blur(14px);
}

.about-card h3 { margin: 0 0 10px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.about-card p { font-size: 13.5px; color: var(--muted); margin: 0; line-height: 1.8; }

.skill-row { margin-bottom: 14px; }
.skill-row .skill-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--ink-soft); }
.bar { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

.about-section-title { font-family: var(--font-serif); font-size: 20px; margin: 40px 0 18px; }

.timeline-life { list-style: none; padding: 0; margin: 0; }
.timeline-life li {
    position: relative;
    padding: 0 0 22px 26px;
    border-left: 1px solid var(--line);
    font-size: 14px;
    color: var(--ink-soft);
}
.timeline-life li::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 12px rgba(94, 234, 212, 0.7);
}
.timeline-life b { display: block; color: var(--accent); font-size: 12px; letter-spacing: 1px; margin-bottom: 2px; }

/* ---------- 登录 ---------- */

.login-wrap { min-height: calc(100vh - 220px); display: flex; align-items: center; justify-content: center; padding: 50px 0; }

.login-card {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    width: min(880px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    overflow: hidden;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    animation: rise .7s ease both;
}

.login-side {
    padding: 40px 34px;
    background:
        radial-gradient(400px 300px at 20% 10%, rgba(94, 234, 212, 0.16), transparent 65%),
        radial-gradient(400px 300px at 90% 90%, rgba(139, 149, 255, 0.16), transparent 65%),
        rgba(255, 255, 255, 0.02);
    border-right: 1px solid var(--line);
}

.login-logo { font-size: 34px; margin-bottom: 12px; }
.login-side h2 { font-family: var(--font-serif); font-size: 24px; margin: 0 0 8px; }
.login-side > .login-side-inner > p { color: var(--muted); font-size: 13.5px; }

.login-points { list-style: none; padding: 0; margin: 26px 0 0; font-size: 13px; color: var(--ink-soft); }
.login-points li { position: relative; padding-left: 18px; margin-bottom: 12px; line-height: 1.7; }
.login-points li::before { content: "›"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

.login-main { padding: 44px 40px; }
.login-main h1 { font-family: var(--font-serif); font-size: 26px; margin: 0 0 6px; }
.login-main > .muted { margin-bottom: 26px; display: block; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.field { display: block; }
.field > span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; letter-spacing: .5px; }
.field small { color: rgba(255, 255, 255, 0.28); }

.quick-row { display: flex; gap: 8px; flex-wrap: wrap; }
.login-foot { margin: 18px 0 0; text-align: center; }

/* ---------- 后台 ---------- */

.admin-page { padding-top: 40px; }

.admin-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}

.admin-head h1 { font-family: var(--font-serif); font-size: 30px; margin: 0 0 6px; }
.admin-head p { color: var(--muted); font-size: 13.5px; margin: 0; }

.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.admin-tabs a {
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 13.5px;
    color: var(--ink-soft);
    border: 1px solid transparent;
}
.admin-tabs a:hover { background: rgba(255, 255, 255, 0.06); color: var(--ink); }
.admin-tabs a.on { background: var(--accent-soft); color: var(--accent); border-color: rgba(94, 234, 212, 0.35); }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }

.editor {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px 28px;
    backdrop-filter: blur(16px);
}

.editor h2 { font-size: 17px; margin: 0 0 20px; display: flex; align-items: center; gap: 8px; }

.form-row { margin-bottom: 18px; }
.form-row > label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; letter-spacing: .5px; }
.form-hint { font-size: 12px; color: rgba(255, 255, 255, 0.32); margin-top: 6px; }

.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

#contentInput { min-height: 320px; font-family: "JetBrains Mono", Consolas, var(--font); font-size: 14px; }

.upload-box {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
}

.preview { margin-top: 12px; }
.preview img { max-height: 180px; border-radius: 10px; border: 1px solid var(--line); }

.editor-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; }

.side-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    backdrop-filter: blur(16px);
    margin-bottom: 20px;
}

.side-card h3 { font-size: 14px; margin: 0 0 14px; color: var(--ink-soft); }
.side-card ul { list-style: none; padding: 0; margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.side-card li { padding: 3px 0; }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left;
    font-weight: 500;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 1px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 12px; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); vertical-align: middle; }
.table tr:hover td { background: rgba(255, 255, 255, 0.025); }
.table .actions { display: flex; gap: 10px; white-space: nowrap; }
.table .actions a { font-size: 12.5px; color: var(--muted); }
.table .actions a:hover { color: var(--accent); }
.table .actions button { background: none; border: 0; color: rgba(255, 123, 138, .8); font-size: 12.5px; cursor: pointer; font-family: inherit; padding: 0; }
.table .actions button:hover { color: var(--danger); }

.thumb-sm { width: 54px; height: 38px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    backdrop-filter: blur(12px);
}

.stat-card b { display: block; font-size: 24px; font-family: var(--font-serif); }
.stat-card span { font-size: 12px; color: var(--muted); }

.admin-note { font-size: 12.5px; color: var(--muted); margin-top: 10px; }

/* ---------- 聊天室整页 ---------- */

.chat-page { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }

.chat-page-main {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    backdrop-filter: blur(16px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: min(70vh, 640px);
}

.chat-page-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 22px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.8);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .35; }
}

.push-right { margin-left: auto; }

.chat-page-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scroll-behavior: smooth;
}

.bubble-row { display: flex; gap: 10px; align-items: flex-start; }
.bubble-row.mine { flex-direction: row-reverse; }
.bubble-wrap { max-width: 74%; }
.bubble-row.mine .bubble-wrap { text-align: right; }

.bubble-head { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.bubble-row.mine .bubble-head { justify-content: flex-end; }
.bubble-head strong { color: var(--ink-soft); font-weight: 600; font-size: 12.5px; }

.bubble {
    position: relative;
    display: inline-block;
    text-align: left;
    padding: 10px 15px;
    border-radius: 4px 14px 14px 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--line);
    font-size: 14px;
    line-height: 1.75;
    color: var(--ink);
    word-break: break-word;
}

.bubble-row.mine .bubble {
    border-radius: 14px 4px 14px 14px;
    background: linear-gradient(135deg, rgba(94, 234, 212, 0.18), rgba(139, 149, 255, 0.18));
    border-color: rgba(94, 234, 212, 0.28);
}

.bubble-del {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid var(--line-strong);
    background: #1a2029;
    color: var(--muted);
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s ease;
}

.bubble:hover .bubble-del { opacity: 1; }
.bubble-del:hover { color: var(--danger); border-color: var(--danger); }

.chat-empty { margin: auto; color: var(--muted); font-size: 13.5px; }

.typing-line { min-height: 20px; padding: 0 22px; font-size: 12px; color: var(--muted); }

.chat-page-form { display: flex; gap: 10px; padding: 12px 18px 6px; border-top: 1px solid var(--line); }
.chat-page-form input { flex: 1; }
.chat-page-form .btn { padding: 10px 22px; }
.chat-tip { padding: 0 18px 14px; margin: 6px 0 0; font-size: 12px; }

.people-list { list-style: none; margin: 0; padding: 0; }
.people-list li { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--ink-soft); padding: 6px 0; }

.rule-list { margin: 0; padding-left: 16px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.rule-list li::marker { color: rgba(94, 234, 212, .6); }

/* ---------- 悬浮聊天框 ---------- */

.chat-widget { position: fixed; right: 26px; bottom: 26px; z-index: 90; }

.chat-toggle {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06131a;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 14px 34px rgba(94, 234, 212, 0.28);
    transition: transform .25s ease, box-shadow .25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 18px 40px rgba(94, 234, 212, 0.38); }
.chat-widget.open .chat-toggle { transform: scale(.92); }

.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ff5c72;
    color: #fff;
    font-size: 11px;
    line-height: 20px;
    padding: 0 5px;
    font-weight: 700;
}

.chat-panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 460px;
    display: flex;
    flex-direction: column;
    background: rgba(13, 18, 25, 0.94);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(24px);
    overflow: hidden;
    transform-origin: bottom right;
    animation: popIn .22s ease both;
}

@keyframes popIn {
    from { opacity: 0; transform: scale(.94) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.chat-head strong { display: block; font-size: 14px; }
.chat-head small { font-size: 11.5px; color: var(--muted); }

.chat-close {
    background: none;
    border: 0;
    color: var(--muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.chat-close:hover { color: var(--ink); }

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-body .bubble-wrap { max-width: 80%; }
.chat-body .bubble { font-size: 13.5px; padding: 8px 12px; }

.chat-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; padding: 9px 12px; font-size: 13.5px; }

.chat-send {
    border: 0;
    border-radius: 10px;
    padding: 0 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #06131a;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}

.chat-hint { font-size: 11px; color: var(--muted); padding: 0 14px 10px; }
.chat-hint a { color: var(--accent); }

/* ---------- 页脚 ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(5, 8, 12, 0.55);
    backdrop-filter: blur(14px);
    padding: 40px 0 34px;
}

.footer-inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-serif); font-size: 18px; margin-bottom: 8px; }
.footer-desc { font-size: 13px; color: var(--muted); margin: 0; max-width: 340px; }
.footer-right { text-align: right; }
.footer-links { display: flex; gap: 18px; justify-content: flex-end; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--accent); }
.footer-meta { font-size: 12px; color: rgba(255, 255, 255, 0.28); margin: 0; }

/* ---------- 滚动条 ---------- */

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.13); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
    .layout, .chat-page, .admin-grid { grid-template-columns: 1fr; }
    .aside { position: static; display: grid; grid-template-columns: repeat(2, 1fr); }
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .about-cards { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .wrap { width: calc(100% - 32px); }
    .nav {
        position: absolute;
        top: 66px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px 16px 16px;
        background: rgba(10, 14, 20, 0.98);
        border-bottom: 1px solid var(--line);
        display: none;
    }
    .nav.open { display: flex; }
    .nav a { padding: 10px 12px; border-radius: 10px; }
    .nav-toggle { display: block; }
    .post-featured { grid-template-columns: 1fr; }
    .featured-cover { min-height: 190px; }
    .post-grid { grid-template-columns: 1fr; }
    .aside { grid-template-columns: 1fr; }
    .hero { padding: 54px 0 30px; }
    .hero-stats { gap: 30px; }
    .article { padding-top: 34px; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .post-nav { grid-template-columns: 1fr; }
    .login-card { grid-template-columns: 1fr; }
    .login-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 28px; }
    .login-main { padding: 30px 26px; }
    .form-two { grid-template-columns: 1fr; }
    .stat-cards { grid-template-columns: 1fr 1fr; }
    .footer-inner { flex-direction: column; }
    .footer-right { text-align: left; }
    .footer-links { justify-content: flex-start; }
    .chat-widget { right: 16px; bottom: 16px; }
    .chat-panel { width: calc(100vw - 32px); height: 70vh; }
    .table .thumb-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
/* ---------- 正文插图 ---------- */
.post-image { margin: 2em 0; }
.post-image img {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}
.post-image figcaption {
    text-align: center;
    font-size: 12.5px;
    color: var(--muted);
    margin-top: 10px;
}

.avatar.has-img { padding: 0; background: #0d1319; }
.avatar.has-img img { width: 100%; height: 100%; object-fit: cover; }

/* hidden 属性优先级修正（避免被 display:flex 覆盖） */
[hidden] { display: none !important; }

/* ---------- 表单控件细节 ---------- */
input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #5eead4;
    cursor: pointer;
}

input[type="file"] {
    padding: 8px 10px;
    font-size: 12.5px;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 6px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .2s ease;
}

input[type="file"]::file-selector-button:hover {
    background: rgba(94, 234, 212, 0.16);
    color: var(--accent);
}

select {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
}

/* 聊天室整页时不再显示右下角悬浮按钮，避免遮挡输入框 */
body.page-chat .chat-widget { display: none; }

/* ---------- 验证码输入行 ---------- */
.code-row { display: flex; gap: 10px; align-items: stretch; }
.code-row input { flex: 1; letter-spacing: 3px; }
.code-row .btn { white-space: nowrap; padding: 0 16px; }
.code-row .btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.code-msg {
    display: block;
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.6;
}
.code-msg.is-ok { color: #7ff0dc; }
.code-msg.is-error { color: var(--danger); }

.mail-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
}
.mail-status.ok { color: #7ff0dc; border-color: rgba(94,234,212,.35); background: rgba(94,234,212,.08); }
.mail-status.fail { color: var(--danger); border-color: rgba(255,123,138,.35); background: rgba(255,123,138,.08); }

.mail-code {
    font-family: Consolas, monospace;
    letter-spacing: 2px;
    color: var(--accent);
}
