/* ===========================================================================
   TECH BLOG · 科技风格设计系统
   深色玻璃态 / 渐变光晕 / 现代几何 / 微动效
   =========================================================================== */

:root {
    /* ===== 核心色板 ===== */
    --bg:           #07090f;
    --bg-2:         #0d1119;
    --surface:      rgba(22, 28, 42, 0.6);
    --surface-2:    rgba(28, 34, 50, 0.55);
    --surface-3:    rgba(35, 42, 60, 0.5);
    --fg:           #f1f5fb;
    --fg-2:         #cbd5e1;
    --fg-3:         #94a3b8;
    --muted:        #64748b;

    /* ===== 强调色 ===== */
    --accent:       #00d4ff;     /* 主色：电光蓝 */
    --accent-2:     #0ea5e9;
    --accent-3:     #38bdf8;
    --accent-soft:  rgba(0, 212, 255, 0.12);
    --accent-glow:  rgba(0, 212, 255, 0.4);
    --purple:       #a855f7;
    --pink:         #ec4899;
    --gradient-1:   linear-gradient(135deg, #00d4ff 0%, #a855f7 50%, #ec4899 100%);
    --gradient-2:   linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --gradient-3:   linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);

    /* ===== 边框 / 阴影 ===== */
    --border:       rgba(148, 163, 184, 0.1);
    --border-2:     rgba(148, 163, 184, 0.18);
    --border-glow:  rgba(0, 212, 255, 0.3);
    --shadow-sm:    0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow:       0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg:    0 24px 60px rgba(0, 0, 0, 0.5);
    --shadow-glow:  0 0 32px rgba(0, 212, 255, 0.25);

    /* ===== 圆角 ===== */
    --radius-sm:    8px;
    --radius:       14px;
    --radius-lg:    20px;
    --radius-xl:    28px;

    /* ===== 字体 ===== */
    --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue",
                    Helvetica, Arial, sans-serif;
    --font-mono:    "SF Mono", "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--fg);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

/* 全局背景：科技感网格 + 渐变光晕 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 0%, rgba(0, 212, 255, 0.15), transparent 50%),
        radial-gradient(circle at 80% 0%, rgba(168, 85, 247, 0.12), transparent 50%),
        radial-gradient(circle at 50% 100%, rgba(236, 72, 153, 0.08), transparent 50%);
    z-index: -2;
    pointer-events: none;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 80%);
}

a { color: var(--accent); text-decoration: none; transition: color 0.25s; }
a:hover { color: var(--accent-3); }

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HEADER (顶部品牌区)
   ============================================================ */
.site-header {
    background: rgba(7, 9, 15, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--fg);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--gradient-1);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    box-shadow: var(--shadow-glow);
    position: relative;
}
.brand-mark::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 14px;
    padding: 2px;
    background: var(--gradient-1);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.4;
}
.brand:hover { color: var(--fg); text-decoration: none; }

/* ============================================================
   NAV
   ============================================================ */
.site-nav {
    background: rgba(7, 9, 15, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 72px;
    z-index: 99;
}
.site-nav .container {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-wrap: wrap;
}
.site-nav a {
    color: var(--fg-2);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.site-nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
    text-decoration: none;
}
.site-nav .search-form {
    margin-left: auto;
    display: flex;
    gap: 8px;
}
.site-nav .search-form input {
    padding: 8px 16px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--fg);
    font: inherit;
    font-size: 14px;
    min-width: 220px;
    transition: all 0.2s;
}
.site-nav .search-form input::placeholder { color: var(--muted); }
.site-nav .search-form input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.site-nav .search-form button {
    padding: 8px 18px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
    border-radius: 999px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}
.site-nav .search-form button:hover {
    background: var(--accent);
    color: var(--bg);
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   HERO (首屏)
   ============================================================ */
.hero {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.18), transparent 60%),
        radial-gradient(circle at 70% 50%, rgba(168, 85, 247, 0.15), transparent 60%);
    z-index: -1;
}
.hero .container { text-align: center; position: relative; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: var(--surface-2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 13px;
    color: var(--accent-3);
    margin-bottom: 28px;
    font-weight: 500;
}
.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}
.hero h1 {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0 0 20px;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 40%, var(--purple) 70%, var(--pink) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
}
.hero p.subtitle {
    color: var(--fg-3);
    font-size: 20px;
    max-width: 680px;
    margin: 0 auto 36px;
    font-weight: 300;
}
.hero .stats {
    display: inline-flex;
    gap: 0;
    padding: 0;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.hero .stat-item {
    text-align: center;
    padding: 22px 36px;
    position: relative;
}
.hero .stat-item + .stat-item {
    border-left: 1px solid var(--border);
}
.hero .stat-item strong {
    display: block;
    font-size: 28px;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero .stat-item span {
    font-size: 13px;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 4px;
    display: block;
}

/* ============================================================
   MAIN GRID
   ============================================================ */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin: 60px auto;
}
@media (max-width: 900px) {
    .main-grid { grid-template-columns: 1fr; gap: 30px; }
    .hero h1 { font-size: 42px; }
}

.content h1.page-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.content h1.page-title::before {
    content: "";
    width: 4px;
    height: 28px;
    background: var(--gradient-1);
    border-radius: 2px;
}

/* ============================================================
   POST CARDS (文章卡片) · 全新设计
   ============================================================ */
.post-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 24px; }

/* 卡片本身 - 现代玻璃态 + 顶部装饰条 */
.post-card {
    position: relative;
    background: var(--surface);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 0;                     /* 内部由子元素管理 */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
}

/* 左侧渐变装饰条（默认隐藏，hover 显示） */
.post-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--purple) 50%, var(--pink) 100%);
    transform: scaleY(0);
    transform-origin: center;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

/* 右上角渐变光晕 */
.post-card::after {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.18), transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

/* 卡片整体可点击：用 .card-link 覆盖 */
.post-card .card-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    cursor: pointer;
}
.post-card .card-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: var(--radius-lg);
}

/* 卡片内所有内容 */
.post-card > *:not(.card-link) {
    position: relative;
    z-index: 2;
    pointer-events: none;          /* 透传点击到 .card-link */
}

/* 但文本仍可选中 */
.post-card .post-meta,
.post-card .post-excerpt,
.post-card .post-footer,
.post-card .read-more,
.post-card .post-meta a,
.post-card .post-footer a {
    pointer-events: auto;
}

/* 标题容器 - 内边距充足，与边框分离 */
.post-card .card-link {
    padding: 0;  /* .card-link 仍是 absolute，由 .post-card-header 控制视觉 */
}

/* 卡片头部（标题+分类徽章）*/
.post-card-header {
    padding: 28px 32px 18px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(0, 212, 255, 0.04) 0%, transparent 100%);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* 分类徽章 */
.post-card-header .category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(0, 212, 255, 0.25);
    color: var(--accent-3);
    font-size: 12px;
    font-weight: 600;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.post-card-header .category-badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
}

/* 标题 - 大字号、悬停变色 */
.post-card h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.45;
    color: var(--fg);
    transition: color 0.25s;
}
.post-card .card-link:hover ~ .post-card-header h2,
.post-card:hover h2 {
    color: var(--accent);
}

/* 中部：摘要 */
.post-card-body {
    padding: 18px 32px 4px;
    position: relative;
    z-index: 2;
}
.post-card .post-excerpt {
    color: var(--fg-3);
    margin: 0;
    font-size: 14.5px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 底部 meta */
.post-card-footer {
    padding: 16px 32px;
    margin-top: 14px;
    border-top: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}
.post-card .post-meta {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.post-card .post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.post-card .post-meta a {
    color: var(--fg-3);
    transition: color 0.2s;
}
.post-card .post-meta a:hover { color: var(--accent); }

/* "阅读全文" 按钮 */
.post-card .read-more {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
    white-space: nowrap;
}
.post-card:hover .read-more { gap: 10px; }

/* Hover 效果 */
.post-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow), var(--shadow-glow);
}
.post-card:hover::before { transform: scaleY(1); }
.post-card:hover::after { opacity: 1; }

/* 精选文章装饰 */
.post-card.is-featured::after {
    background: radial-gradient(circle, rgba(168, 85, 247, 0.25), transparent 70%);
}

/* 响应式 */
@media (max-width: 600px) {
    .post-card-header { padding: 22px 20px 14px; }
    .post-card-body { padding: 14px 20px 4px; }
    .post-card-footer { padding: 14px 20px; }
    .post-card h2 { font-size: 18px; }
    .post-card .post-excerpt { font-size: 13.5px; -webkit-line-clamp: 2; }
    .post-card .post-meta { gap: 10px; font-size: 12px; }
}

.post-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.4;
}
.post-card h2 a {
    color: var(--fg);
    transition: color 0.2s;
}
.post-card h2 a:hover { color: var(--accent); text-decoration: none; }

.post-card .post-excerpt {
    color: var(--fg-3);
    margin: 14px 0 18px;
    font-size: 15px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

.post-meta {
    color: var(--muted);
    font-size: 13px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.post-meta span { display: inline-flex; align-items: center; gap: 4px; }
.post-meta a { color: var(--fg-3); }
.post-meta a:hover { color: var(--accent); }

.read-more {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s;
}
.read-more:hover { gap: 10px; text-decoration: none; }

/* ============================================================
   POST DETAIL
   ============================================================ */
.post-detail {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xl);
    padding: 56px 64px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
@media (max-width: 700px) {
    .post-detail { padding: 32px 24px; }
}
.post-header { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px solid var(--border); }
.post-header h1 {
    margin: 0 0 18px;
    font-size: 38px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.3;
    background: linear-gradient(135deg, #fff 0%, var(--accent) 60%, var(--purple) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.post-content {
    margin-top: 28px;
    font-size: 17px;
    line-height: 1.9;
    color: var(--fg-2);
}
.post-content h2, .post-content h3, .post-content h4 {
    margin-top: 1.8em;
    margin-bottom: 0.7em;
    color: var(--fg);
    font-weight: 700;
    letter-spacing: -0.01em;
}
.post-content h2 {
    font-size: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    position: relative;
}
.post-content h2::before {
    content: "##";
    position: absolute;
    top: 18px;
    left: -32px;
    color: var(--accent);
    opacity: 0.4;
    font-family: var(--font-mono);
}
.post-content h3 { font-size: 22px; }
.post-content p { margin: 1.2em 0; }
.post-content img { max-width: 100%; border-radius: var(--radius); margin: 1.4em 0; }
.post-content blockquote {
    border-left: 3px solid var(--accent);
    margin: 1.4em 0;
    padding: 16px 20px;
    background: var(--accent-soft);
    color: var(--fg-2);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.post-content pre.code-block {
    background: linear-gradient(135deg, #0a0e1a 0%, #141829 100%);
    color: var(--fg);
    border-radius: var(--radius);
    padding: 20px 22px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.75;
    margin: 1.4em 0;
    position: relative;
    border: 1px solid var(--border-2);
}
.post-content pre.code-block::before {
    content: attr(data-lang);
    position: absolute;
    top: 10px; right: 14px;
    font-size: 11px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-sans);
    background: var(--accent-soft);
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: 600;
}
.post-content code.inline-code {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.9em;
    font-family: var(--font-mono);
    border: 1px solid rgba(0, 212, 255, 0.2);
}
.post-tags {
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid var(--border);
}

/* ============================================================
   TAGS
   ============================================================ */
.tag {
    display: inline-flex;
    align-items: center;
    background: var(--accent-soft);
    color: var(--accent-3);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    margin: 0 6px 8px 0;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transition: all 0.2s;
}
.tag:hover {
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    text-decoration: none;
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 150px;
    align-self: start;
}
.widget {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    box-shadow: var(--shadow-sm);
}
.widget h3 {
    margin: 0 0 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.widget h3::before {
    content: "";
    width: 16px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--border); }
.list-plain li:last-child { border-bottom: none; }
.list-plain li a {
    color: var(--fg-2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.list-plain li a:hover { color: var(--accent); text-decoration: none; }
.list-plain li a .muted {
    font-size: 12px;
    color: var(--muted);
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
}
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments { margin-top: 36px; }
.comments h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--fg);
}
.comment {
    border: 1px solid var(--border-2);
    background: var(--surface);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 16px 20px;
    margin-bottom: 14px;
}
.comment-meta { font-size: 13px; }
.muted { color: var(--fg-3); }
.comment-body { color: var(--fg-2); margin-top: 8px; line-height: 1.7; }

.comment-form {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-top: 18px;
}
.comment-form .row { display: flex; gap: 10px; }
.comment-form input,
.comment-form textarea {
    padding: 12px 16px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font: inherit;
    width: 100%;
    margin-top: 6px;
    background: var(--bg-2);
    color: var(--fg);
    transition: all 0.2s;
}
.comment-form input::placeholder,
.comment-form textarea::placeholder { color: var(--muted); }
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.comment-form button {
    margin-top: 14px;
    background: var(--gradient-2);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}
.comment-form button:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

/* ============================================================
   ALERTS / EMPTY / PAGINATION
   ============================================================ */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid;
}
.alert.success {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.3);
}
.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.3);
}
.empty {
    color: var(--fg-3);
    padding: 60px 20px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(8px);
}

.pagination {
    display: flex;
    gap: 6px;
    margin-top: 32px;
    justify-content: center;
}
.pagination a {
    padding: 10px 16px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--fg-2);
    font-size: 14px;
    font-weight: 500;
    min-width: 42px;
    text-align: center;
    transition: all 0.2s;
}
.pagination a.active,
.pagination a:hover {
    background: var(--gradient-2);
    color: #fff;
    border-color: transparent;
    text-decoration: none;
    box-shadow: var(--shadow-glow);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: linear-gradient(180deg, var(--bg) 0%, #03050a 100%);
    border-top: 1px solid var(--border);
    padding: 70px 0 32px;
    margin-top: 100px;
    position: relative;
}
.site-footer::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; gap: 36px; }
}
.footer-brand {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 14px;
    letter-spacing: -0.02em;
}
.footer-desc {
    color: var(--fg-3);
    font-size: 14px;
    line-height: 1.75;
    max-width: 340px;
}
.footer-col h4 {
    color: var(--fg);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin: 0 0 18px;
    font-weight: 700;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 6px 0; font-size: 14px; }
.footer-col a { color: var(--fg-3); }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--muted);
}
.footer-legal { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.footer-legal a {
    color: var(--fg-3);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-legal a:hover { color: var(--accent); }
.footer-legal .gov-icon,
.footer-legal .police-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    background: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}
.footer-legal .gov-icon {
    mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/></svg>");
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4z'/></svg>");
}

/* ============================================================
   ADMIN (后台)
   ============================================================ */
.admin-body { background: #050810; }
.admin-body::before {
    background:
        radial-gradient(circle at 0% 0%, rgba(0, 212, 255, 0.1), transparent 40%),
        radial-gradient(circle at 100% 0%, rgba(168, 85, 247, 0.08), transparent 40%);
}
.admin-body::after {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

.admin-header {
    background: rgba(7, 9, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}
.admin-header .container {
    display: flex;
    align-items: center;
}
.admin-header .brand { color: var(--fg); font-size: 18px; }
.admin-header .right { margin-left: auto; font-size: 14px; color: var(--fg-2); }
.admin-header .right a {
    color: var(--fg-2);
    margin-left: 14px;
    transition: color 0.2s;
}
.admin-header .right a:hover { color: var(--accent); }

.admin-nav {
    background: rgba(7, 9, 15, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 50;
}
.admin-nav .container {
    display: flex;
    gap: 4px;
    padding: 6px 16px;
    overflow-x: auto;
}
.admin-nav a {
    color: var(--fg-2);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.2s;
}
.admin-nav a:hover {
    color: var(--accent);
    background: var(--accent-soft);
    text-decoration: none;
}
.admin-main { padding: 36px 16px 60px; max-width: 1400px; margin: 0 auto; }

.page-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
}
.page-bar h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 60%, var(--accent-soft) 100%);
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-glow);
    box-shadow: var(--shadow-glow);
}
.stat-icon {
    font-size: 30px;
    width: 50px;
    height: 50px;
    background: var(--accent-soft);
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
}
.stat-value {
    font-size: 26px;
    font-weight: 800;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.stat-label { color: var(--fg-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 2px; }

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.table th, .table td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.table th {
    background: rgba(0, 0, 0, 0.2);
    font-size: 11px;
    font-weight: 700;
    color: var(--fg-3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(0, 212, 255, 0.04); }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.badge.status-published,
.badge.status-approved { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.badge.status-draft     { background: rgba(100, 116, 139, 0.2); color: #94a3b8; }
.badge.status-archived  { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }
.badge.status-pending   { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge.status-spam      { background: rgba(239, 68, 68, 0.15); color: #f87171; }
.badge.status-rejected  { background: rgba(107, 114, 128, 0.2); color: #9ca3af; }

/* 编辑器工具栏 */
.editor-bar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    border-bottom: none;
}
.editor-bar .btn.small {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--surface);
    color: var(--fg-2);
    border: 1px solid var(--border-2);
}
.editor-bar .btn.small:hover {
    background: var(--accent-soft);
    color: var(--accent);
}
.editor-bar i { font-style: italic; }

/* 归档 */
.archive-list {
    list-style: none;
    padding: 0;
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 8px 24px;
}
.archive-list li {
    padding: 14px 8px;
    border-bottom: 1px dashed var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.archive-list li:last-child { border-bottom: none; }
.archive-list a { color: var(--fg); font-weight: 600; }
.archive-list a:hover { color: var(--accent); }
.archive-list .muted {
    color: var(--fg-3);
    background: var(--surface-2);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
}

/* 表单 */
.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    box-shadow: var(--shadow);
    max-width: 780px;
}
.card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.card h3:not(:first-child) { margin-top: 32px; }

.form label {
    display: block;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fg-2);
}
.form input,
.form select,
.form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    font: inherit;
    margin-top: 8px;
    background: var(--bg-2);
    color: var(--fg);
    transition: all 0.2s;
}
.form input::placeholder,
.form textarea::placeholder { color: var(--muted); }
.form input:focus,
.form select:focus,
.form textarea:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.form textarea {
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
}
.form .row-2 { gap: 18px; }
.form button,
.btn {
    background: var(--gradient-2);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    letter-spacing: 0.02em;
}
.btn {
    background: var(--surface);
    color: var(--fg-2);
    border: 1px solid var(--border-2);
}
.btn:hover {
    background: var(--surface-2);
    color: var(--fg);
    text-decoration: none;
}
.btn.primary { background: var(--gradient-2); color: #fff; border-color: transparent; }
.btn.primary:hover { box-shadow: var(--shadow-glow); transform: translateY(-1px); }

@media (max-width: 600px) {
    .form .row-2 { grid-template-columns: 1fr; }
}
.checkbox { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--accent);
}
.link-button {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    padding: 0;
    font: inherit;
}
.link-button:hover { color: #f87171; }

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-wrapper {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 40px 24px;
    position: relative;
}
.login-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 50%, rgba(0, 212, 255, 0.15), transparent 60%),
        radial-gradient(circle at 70% 50%, rgba(168, 85, 247, 0.15), transparent 60%);
    z-index: -1;
}
.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-xl);
    padding: 44px 40px;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 212, 255, 0.1);
    position: relative;
    overflow: hidden;
}
.login-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gradient-1);
}
.login-card h1 {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 6px;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.login-card .subtitle {
    color: var(--fg-3);
    font-size: 14px;
    margin-bottom: 32px;
}
.login-card .form label { margin-bottom: 22px; }
.login-card .form input {
    background: var(--bg-2);
    border-color: var(--border-2);
    padding: 14px 16px;
}
.login-card .form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.login-card .form button {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    justify-content: center;
    margin-top: 8px;
}

.captcha-input {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.captcha-input label {
    font-size: 13px;
    color: var(--fg-2);
    margin-bottom: 0;
    white-space: nowrap;
}
.captcha-input #captchaImg {
    height: 48px;
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    background: #fff;
    padding: 4px;
    transition: border-color 0.2s;
}
.captcha-input #captchaImg:hover { border-color: var(--accent); }
.captcha-input input {
    flex: 1;
    min-width: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-align: center;
    font-weight: 700;
    font-family: var(--font-mono);
}