/* ==========================================================================
   LinMeng Blog — 基础层（历史遗留，仍承担骨架样式）
   --------------------------------------------------------------------------
   加载顺序：style.css（本文件）→ design-system.css → theme-refresh.css
             → admin-theme.css（后台）→ 页面专属样式（home.css 等）

   【关于本文件里的 :root 令牌】
   下面这两段令牌是"旧樱花粉主题"的遗留默认值，在加载了 theme-refresh.css 的
   页面上会被整体覆盖成当前的朱红/青绿配色，因此【改配色不要改这里】，
   请改 theme-refresh.css（那里是配色的唯一真源）。
   保留它们的原因：本文件也可能被单独加载（历史上 logout.php 就是这样），
   此时需要一套完整令牌兜底，否则页面会缺色。

   本文件同时承载大量基础组件骨架样式（header/card/btn/列表/侧栏/页脚等），
   这些规则仍在生效，不要整段删除；新样式请优先加到 design-system.css 或
   theme-refresh.css。
   ========================================================================== */

/* ==================== CSS Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ==================== Light Theme (Default) - Sakura Maiden ==================== */
:root {
    --primary-color: #ff7ba5;
    --primary-hover: #e85d8c;
    --primary-light: rgba(255,123,165,0.12);
    --primary-glow: rgba(255,123,165,0.22);
    --secondary-color: #9b8aa8;
    --accent-color: #b794f4;
    --bg-color: #fff7fa;
    --bg-subtle: #fdeef4;
    --card-bg: #ffffff;
    --card-bg-solid: #ffffff;
    --text-color: #2d1f2a;
    --text-secondary: #6b5570;
    --text-light: #7a6480;
    --border-color: rgba(255,123,165,0.30);
    --border-subtle: rgba(255,123,165,0.18);
    --success-color: #6bbf9e;
    --success-light: rgba(107,191,158,0.12);
    --warning-color: #e6b85c;
    --warning-light: rgba(230,184,92,0.12);
    --danger-color: #e85d8c;
    --danger-light: rgba(232,93,140,0.12);
    --sidebar-width: 300px;
    --header-height: 64px;
    --shadow-sm: 0 1px 2px rgba(255,123,165,0.04);
    --shadow: 0 2px 4px rgba(255,123,165,0.06);
    --shadow-md: 0 8px 16px rgba(255,123,165,0.08);
    --shadow-lg: 0 12px 24px rgba(255,123,165,0.10);
    --shadow-xl: 0 24px 48px rgba(255,123,165,0.12);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --code-bg: #1f1c18;
    --code-color: #e8e4dc;
    --input-bg: #ffffff;
    --hover-bg: rgba(255,123,165,0.06);
    --glass-bg: rgba(255,255,255,0.72);
    --glass-border: rgba(255,123,165,0.20);
    --gradient-primary: linear-gradient(135deg, #ff7ba5 0%, #b794f4 100%);
    --gradient-hero: linear-gradient(135deg, #2d1f2a 0%, #6b3d5a 40%, #ff7ba5 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,123,165,0.04) 0%, rgba(183,148,244,0.04) 100%);
    --theme-transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    --font-display: 'Playfair Display', 'LXGW WenKai', 'Noto Sans SC', serif;
    --font-sans: 'LXGW WenKai', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

/* ==================== Dark Theme - Sakura Maiden ==================== */
[data-theme="dark"] {
    --primary-color: #ff9bbf;
    --primary-hover: #e87aa8;
    --primary-light: rgba(255,155,191,0.14);
    --primary-glow: rgba(255,155,191,0.20);
    --secondary-color: #b09bbf;
    --accent-color: #c9a8f9;
    --bg-color: #1a1419;
    --bg-subtle: #241a22;
    --card-bg: #2a1f28;
    --card-bg-solid: #2a1f28;
    --text-color: #f5e8f0;
    --text-secondary: #bfa8c5;
    --text-light: #8a7590;
    --border-color: rgba(255,155,191,0.25);
    --border-subtle: rgba(255,155,191,0.15);
    --success-color: #8fd4b5;
    --success-light: rgba(143,212,181,0.12);
    --warning-color: #f0c878;
    --warning-light: rgba(240,200,120,0.12);
    --danger-color: #ff8fb5;
    --danger-light: rgba(255,143,181,0.12);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
    --shadow: 0 2px 4px rgba(0,0,0,0.35);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.40);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.50);
    --shadow-xl: 0 24px 48px rgba(0,0,0,0.60);
    --code-bg: #131210;
    --code-color: #e8e4dc;
    --input-bg: #2a1f28;
    --hover-bg: rgba(255,155,191,0.08);
    --glass-bg: rgba(42,31,40,0.72);
    --glass-border: rgba(255,155,191,0.20);
    --gradient-card: linear-gradient(135deg, rgba(255,155,191,0.06) 0%, rgba(201,168,249,0.06) 100%);
}

/*
 * 深色模式只由 [data-theme="dark"] 驱动（见 theme-refresh.css）。
 * 这里原来有一段 @media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) }
 * 的旧粉色主题令牌，特异度高于 [data-theme="dark"]，导致「跟随系统 + 系统深色」时
 * 覆盖掉新主题的深色配色，出现一半深色一半浅色的混合态。已移除：
 * 跟随系统由 JS 解析成显式的 data-theme 属性（template/header.php + main.js）。
 */

/* ==================== Body & Typography ==================== */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    min-height: 100vh;
    transition: var(--theme-transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    opacity: 1;
}

body.loaded {
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: var(--z-base);
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--primary-color);
    color: white;
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* ==================== Layout ==================== */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

.main-wrapper {
    display: flex;
    gap: 28px;
    padding: 28px 0;
}

.main-content {
    flex: 1;
    min-width: 0;
}

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
}

/* ==================== Header ==================== */
.header {
    background: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    z-index: 100;
    transition: var(--theme-transition);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    font-family: var(--font-display);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.02em;
    transition: color 0.2s;
}

.logo:hover {
    color: var(--primary-color);
}

.logo img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.nav {
    display: flex;
    gap: 2px;
}

.nav a {
    padding: 8px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav a:hover {
    background: var(--hover-bg);
    color: var(--primary-color);
}

.nav a.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Theme toggle */
.theme-toggle {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    width: 44px;
    height: 44px;
}

.theme-toggle:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

/* ==================== Cards ==================== */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    letter-spacing: -0.015em;
}

.card-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.card-body {
    padding: 24px;
}

/* ==================== Article List ==================== */
.article-list-card {
    overflow: hidden;
}

.article-list-toolbar {
    align-items: center;
    gap: 12px;
}

.article-list-toolbar .card-title {
    font-size: 1rem;
}

.article-list-summary {
    margin-left: auto;
    color: var(--text-light);
    font-size: 0.85rem;
}

.article-list-more,
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: var(--radius);
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.84rem;
    font-weight: 600;
}

.article-list-more:hover,
.read-more-link:hover {
    background: var(--primary-color);
    color: #fff;
}

.home-filter-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.home-sort-filter {
    flex-shrink: 0;
}

.article-item {
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.25s ease;
    position: relative;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.article-item:hover {
    background: var(--hover-bg);
    transform: translateX(4px);
}

.article-item:hover::before {
    opacity: 1;
}

    .article-cover {
        aspect-ratio: 16 / 9;
        height: auto;
        object-fit: cover;
        border-radius: var(--radius);
        margin-bottom: 16px;
        transition: transform 0.4s ease;
    }

.article-item:hover .article-cover {
    transform: scale(1.01);
    filter: brightness(1.05);
}

.article-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.45;
    letter-spacing: -0.01em;
}

.article-title a {
    color: var(--text-color);
    transition: color 0.2s;
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 16px;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.article-meta .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.article-meta .meta-item:hover {
    color: var(--primary-color);
}

.article-meta .meta-item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.article-meta .pin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--warning-light);
    color: var(--warning-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-excerpt {
    color: var(--text-light);
    line-height: 1.75;
    margin-bottom: 14px;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-actions {
    margin-top: 12px;
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    padding: 4px 12px;
    background: var(--primary-light);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--primary-color);
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.tag:hover {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
    transform: translateY(-1px) scale(1.03);
}

/* ==================== Article Gallery ==================== */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
}

.article-gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/10;
}

.article-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-gallery-item:hover img {
    transform: scale(1.08);
}

.article-gallery-more {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
}

/* ==================== Sidebar Widgets ==================== */
.widget {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.widget:hover {
    box-shadow: var(--shadow-md);
}

.widget-header {
    font-family: var(--font-display);
    padding: 16px 20px;
    padding-left: 16px;
    border-bottom: 1px solid var(--border-subtle);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    position: relative;
}

.widget-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.widget-header svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.widget-body {
    padding: 20px;
}

/* 主内容区底部小工具（站点统计 + 一言） */
.bottom-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.bottom-widgets .widget {
    margin-bottom: 0;
}

@media (max-width: 992px) {
    .bottom-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .bottom-widgets {
        grid-template-columns: 1fr;
    }
}

/* Profile */
.profile {
    text-align: center;
    position: relative;
}

.profile-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 14px;
    border: 3px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

.profile-name {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.profile-desc {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.profile-stat {
    text-align: center;
    cursor: default;
    transition: transform 0.2s;
}

.profile-stat:hover {
    transform: translateY(-2px);
}

.profile-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.profile-stat-label {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Quick Nav Grid */
.quick-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.quick-nav-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.quick-nav-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Links */
.link-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.link-item:hover {
    background: var(--hover-bg);
    border-color: var(--border-subtle);
}

.link-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

/* 排队图片：占位灰底 + 加载完成后淡入，避免从上往下逐个弹出时闪烁 */
.lm-queue-img {
    background-color: #ececec;
    opacity: 0.55;
    transition: opacity 0.4s ease;
}

.lm-queue-img.is-loaded {
    opacity: 1;
}

.link-info {
    flex: 1;
    min-width: 0;
}

.link-name {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-desc {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

/* Sponsors */
.sponsor-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sponsor-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    color: var(--text-color);
}

.sponsor-item:hover {
    background: var(--hover-bg);
    border-color: var(--border-subtle);
    color: var(--text-color);
}

.sponsor-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-subtle);
}

.sponsor-icon-placeholder {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
}

.sponsor-info {
    flex: 1;
    min-width: 0;
}

.sponsor-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sponsor-detail {
    font-size: 0.75rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.sponsor-admin-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--bg-subtle);
}

.sponsor-admin-thumb-placeholder {
    background: var(--gradient-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.form-help {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease, transform 0.25s ease;
    letter-spacing: -0.01em;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-color);
    box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--primary-glow);
    color: var(--text-color);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
}

/* ==================== Forms ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 11px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.92rem;
    transition: all 0.25s ease;
    background: var(--input-bg);
    color: var(--text-color);
    font-family: var(--font-sans);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 6px;
}

/* ==================== Comments ==================== */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.comment-item:hover {
    background: var(--hover-bg);
}

.comment-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border-subtle);
}

.comment-body {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.comment-badge {
    padding: 2px 8px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.comment-time {
    color: var(--text-light);
    font-size: 0.78rem;
}

.comment-meta {
    color: var(--text-light);
    font-size: 0.78rem;
}

.comment-meta::before {
    content: "·";
    margin-right: 8px;
}

.comment-content {
    color: var(--text-secondary);
    line-height: 1.7;
    word-break: break-word;
    font-size: 0.92rem;
}

.comment-reply {
    margin-top: 10px;
    padding: 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    margin-left: 24px;
    border-left: 2px solid var(--primary-color);
}

.comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.comment-actions button {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.comment-actions button:hover {
    color: var(--primary-color);
}

/* ==================== Pagination ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
    padding: 20px;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius);
    background: var(--card-bg-solid);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.page-link.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px var(--primary-glow);
}

.page-ellipsis {
    display: flex;
    align-items: center;
    color: var(--text-light);
    padding: 0 4px;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-light);
}

.empty-state-icon {
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-icon svg {
    width: 48px;
    height: 48px;
    color: var(--text-light);
}

.empty-state h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.9rem;
}

/* ==================== Footer (legacy — see design-system.css for new layout) ==================== */
.footer-meta {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ==================== Mobile Menu ==================== */
.mobile-menu-btn {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-color);
    padding: 8px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

.mobile-menu-btn svg {
    width: 20px;
    height: 20px;
}

/* ==================== Search & Filter ==================== */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.search-box input {
    flex: 1;
}

.search-box .btn svg {
    width: 16px;
    height: 16px;
}

.category-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
    margin-top: 14px;
}

.category-filter a {
    padding: 6px 16px;
    border-radius: 20px;
    background: var(--bg-subtle);
    color: var(--text-light);
    font-size: 0.84rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.category-filter a:hover,
.category-filter a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ==================== Article Detail ==================== */
.article-content {
    line-height: 1.85;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    font-family: var(--font-display);
    margin: 28px 0 14px;
    font-weight: 600;
    color: var(--text-color);
    letter-spacing: -0.01em;
}

.article-content p {
    margin-bottom: 18px;
}

.article-content img {
    border-radius: var(--radius);
    margin: 20px 0;
    max-width: 100%;
    box-shadow: var(--shadow-md);
}

.article-content pre {
    background: var(--code-bg);
    color: var(--code-color);
    padding: 20px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 20px 0;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    border: 1px solid var(--border-subtle);
}

.article-content code {
    background: var(--bg-subtle);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--primary-color);
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 12px 20px;
    margin: 20px 0;
    color: var(--text-light);
    background: var(--primary-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.article-content ul,
.article-content ol {
    margin: 18px 0;
    padding-left: 24px;
}

.article-content li {
    margin-bottom: 6px;
}

/* Article Actions (仅详情页 .article-detail-card 内，避免首页列表出现分隔线) */
.article-detail-card .article-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
}

.article-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-light);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.article-action-btn svg {
    width: 16px;
    height: 16px;
}

.article-action-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.article-action-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--card-bg-solid);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: var(--text-color);
    background: var(--bg-subtle);
}

/* ==================== Lightbox ==================== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: rgba(255,255,255,0.1);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

/* ==================== Upload Area ==================== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: 16px;
    background: var(--bg-subtle);
}

.upload-area:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.upload-preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-item .remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== Alerts ==================== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-color);
    border: 1px solid rgba(61, 139, 107, 0.2);
}

.alert-error {
    background: var(--danger-light);
    color: var(--danger-color);
    border: 1px solid rgba(196, 59, 59, 0.2);
}

.alert-warning {
    background: var(--warning-light);
    color: var(--warning-color);
    border: 1px solid rgba(184, 134, 42, 0.2);
}

/* ==================== Login Page ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255,255,255,0.05) 0%, transparent 40%);
    animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, -1%); }
}

.login-box {
    background: var(--card-bg-solid);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 440px;
    padding: 44px;
    transition: var(--theme-transition);
    position: relative;
    z-index: 1;
}

.login-title {
    font-family: var(--font-display);
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 36px;
    font-size: 0.9rem;
}

/* ==================== Tag Cloud ==================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 24px 0;
    justify-content: center;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-subtle);
    border-radius: 24px;
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.tag-cloud-item:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.tag-cloud-count {
    font-size: 0.72rem;
    background: var(--card-bg-solid);
    color: var(--text-light);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.tag-cloud-item:hover .tag-cloud-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ==================== Archive ==================== */
.archive-year {
    margin-bottom: 36px;
}

.archive-year-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
    letter-spacing: -0.02em;
}

.archive-month {
    margin-bottom: 24px;
    padding-left: 20px;
    border-left: 3px solid var(--border-color);
    margin-left: 8px;
}

.archive-month-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-color);
}

.archive-count {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 400;
}

.archive-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.archive-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    transition: all 0.25s ease;
    border: 1px solid transparent;
}

.archive-item:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.archive-item-date {
    font-size: 0.82rem;
    color: var(--text-light);
    white-space: nowrap;
    min-width: 50px;
    font-weight: 500;
}

.archive-item:hover .archive-item-date {
    color: rgba(255,255,255,0.7);
}

.archive-item-title {
    flex: 1;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.archive-item-views {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
}

.archive-item:hover .archive-item-views {
    color: rgba(255,255,255,0.7);
}

/* ==================== Reply Form ==================== */
.reply-form {
    margin-top: 12px;
    padding: 14px;
    background: var(--bg-subtle);
    border-radius: var(--radius);
    border: 1px solid var(--border-subtle);
}

.reply-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--text-color);
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px var(--primary-glow);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px var(--primary-glow);
}

/* ==================== Reading Progress ==================== */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    z-index: 1001;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.1s linear;
    box-shadow: 0 0 8px var(--primary-glow);
}

/* ==================== Badges ==================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success-color);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning-color);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger-color);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

.badge-secondary {
    background: var(--bg-subtle);
    color: var(--text-light);
}

/* ==================== Admin Styles ==================== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.admin-sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.admin-sidebar-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.admin-nav {
    padding: 12px 0;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    color: #94a3b8;
    transition: all 0.2s;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 2px 8px;
    border-radius: var(--radius);
}

.admin-nav-item:hover,
.admin-nav-item.active {
    background: rgba(255,255,255,0.08);
    color: white;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-color);
    min-height: 100vh;
    transition: var(--theme-transition);
}

.admin-header {
    background: var(--card-bg);
    padding: 16px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: var(--theme-transition);
    border-bottom: 1px solid var(--border-subtle);
}

.admin-content {
    padding: 28px;
}

/* Stat Cards */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
    letter-spacing: -0.03em;
}

.stat-card-label {
    color: var(--text-light);
    font-size: 0.88rem;
    font-weight: 500;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-subtle);
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: var(--hover-bg);
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 24px;
}

.admin-tab {
    padding: 12px 20px;
    color: var(--text-light);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

.admin-tab:hover,
.admin-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-bar select,
.filter-bar input {
    width: auto;
}

/* ==================== Animations ==================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.fade-in {
    animation: fadeIn 0.4s ease-out both;
}

.fade-in-up {
    animation: fadeInUp 0.5s ease-out both;
}

/* Staggered animation delays for list items */
.article-item:nth-child(1) { animation-delay: 0.05s; }
.article-item:nth-child(2) { animation-delay: 0.1s; }
.article-item:nth-child(3) { animation-delay: 0.15s; }
.article-item:nth-child(4) { animation-delay: 0.2s; }
.article-item:nth-child(5) { animation-delay: 0.25s; }

/* ==================== Social Page Styles ==================== */
.social-hero {
    text-align: center;
    padding: 48px 24px;
    position: relative;
}

.social-hero-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.social-hero-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.social-hero-icon.github {
    background: linear-gradient(135deg, #333 0%, #24292e 100%);
}

.social-hero-icon.bilibili {
    background: linear-gradient(135deg, #fb7299 0%, #e04f7a 100%);
}

.social-hero h2 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.social-hero p {
    color: var(--text-light);
    margin-bottom: 28px;
    font-size: 0.95rem;
}

.social-section {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--border-subtle);
}

.social-section h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-section h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

/* ==================== Info Box ==================== */
.info-box {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
}

.info-box h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-box h3 svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.info-box ul {
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.8;
}

.info-box ul li {
    margin-bottom: 4px;
}

/* ==================== Reading Time ==================== */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-light);
    padding: 4px 10px;
    background: var(--bg-subtle);
    border-radius: 20px;
    font-weight: 500;
}

.reading-time svg {
    width: 14px;
    height: 14px;
}

/* ==================== TOC (Table of Contents) ==================== */
.toc-container {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 28px;
}

.toc-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
}

.toc-title svg {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 6px;
}

.toc-list a {
    display: block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.toc-list a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.toc-list .toc-h3 {
    padding-left: 24px;
}

/* ==================== Responsive ==================== */
@media (max-width: 1024px) {
    .main-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
    }
    
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 200;
    }
    
    .admin-sidebar.open {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .article-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 16px;
    }

    .article-item {
        padding: 18px;
    }

    .stat-cards {
        grid-template-columns: 1fr 1fr;
    }

    .article-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .article-meta {
        gap: 10px;
        font-size: 0.78rem;
    }

    .comment-reply {
        margin-left: 0;
    }

    .login-box {
        margin: 20px;
        padding: 32px 24px;
    }
}

@media (min-width: 901px) {
    .mobile-menu-btn {
        display: none;
    }
}


@media (max-width: 480px) {
    .container {
        padding: 0 14px;
    }
    
    .main-wrapper {
        padding: 14px 0;
        gap: 14px;
    }
    
    .card-body {
        padding: 18px;
    }
    
    .article-gallery {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-cards {
        grid-template-columns: 1fr;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .article-actions {
        flex-wrap: wrap;
    }
    
    .footer-links {
        gap: 16px;
    }
}

/* ==================== Print Styles ==================== */
@media print {
    .header, .sidebar, .footer, .back-to-top, .reading-progress, .article-actions {
        display: none !important;
    }
    .main-wrapper {
        padding: 0;
    }
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

.about-hero {
    padding: 28px;
    background: var(--gradient-card);
    border-bottom: 1px solid var(--border-subtle);
}

.about-hero h1 {
    font-family: var(--font-display);
    margin: 0 0 8px;
    font-size: 1.5rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.about-tile {
    padding: 16px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: var(--bg-subtle);
}

.about-tile strong {
    display: block;
    margin-bottom: 4px;
}

@media (max-width: 640px) {
    .article-list-toolbar {
        flex-wrap: wrap;
    }

    .article-list-summary {
        margin-left: 0;
        width: 100%;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }
}

.article-neighbor-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.article-neighbor {
    display: block;
    padding: 14px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    min-width: 0;
}

.article-neighbor span {
    display: block;
    color: var(--text-light);
    font-size: 0.78rem;
    margin-bottom: 4px;
}

.article-neighbor strong {
    display: block;
    color: var(--text-color);
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-neighbor:hover {
    border-color: var(--primary-color);
    background: var(--primary-light);
}

.article-neighbor.disabled {
    opacity: 0.55;
    cursor: default;
}

.article-neighbor.next {
    text-align: right;
}

@media (max-width: 640px) {
    .article-neighbor-nav {
        grid-template-columns: 1fr;
    }

    .article-neighbor.next {
        text-align: left;
    }
}

/* ==================== Donate Page ==================== */
.donate-qrcode-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.donate-qrcode-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.donate-qrcode-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.donate-qrcode-item img {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    margin-bottom: 12px;
}

.donate-qrcode-label {
    font-size: 0.9rem;
    padding: 6px 14px;
    border-radius: 999px;
    display: inline-block;
}

/* 低调捐赠墙：只放名字 + 跳转，不张扬 */
.donate-note {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    line-height: 1.8;
}
.donate-wall-card {
    margin-top: 20px;
}
.donate-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.donate-wall-item {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: var(--bg-subtle);
    text-decoration: none;
    transition: all 0.2s;
}
a.donate-wall-item:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 相关阅读 */
.article-related {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}
.article-related-title {
    font-weight: 600;
    margin-bottom: 12px;
}
.article-related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.article-related-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.article-related-item:hover {
    border-color: var(--primary-color);
}
.article-related-cover {
    width: 96px;
    height: 54px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
    flex-shrink: 0;
}
.article-related-name {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.article-related-meta {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* 首页最新动态 */
.home-activity-card {
    margin-top: 20px;
}
.home-activity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.home-activity-heading {
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.home-activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.home-activity-item {
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}
.home-activity-item:hover {
    border-color: var(--primary-color);
}
.home-activity-user {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
}
.home-activity-text {
    display: block;
    font-size: 0.88rem;
    margin-top: 2px;
    line-height: 1.6;
}
.home-activity-meta {
    display: block;
    font-size: 0.76rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* 微信分享二维码 */
.share-wechat-box {
    margin-top: 14px;
    padding: 14px;
    text-align: center;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-subtle);
}
.share-wechat-tip {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.share-wechat-box img {
    border-radius: var(--radius);
    background: #fff;
}

@media (max-width: 768px) {
    .article-related-list {
        grid-template-columns: 1fr;
    }
    .home-activity-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Admin Article Edit Images ==================== */
.article-image-list .upload-preview-item img,
#new-images-preview .upload-preview-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: calc(var(--radius) - 2px);
}

/* ==================== Hitokoto Widget ==================== */
.hitokoto-widget {
    padding: 4px 0;
}

.hitokoto-text {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--text-color);
    font-style: italic;
    transition: opacity 0.3s ease;
}

.hitokoto-from {
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 8px;
    text-align: right;
}

/* ==================== Weather Widget ==================== */
.weather-widget {
    text-align: center;
    padding: 8px 0;
}

.weather-icon {
    font-size: 2rem;
    line-height: 1;
    margin-bottom: 6px;
}

.weather-temp {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
}

.weather-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.weather-city {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

.weather-loading,
.weather-error {
    font-size: 0.85rem;
    color: var(--text-light);
    padding: 12px 0;
}

/* ==================== Creation Calendar ==================== */
.creation-calendar {
    font-size: 0.82rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.calendar-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.calendar-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.calendar-nav-btn:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.calendar-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-weekdays {
    margin-bottom: 4px;
}

.calendar-weekdays span {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-light);
    padding: 2px 0;
}

.calendar-day {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-height: 26px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-variant-numeric: tabular-nums;
}

.calendar-day.is-empty {
    border-color: transparent;
}

/* 有发文的日子：描边方框 + 主题色 */
.calendar-day.has-post {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
    cursor: help;
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 1px var(--border-color);
    color: var(--text-color);
    font-weight: 600;
}

.calendar-day.has-post.is-today {
    box-shadow: 0 0 0 2px var(--primary-glow);
    color: var(--primary-color);
}

/* ==================== Code Copy Button ==================== */
.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-light);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 2;
    font-family: var(--font-sans);
}

.code-copy-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ==================== TOC Enhancements ==================== */
.toc-list a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
}

/* ==================== Typewriter Cursor ==================== */
[data-typewriter] {
    display: inline;
}

/* ==================== Responsive - Disable Effects ==================== */
@media (max-width: 768px) {
    .particles-canvas {
        display: none !important;
    }
}

/* ==================== Reduced Motion ==================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .particles-canvas {
        display: none !important;
    }
    [data-typewriter] {
        border-right: none !important;
    }
}

/* ==================== Friends Links Page ==================== */

/* 让内容层叠在星空/光斑画布之上 */
.page-links .main-wrapper {
    position: relative;
    z-index: 1;
}

/* 星空画布（由 starfield.js 创建） */
.starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* 页面整体氛围光晕 */
.page-links::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 123, 165, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 80% 70%, rgba(183, 148, 244, 0.06) 0%, transparent 45%);
    opacity: 0.6;
}

/* Hero */
.links-hero {
    position: relative;
    z-index: 1;
    padding: 56px 32px;
    text-align: center;
    border-radius: var(--radius-xl);
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 28px;
}
.links-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--primary-glow), transparent 60%);
    pointer-events: none;
}
.links-hero-title {
    position: relative;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroGlow 3s ease-in-out infinite alternate;
}
@keyframes heroGlow {
    from { filter: drop-shadow(0 0 6px rgba(255, 123, 165, 0.25)); }
    to   { filter: drop-shadow(0 0 20px rgba(255, 123, 165, 0.55)); }
}
.links-hero-subtitle {
    position: relative;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
}
.links-stats {
    position: relative;
    display: inline-flex;
    gap: 32px;
    padding: 14px 28px;
    background: var(--card-bg-solid);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.links-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}
.links-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 4px;
}

/* Toolbar */
.links-toolbar {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.links-toolbar .search-box {
    margin: 0;
    flex: 1;
    min-width: 240px;
}
.links-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Section & Grid */
.links-section {
    position: relative;
    z-index: 1;
    margin-bottom: 36px;
}
.links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

/* Card */
.link-card {
    position: relative;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    animation: cardIn 0.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}
@keyframes cardIn {
    to { opacity: 1; transform: translateY(0); }
}

.link-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.link-card-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-subtle);
    border: 2px solid var(--border-subtle);
    transition: transform 0.3s ease, border-color 0.3s ease;
}
.link-card:hover .link-card-avatar {
    transform: scale(1.08);
    border-color: var(--primary-color);
}
.link-card-avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
}
.link-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.link-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.link-card-url {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: var(--primary-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.link-card-url svg {
    flex-shrink: 0;
    opacity: 0.8;
}
.link-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 深色主题微调 */
[data-theme="dark"] .link-card:hover {
    box-shadow: 0 10px 28px rgba(255, 155, 191, 0.15);
}

/* 响应式 */
@media (max-width: 768px) {
    .links-grid { grid-template-columns: 1fr; gap: 12px; }
    .link-card { padding: 12px 14px; gap: 12px; }
    .link-card-avatar { width: 46px; height: 46px; }
    .link-card-name { font-size: 0.95rem; }
    .link-card-desc { font-size: 0.76rem; }
}
@media (prefers-reduced-motion: reduce) {
    .link-card { animation: none; opacity: 1; transform: none; }
}

/* 快捷导航激活态 */
.quick-nav-item.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* ==================== UI Enhancements v3.2 ==================== */
/* 智能隐藏头部 */
.header {
    transform: translateY(0);
    transition: transform 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.header.is-hidden {
    transform: translateY(-100%);
}

.header.is-scrolled {
    box-shadow: var(--shadow-md);
    background: var(--glass-bg);
}

/* 搜索触发按钮 */
.search-trigger {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.search-trigger:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.05);
}

.search-trigger svg {
    width: 18px;
    height: 18px;
}

.hidden-mobile {
    display: inline-flex;
}

/* 全局搜索浮层 */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.search-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
}

.search-overlay-panel {
    position: relative;
    width: min(640px, calc(100% - 32px));
    background: var(--card-bg-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: translateY(-12px);
    transition: transform 0.25s ease;
}

.search-overlay.active .search-overlay-panel {
    transform: translateY(0);
}

.search-overlay-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.search-overlay-header svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.search-overlay-header input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-sans);
    outline: none;
}

.search-overlay-header input::placeholder {
    color: var(--text-light);
}

.search-overlay-close {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s, border-color 0.2s;
}

.search-overlay-close:hover {
    background: var(--danger-light);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.search-overlay-body {
    max-height: 50vh;
    overflow-y: auto;
}

.search-hint {
    padding: 16px 20px;
    color: var(--text-light);
    font-size: 0.85rem;
    text-align: center;
}

.search-results {
    padding: 8px;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--text-color);
    transition: all 0.15s;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.is-selected {
    background: var(--hover-bg);
}

.search-result-item.is-selected {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.92rem;
}

.search-result-meta {
    font-size: 0.78rem;
    color: var(--text-light);
}

.search-overlay-footer {
    display: flex;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-light);
    font-size: 0.78rem;
    flex-wrap: wrap;
}

.search-overlay-footer span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    padding: 2px 6px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    box-shadow: 0 1px 0 var(--border-color);
}

/* 移动端侧滑菜单 */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    height: 100dvh;
    min-height: 100vh;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: var(--card-bg-solid);
    border-left: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    z-index: 200;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mobile-drawer.active {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.mobile-drawer-header .logo {
    font-size: 1.1rem;
}

.mobile-drawer-close {
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-drawer-close:hover {
    background: var(--danger-light);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.mobile-drawer-nav {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.mobile-drawer-nav a {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all 0.2s;
}

.mobile-drawer-nav a.active,
.mobile-drawer-nav a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.mobile-drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    gap: 10px;
}

/* 返回顶部按钮增强 */
.back-to-top {
    border-radius: 50%;
    padding: 0;
}

.back-to-top-ring {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

.back-to-top-ring circle {
    transition: stroke-dashoffset 0.1s linear;
}

.back-to-top-arrow {
    position: relative;
    z-index: 1;
}

/* 文章页浮动操作栏 */
.article-fab {
    position: fixed;
    right: 28px;
    bottom: 92px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.article-fab-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--card-bg-solid);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: all 0.25s ease;
}

.article-fab-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.article-fab-btn.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.article-fab-btn svg {
    width: 18px;
    height: 18px;
}

/* 分享弹窗 */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 1003;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
}

.share-modal-panel {
    position: relative;
    width: min(420px, calc(100% - 32px));
    background: var(--card-bg-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 24px;
    transform: scale(0.96);
    transition: transform 0.25s ease;
}

.share-modal.active .share-modal-panel {
    transform: scale(1);
}

.share-modal-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.share-modal-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-close:hover {
    color: var(--danger-color);
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.share-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.share-item:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.share-item svg {
    width: 22px;
    height: 22px;
}

.share-item span {
    font-size: 0.75rem;
    font-weight: 500;
}

.share-link-box {
    display: flex;
    gap: 8px;
}

.share-link-box input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-subtle);
    color: var(--text-color);
    font-size: 0.85rem;
}

/* 代码块增强 */
pre {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

pre .code-lang-label {
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 10px;
    background: var(--bg-subtle);
    color: var(--text-light);
    font-size: 0.72rem;
    font-family: var(--font-mono);
    border-bottom-left-radius: var(--radius);
    border-top-right-radius: calc(var(--radius-lg) - 1px);
    z-index: 1;
}

pre:has(.code-lang-label) .code-copy-btn {
    top: 32px;
}

/* 图片骨架屏 */
.img-skeleton {
    background: linear-gradient(110deg, var(--bg-subtle) 8%, var(--card-bg) 18%, var(--bg-subtle) 33%);
    background-size: 200% 100%;
    animation: shimmer 1.5s linear infinite;
}

.article-cover.img-skeleton,
.article-gallery-item img.img-skeleton {
    min-height: 180px;
}

/* Toast 提示 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1004;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    pointer-events: auto;
    min-width: 220px;
    max-width: 360px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    background: var(--success-color);
    color: white;
}

.toast-error {
    background: var(--danger-color);
    color: white;
}

.toast-info {
    background: var(--primary-color);
    color: white;
}

.toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 文章操作栏 */
.article-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.article-toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--bg-subtle);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.article-toolbar-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.article-toolbar-btn.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.article-toolbar-btn svg {
    width: 16px;
    height: 16px;
}

/* 阅读时间徽章 */
.reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: var(--text-light);
    padding: 4px 10px;
    background: var(--bg-subtle);
    border-radius: 20px;
    font-weight: 500;
}

/* 响应式补充 */
@media (max-width: 900px) {
    .hidden-mobile {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .search-overlay {
        padding-top: 8vh;
    }

    .search-overlay-panel {
        width: calc(100% - 24px);
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }

    .article-fab {
        right: 20px;
        bottom: 76px;
    }

    .article-fab-btn {
        width: 40px;
        height: 40px;
    }

    .share-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .mobile-menu-btn {
        display: flex;
    }
}

/* 与 design-system.css 的 900px 断点保持一致：
   901px 以上才隐藏菜单按钮，避免 769-900px 区间导航与菜单按钮同时消失 */
@media (min-width: 901px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* 页面加载淡入 */
.page-transition {
    animation: pageFadeIn 0.4s ease-out;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 友链页响应式补充 */
@media (max-width: 768px) {
    .links-hero { padding: 36px 20px; }
    .links-toolbar { flex-direction: column; align-items: stretch; }
    .links-toolbar .search-box { min-width: auto; }
    .links-actions { justify-content: stretch; }
    .links-actions .btn { flex: 1; }
    .starfield-canvas { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
    .starfield-canvas { display: none !important; }
    .links-hero-title { animation: none; }
}

/* ============================================================
   指引页 - Guide Page
   ============================================================ */
.page-guide::after {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 155, 191, 0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(201, 168, 249, 0.08) 0%, transparent 50%);
    opacity: 0.7;
}

/* Hero */
.guide-hero {
    position: relative;
    z-index: 1;
    border-radius: var(--radius-xl);
    background: var(--gradient-card), var(--card-bg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 24px;
}
.guide-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--primary-glow), transparent 60%);
    pointer-events: none;
}
.guide-hero-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 48px 32px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}
.guide-avatar-wrap {
    flex-shrink: 0;
    position: relative;
}
.guide-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: 0 0 0 4px var(--primary-color), var(--shadow-lg);
}
.guide-hero-text { flex: 1; min-width: 240px; }
.guide-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 8px 0;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.guide-hero-tagline {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin: 0;
}

/* Games section */
.guide-games {
    position: relative;
    z-index: 1;
    margin-bottom: 24px;
    padding: 28px 0;
    overflow: hidden;
}
.guide-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 28px 20px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.guide-section-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}
.guide-section-hint {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* 3D Coverflow 轮盘 */
.guide-carousel {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 8px;
}
.guide-stage {
    position: relative;
    width: 100%;
    height: 300px;
    perspective: 1300px;
    perspective-origin: 50% 45%;
    cursor: grab;
    outline: none;
    touch-action: pan-y;
    overflow: hidden;
}
.guide-stage:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary-color);
    border-radius: var(--radius);
}
.guide-track-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    will-change: transform;
}
.guide-card {
    position: absolute;
    left: -95px;
    top: -135px;
    width: 190px;
    cursor: pointer;
    transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.45s ease,
                box-shadow 0.45s ease;
    will-change: transform, opacity;
}
.guide-card-cover {
    position: relative;
    width: 100%;
    height: 252px;
    border-radius: 24px;
    overflow: hidden;
    background: var(--bg-subtle);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    transition: box-shadow 0.45s ease;
    backface-visibility: hidden;
}
.guide-card.is-active .guide-card-cover {
    box-shadow: 0 20px 50px rgba(255, 155, 191, 0.32), 0 10px 22px rgba(0, 0, 0, 0.22);
}
.guide-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}
.guide-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-primary);
}
.guide-card-overlay {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 32px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.42) 55%, transparent 100%);
    pointer-events: none;
}
.guide-card-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.guide-card-desc {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.45;
    margin: 4px 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 导航按钮 */
.guide-nav-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    z-index: 10;
}
.guide-nav-btn:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: scale(1.08);
}
.guide-nav-btn:active { transform: scale(0.96); }

/* 指示点 */
.guide-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 14px 0 4px;
}
.guide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}
.guide-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--gradient-primary);
}

/* Empty state */
.guide-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}
.guide-empty svg { color: var(--text-muted); margin-bottom: 12px; }
.guide-empty h3 { margin: 0 0 6px; color: var(--text-secondary); font-size: 1.1rem; }
.guide-empty p { margin: 0; font-size: 0.9rem; }

/* CTA */
.guide-cta {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 16px 0 32px;
}
.guide-cta-btn {
    padding: 14px 36px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
}

/* Responsive */
@media (max-width: 768px) {
    .guide-hero-inner { padding: 36px 20px; gap: 16px; }
    .guide-avatar { width: 96px; height: 96px; }
    .guide-section-header { padding: 0 20px 16px; }
    .guide-stage { height: 260px; }
    .guide-card { width: 150px; left: -75px; top: -107px; }
    .guide-card-cover { height: 200px; border-radius: 20px; }
    .guide-nav-btn { width: 38px; height: 38px; }
    .guide-cta { flex-direction: column; align-items: stretch; padding: 16px 20px 24px; }
}
@media (prefers-reduced-motion: reduce) {
    .guide-card { transition: opacity 0.3s ease; }
    .guide-nav-btn { transition: none; }
}

