/* ===== 可动画渐变色变量 ===== */
@property --bg-top {
    syntax: '<color>';
    inherits: true;
    initial-value: #f0f7f0;
}
@property --bg-bottom {
    syntax: '<color>';
    inherits: true;
    initial-value: #f8faf8;
}
@property --nav-bg {
    syntax: '<color>';
    inherits: true;
    initial-value: rgba(248,250,248,0.82);
}

/* ===== 设计令牌系统 ===== */
:root {
    /* --- 颜色令牌：绿色主色 --- */
    --color-primary-50: #e8f5e9;
    --color-primary-100: #c8e6c9;
    --color-primary-200: #a5d6a7;
    --color-primary-300: #81c784;
    --color-primary-400: #66bb6a;
    --color-primary-500: #4CAF50;
    --color-primary-600: #43a047;
    --color-primary-700: #388e3c;
    --color-primary-800: #2e7d32;
    --color-primary-900: #1b5e20;

    /* --- 颜色令牌：蓝色辅助 --- */
    --color-secondary-400: #42a5f5;
    --color-secondary-500: #2196F3;
    --color-secondary-600: #1e88e5;
    --color-secondary-700: #1565c0;

    /* --- 颜色令牌：橙色强调 --- */
    --color-accent-400: #ffb74d;
    --color-accent-500: #ff9800;
    --color-accent-600: #f57c00;
    --color-accent-700: #e65100;

    /* --- 文本颜色 --- */
    --color-text-primary: #1a1a1a;
    --color-text-secondary: #555;
    --color-text-tertiary: #888;
    --color-text-muted: #bbb;

    /* --- 表面与边框 --- */
    --color-surface: #fff;
    --color-surface-raised: #fafefa;
    --color-border: rgba(0,0,0,0.06);
    --color-border-strong: #e0e0e0;

    /* --- 状态颜色 --- */
    --color-success: #4CAF50;
    --color-error: #e53935;
    --color-warning: #ff9800;
    --color-info: #2196F3;

    /* --- 间距令牌（4px 基准） --- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 28px;
    --space-8: 32px;
    --space-9: 40px;
    --space-10: 48px;
    --space-12: 56px;
    --space-16: 64px;

    /* --- 字体令牌（1.25 比率） --- */
    --text-xs: 0.75em;
    --text-sm: 0.8125em;
    --text-base: 0.875em;
    --text-md: 1em;
    --text-lg: 1.125em;
    --text-xl: 1.25em;
    --text-2xl: 1.5em;
    --text-3xl: 1.875em;
    --text-4xl: 2.25em;

    /* --- 圆角令牌 --- */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* --- 阴影令牌 --- */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --shadow-xl: 0 12px 32px rgba(0,0,0,0.12);
    --shadow-glow-green: 0 4px 20px rgba(76,175,80,0.15);
    --shadow-glow-blue: 0 4px 20px rgba(33,150,243,0.15);

    /* --- 动画令牌 --- */
    --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --duration-fast: 0.15s;
    --duration-normal: 0.25s;
    --duration-slow: 0.4s;
}

/* --- 深色模式令牌覆盖 --- */
[data-theme="dark"] {
    --color-text-primary: #e8e8e8;
    --color-text-secondary: #bbb;
    --color-text-tertiary: #888;
    --color-text-muted: #666;

    --color-surface: #1c2a1c;
    --color-surface-raised: #243024;
    --color-border: rgba(255,255,255,0.06);
    --color-border-strong: rgba(255,255,255,0.12);

    --shadow-xs: 0 1px 2px rgba(0,0,0,0.1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.2);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.3);
    --shadow-xl: 0 12px 32px rgba(0,0,0,0.4);
    --shadow-glow-green: 0 4px 20px rgba(76,175,80,0.2);
    --shadow-glow-blue: 0 4px 20px rgba(33,150,243,0.2);
}

/* ===== 全局基础 ===== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    --bg-top: #f2f7f0;
    --bg-bottom: #f8faf8;
    --nav-bg: rgba(248,250,248,0.82);
}

::selection {
    background: rgba(76,175,80,0.2);
    color: #1b5e20;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 40px;
    text-align: center;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 30%, var(--bg-bottom) 100%);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    animation: pageIn 0.4s ease-out;
}

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

/* 自定义滚动条 */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: #c8e6c9;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: #a5d6a7; }

h1 {
    font-size: var(--text-3xl);
    margin: var(--space-6) 0 var(--space-2);
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--text-2xl);
    color: var(--color-text-primary);
}

h3 {
    font-size: var(--text-xl);
    color: var(--color-text-primary);
}

a { color: #4CAF50; text-decoration: none; }
a:hover { color: #2e7d32; }

/* ===== 全局导航栏（毛玻璃置顶） ===== */
.global-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    margin: 0 -20px 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(200,230,200,0.5);
    transition: box-shadow 0.3s;
}

.global-nav:hover {
    box-shadow: 0 2px 16px rgba(46,125,50,0.06);
}

.global-nav .nav-brand {
    font-weight: 700;
    font-size: var(--text-lg);
    color: #2e7d32;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.2s;
}

.global-nav .nav-brand:hover {
    transform: scale(1.03);
}

.global-nav .nav-links {
    display: flex;
    gap: 2px;
    align-items: center;
    flex-wrap: wrap;
}

.global-nav .nav-links a {
    padding: 7px var(--space-4);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: var(--text-base);
    color: #555;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.global-nav .nav-links a:hover,
.global-nav .nav-links a.active {
    background: linear-gradient(135deg, rgba(76,175,80,0.12), rgba(102,187,106,0.12));
    color: #2e7d32;
}

.global-nav .nav-user {
    font-size: var(--text-base);
    color: #666;
}

.global-nav .nav-user a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 500;
}

/* ===== 副标题 ===== */
.subtitle {
    color: var(--color-text-tertiary);
    font-size: var(--text-md);
    margin: 0 0 var(--space-7);
}

/* ===== 按钮系统 ===== */
.btn {
    display: inline-block;
    padding: var(--space-3) var(--space-8);
    font-size: var(--text-md);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-weight: 600;
    transition: all var(--duration-normal) ease;
    letter-spacing: 0.02em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-primary {
    background: linear-gradient(135deg, #4CAF50, #43a047);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #43a047, #388e3c);
    box-shadow: 0 6px 20px rgba(76,175,80,0.35);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    box-shadow: 0 6px 20px rgba(33,150,243,0.35);
    color: white;
}

.btn-eco {
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    color: white;
}

.btn-eco:hover {
    background: linear-gradient(135deg, #1b5e20, #1a4f1d);
    color: white;
}

.btn-trial {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
}

.btn-trial:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    color: white;
}

/* ===== 卡片系统 ===== */
.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-5);
    margin: var(--space-5) 0;
    text-align: left;
}

.item-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.item-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.item-card:hover img {
    transform: scale(1.04);
}

.no-image {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #f5f5f5, #eeeeee);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: var(--text-base);
}

.item-info {
    padding: var(--space-4);
}

.item-info h3 {
    margin: 0 0 6px;
    font-size: 1em;
    color: #333;
}

.item-category {
    display: inline-block;
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    color: #2e7d32;
    padding: 3px var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

.item-price {
    color: var(--color-error);
    font-size: var(--text-xl);
    font-weight: bold;
    margin: var(--space-2) 0 var(--space-1);
}

.item-seller {
    color: #aaa;
    font-size: var(--text-sm);
    margin: 2px 0 0;
}

.item-desc {
    color: #777;
    font-size: var(--text-base);
    margin: 0;
    line-height: 1.5;
}

/* ===== 徽章标签 ===== */
.badge-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    margin-bottom: var(--space-1);
}

.badge-pass {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    color: #2e7d32;
}

.badge-immune {
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    color: #f57f17;
}

/* 详情页徽章 */
.detail-badge {
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    font-weight: 600;
    margin: var(--space-4) 0;
    text-align: center;
}

.detail-badge-pass {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.detail-badge-immune {
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    color: #f57f17;
    border: 1px solid #ffe082;
}

.detail-badge-trial {
    background: linear-gradient(135deg, #fff3e0, #fbe9e7);
    color: #e65100;
    border: 1px solid #ffcc80;
}

.detail-badge-removed {
    background: linear-gradient(135deg, #ffebee, #fce4ec);
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* ===== 详情页 ===== */
.detail-seller {
    color: #666;
    font-size: var(--text-md);
    margin: var(--space-3) 0;
}

/* ===== 表单系统 ===== */
.post-form {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: var(--text-base);
    color: #444;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: var(--text-md);
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--color-surface);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.1);
    outline: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    margin-bottom: var(--space-3);
    border-radius: var(--radius-md);
}

.ai-tip {
    color: #2e7d32;
    font-size: var(--text-base);
    margin-top: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border-radius: var(--radius-sm);
    display: inline-block;
    border: 1px solid #c8e6c9;
}

/* ===== 上传区域 ===== */
.upload-area {
    border: 2px dashed #c8e6c9;
    padding: 30px var(--space-5);
    margin: var(--space-5) 0;
    border-radius: var(--radius-lg);
    background: var(--color-surface-raised);
    transition: border-color 0.2s, background 0.2s;
}

.upload-area:hover {
    border-color: #4CAF50;
    background: #f0faf0;
}

.preview img {
    max-width: 100%;
    max-height: 300px;
    margin-top: var(--space-3);
    border-radius: var(--radius-md);
}

#upload-btn {
    padding: var(--space-3) 30px;
    font-size: var(--text-md);
    background: linear-gradient(135deg, #4CAF50, #43a047);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s;
}

#upload-btn:hover {
    background: linear-gradient(135deg, #43a047, #388e3c);
    box-shadow: 0 6px 20px rgba(76,175,80,0.25);
    transform: translateY(-1px);
}

#result {
    margin-top: var(--space-5);
    padding: var(--space-4);
    border-radius: var(--radius-md);
}

/* ===== 返回链接 ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    margin-top: var(--space-6);
    color: #999;
    text-decoration: none;
    font-size: var(--text-base);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.back-link:hover {
    color: #2e7d32;
    background: rgba(76,175,80,0.08);
}

/* ===== 顶部用户栏（旧版兼容） ===== */
.user-bar {
    text-align: right;
    padding: var(--space-3) 0;
    font-size: var(--text-base);
    color: var(--color-text-tertiary);
    border-bottom: 1px solid #e8ece8;
    margin-bottom: var(--space-3);
}

.user-bar a {
    color: #4CAF50;
    text-decoration: none;
}

.user-bar a:hover {
    text-decoration: underline;
}

/* ===== 市场页头部 ===== */
.market-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: var(--space-4) 0;
}

/* ===== 聊天区域 ===== */
.chat-area {
    max-width: 600px;
    margin: 30px auto 0;
    text-align: left;
}

.chat-title {
    font-size: var(--text-lg);
    margin: 0 0 var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid #e8f5e9;
    color: #333;
    font-weight: 600;
}

.chat-login-tip {
    text-align: center;
    color: #999;
    padding: var(--space-7);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.chat-login-tip a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
}

.chat-box {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: var(--space-4);
    background: linear-gradient(180deg, #fafcfa 0%, #f5f8f5 100%);
}

.chat-empty {
    text-align: center;
    color: #ccc;
    padding: 50px 0;
    font-size: var(--text-base);
}

.chat-msg {
    margin-bottom: var(--space-4);
    max-width: 78%;
}

.chat-msg-mine {
    margin-left: auto;
    text-align: right;
}

.chat-msg-other {
    margin-right: auto;
    text-align: left;
}

.chat-msg-name {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-bottom: 3px;
}

.chat-msg-bubble {
    display: inline-block;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-base);
    line-height: 1.5;
    word-break: break-word;
    max-width: 100%;
}

.chat-msg-mine .chat-msg-bubble {
    background: linear-gradient(135deg, #4CAF50, #43a047);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-msg-other .chat-msg-bubble {
    background: #f0f0f0;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-msg-time {
    font-size: var(--text-xs);
    color: #ccc;
    margin-top: 3px;
}

.chat-input-area {
    display: flex;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
}

.chat-input-area input {
    flex: 1;
    padding: var(--space-4);
    border: none;
    outline: none;
    font-size: var(--text-base);
    background: transparent;
}

.chat-input-area button {
    padding: var(--space-4) 22px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: var(--text-base);
    background: #4CAF50;
    color: white;
    font-weight: 600;
    transition: background 0.2s;
}

.chat-input-area button:hover {
    background: #43a047;
}

/* 卖家视角：买家列表 */
.chat-buyer-list {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
}

.chat-buyer-item {
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid #f5f5f5;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-buyer-item:last-child {
    border-bottom: none;
}

.chat-buyer-item:hover {
    background: #f8fdf8;
}

.chat-buyer-name {
    font-weight: 600;
    font-size: var(--text-md);
    color: #333;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--color-error);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(229,57,53,0.3);
}

.chat-buyer-last {
    color: #999;
    font-size: var(--text-sm);
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chat-buyer-time {
    color: #ccc;
    font-size: var(--text-xs);
    margin-top: 3px;
}

.chat-back {
    padding: var(--space-3) var(--space-4);
    color: #4CAF50;
    cursor: pointer;
    font-size: var(--text-base);
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
    font-weight: 500;
    transition: background 0.15s;
}

.chat-back:hover {
    background: #f8fdf8;
}

/* ===== 导航栏头像 ===== */
.nav-avatar-link {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

.nav-avatar-img {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #c8e6c9;
    transition: border-color 0.2s;
}

.nav-avatar-link:hover .nav-avatar-img {
    border-color: #4CAF50;
}

.nav-avatar-default {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #4CAF50, #2e7d32);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: var(--text-xs);
    font-weight: bold;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.nav-avatar-link:hover .nav-avatar-default {
    transform: scale(1.1);
}

/* ===== 导航栏消息通知 ===== */
.nav-msg-link {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 2px;
    padding: 7px 10px !important;
}
.nav-msg-icon {
    font-size: var(--text-lg);
    line-height: 1;
}
.nav-msg-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: var(--radius-full);
    background: var(--color-error);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(229,57,53,0.4);
    animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badgePop {
    from { transform: scale(0); }
    to   { transform: scale(1); }
}

/* ===== 页脚 ===== */
.site-footer {
    margin-top: var(--space-10);
    padding: var(--space-6) 0 var(--space-2);
    border-top: 1px solid var(--color-border);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    letter-spacing: 0.02em;
}

.site-footer a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: #4CAF50;
}

/* ===== 汉堡菜单按钮 ===== */
.nav-hamburger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
}
.nav-hamburger::before,
.nav-hamburger::after,
.nav-hamburger span {
    content: '';
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text-primary);
    border-radius: 2px;
    position: absolute;
    left: 11px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-hamburger::before { top: 13px; }
.nav-hamburger span    { top: 21px; }
.nav-hamburger::after  { top: 29px; }
.nav-hamburger.open::before { top: 21px; transform: rotate(45deg); }
.nav-hamburger.open span    { opacity: 0; }
.nav-hamburger.open::after  { top: 21px; transform: rotate(-45deg); }

/* ===== 底部标签导航栏 ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 56px;
    display: none;
    justify-content: space-around;
    align-items: center;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
    z-index: 100;
}
.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none;
    color: var(--color-text-tertiary);
    font-size: 0.65em;
    gap: 2px;
    transition: color 0.2s;
}
.bottom-nav a .bn-icon {
    font-size: 1.5em;
    line-height: 1;
}
.bottom-nav a.active {
    color: #4CAF50;
}
[data-theme="dark"] .bottom-nav {
    background: #1c2a1c;
    border-top-color: rgba(255,255,255,0.08);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}
[data-theme="dark"] .bottom-nav a {
    color: #777;
}
[data-theme="dark"] .bottom-nav a.active {
    color: #66bb6a;
}

/* ===== 响应式：平板 (≤ 768px) ===== */
@media (max-width: 768px) {
    .nav-hamburger {
        display: block;
    }
    .global-nav .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        order: 10;
        gap: 0;
        background: var(--color-surface);
        border-top: 1px solid var(--color-border);
        margin-top: 8px;
        padding: 4px 0;
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
    .global-nav .nav-links.open {
        display: flex;
    }
    .global-nav .nav-links a {
        display: block;
        padding: 14px 20px;
        text-align: left;
        border-radius: 0;
        font-size: var(--text-md);
    }
    .global-nav .nav-links a::after {
        display: none;
    }
    .global-nav .nav-links a:hover,
    .global-nav .nav-links a.active {
        background: linear-gradient(135deg, rgba(76,175,80,0.08), rgba(102,187,106,0.08));
    }
    .global-nav .nav-links .theme-toggle {
        margin: 8px 20px 12px;
    }
    .global-nav {
        flex-wrap: wrap;
    }
    .btn {
        padding: 14px 24px;
    }
    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: 64px;
    }
    .subtitle {
        font-size: var(--text-base);
    }
    .market-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    .chat-messages {
        height: 240px;
    }
    .site-footer {
        margin-top: var(--space-8);
        padding-bottom: var(--space-4);
    }
}

/* ===== 响应式：手机 (≤ 600px) ===== */
@media (max-width: 600px) {
    body {
        padding: 0 14px 70px;
    }

    .global-nav {
        margin: 0 -14px 12px;
        padding: 10px 14px;
        flex-wrap: wrap;
        gap: 6px;
    }

    .items-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .item-card img,
    .no-image {
        height: 140px;
    }

    h1 {
        font-size: 1.4em;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    .equiv-grid {
        grid-template-columns: 1fr;
    }
    .express-stats {
        grid-template-columns: 1fr 1fr;
    }
    .wiki-grid {
        grid-template-columns: 1fr;
    }
    .trial-list {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

/* ===== 响应式：小屏手机 (≤ 380px) ===== */
@media (max-width: 380px) {
    .ach-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    h1 {
        font-size: 1.25em;
    }
    .stat-number {
        font-size: 1.5em;
    }
}

/* ===== 主题切换动画（View Transition 圆形揭幕） ===== */

::view-transition-image-pair(root) {
    isolation: auto;
    mix-blend-mode: normal;
}

/* 切到深色：深色展开，旧画面渐暗模糊（退远感） */
::view-transition-old(root) {
    animation: vt-old-recede 0.36s ease both;
    mix-blend-mode: normal;
    z-index: 1;
}
::view-transition-new(root) {
    animation: vt-reveal 0.36s cubic-bezier(0.16, 0.7, 0.3, 1) both;
    mix-blend-mode: normal;
    z-index: 9999;
}

/* 切到浅色：深色缩回，新画面从模糊变清晰（浮现感） */
.vt-to-light::view-transition-old(root) {
    animation: vt-conceal 0.36s cubic-bezier(0.16, 0.7, 0.3, 1) both;
    mix-blend-mode: normal;
    z-index: 9999;
}
.vt-to-light::view-transition-new(root) {
    animation: vt-new-emerge 0.36s ease both;
    mix-blend-mode: normal;
    z-index: 1;
}

/* 深色展开 */
@keyframes vt-reveal {
    0% {
        clip-path: circle(0px at var(--vt-x, 50%) var(--vt-y, 50%));
        filter: drop-shadow(0 0 60px rgba(60, 120, 255, 0.9)) brightness(1.2);
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(60, 120, 255, 0.5)) brightness(1.05);
    }
    100% {
        clip-path: circle(var(--vt-r, 100vmax) at var(--vt-x, 50%) var(--vt-y, 50%));
        filter: drop-shadow(0 0 4px rgba(60, 120, 255, 0.1)) brightness(1);
    }
}

/* 深色缩回 */
@keyframes vt-conceal {
    0% {
        clip-path: circle(var(--vt-r, 100vmax) at var(--vt-x, 50%) var(--vt-y, 50%));
        filter: drop-shadow(0 0 4px rgba(255, 183, 50, 0.1)) brightness(1);
    }
    50% {
        filter: drop-shadow(0 0 30px rgba(255, 183, 50, 0.5)) brightness(1.05);
    }
    100% {
        clip-path: circle(0px at var(--vt-x, 50%) var(--vt-y, 50%));
        filter: drop-shadow(0 0 60px rgba(255, 183, 50, 0.9)) brightness(1.2);
    }
}

/* 被覆盖的旧画面：变暗 + 轻微模糊 + 缩小（退远感） */
@keyframes vt-old-recede {
    from { filter: brightness(1) blur(0); transform: scale(1); }
    to   { filter: brightness(0.75) blur(1.5px); transform: scale(0.98); }
}

/* 露出的新画面：从模糊放大到清晰（浮现感） */
@keyframes vt-new-emerge {
    from { filter: brightness(1.1) blur(2px); transform: scale(1.03); }
    to   { filter: brightness(1) blur(0); transform: scale(1); }
}

/* 按钮旋转弹跳 + 辉光脉冲 */
@keyframes toggle-spin {
    0%   { transform: rotate(0deg)   scale(1);    box-shadow: 0 0 0 0 rgba(76,175,80,0); }
    20%  { transform: rotate(60deg)  scale(1.3);  box-shadow: 0 0 20px 4px rgba(76,175,80,0.5); }
    50%  { transform: rotate(200deg) scale(0.88); box-shadow: 0 0 10px 2px rgba(76,175,80,0.25); }
    75%  { transform: rotate(310deg) scale(1.06); box-shadow: 0 0 6px 1px rgba(76,175,80,0.15); }
    100% { transform: rotate(360deg) scale(1);    box-shadow: 0 0 0 0 rgba(76,175,80,0); }
}
.theme-toggle.spinning {
    animation: toggle-spin 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* 波纹环 */
.theme-ripple {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 100001;
    animation: ripple-out 0.8s ease-out forwards;
}
@keyframes ripple-out {
    from { width: 0; height: 0; opacity: 0.7; border-width: 3.5px; }
    to   { width: 260px; height: 260px; opacity: 0; border-width: 0.5px; }
}

/* 粒子火花 */
.theme-spark {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 100001;
    transform: translate(-50%, -50%);
    animation: spark-fly 0.8s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}
@keyframes spark-fly {
    0%   { transform: translate(-50%, -50%) scale(1.5); opacity: 1; }
    40%  { opacity: 0.9; }
    100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0); opacity: 0; }
}

/* 冲击波 */
.theme-shockwave {
    position: fixed;
    pointer-events: none;
    border-radius: 50%;
    border: 3px solid;
    transform: translate(-50%, -50%);
    z-index: 100002;
    animation: shockwave-out 0.65s cubic-bezier(0.15, 0.85, 0.25, 1) forwards;
}
@keyframes shockwave-out {
    from { width: 0; height: 0; opacity: 0.85; border-width: 4px; }
    to   { width: 400px; height: 400px; opacity: 0; border-width: 0.5px; }
}

/* 星状粒子（十字形） */
.theme-star {
    border-radius: 0 !important;
    clip-path: polygon(
        50% 0%, 62% 38%, 100% 50%, 62% 62%,
        50% 100%, 38% 62%, 0% 50%, 38% 38%
    );
}

/* 余晖 */
.theme-afterglow {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    pointer-events: none;
    z-index: 100000;
    opacity: 1;
    transition: opacity 0.8s ease;
}

/* 不支持 View Transition 的浏览器回退 */
html.theme-transition {
    transition: --bg-top 0.5s ease,
                --bg-bottom 0.5s ease,
                --nav-bg 0.5s ease,
                background-color 0.5s ease,
                color 0.5s ease !important;
}
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 0.5s ease,
                color 0.5s ease,
                border-color 0.5s ease,
                box-shadow 0.5s ease !important;
}

/* ===== 深色模式切换按钮 ===== */
.theme-toggle {
    background: none;
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #666;
    flex-shrink: 0;
    padding: 0;
    line-height: 1;
}
.theme-toggle:hover {
    background: rgba(76,175,80,0.1);
    border-color: #4CAF50;
    color: #4CAF50;
    transform: rotate(20deg);
}

/* ===== 深色模式 ===== */
[data-theme="dark"] {
    color-scheme: dark;
    --bg-top: #121a12;
    --bg-bottom: #141c14;
    --nav-bg: rgba(18,26,18,0.92);
}

[data-theme="dark"] body {
    color: #d0d0d0;
}

[data-theme="dark"] ::selection {
    background: rgba(76,175,80,0.3);
    color: #c8e6c9;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb { background: #2a4a2c; }
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: #3a5a3c; }

[data-theme="dark"] h1 { color: #e8e8e8; }
[data-theme="dark"] a { color: #66bb6a; }
[data-theme="dark"] a:hover { color: #81c784; }

/* 导航栏 */
[data-theme="dark"] .global-nav {
    background: var(--nav-bg);
    border-bottom-color: rgba(76,175,80,0.12);
}
[data-theme="dark"] .global-nav .nav-brand { color: #66bb6a; }
[data-theme="dark"] .global-nav .nav-links a { color: #999; }
[data-theme="dark"] .global-nav .nav-links a:hover,
[data-theme="dark"] .global-nav .nav-links a.active {
    background: linear-gradient(135deg, rgba(76,175,80,0.15), rgba(102,187,106,0.15));
    color: #66bb6a;
}
[data-theme="dark"] .global-nav .nav-user { color: #888; }

/* 切换按钮 - 深色 */
[data-theme="dark"] .theme-toggle {
    border-color: rgba(255,255,255,0.12);
    color: #ffd54f;
}
[data-theme="dark"] .theme-toggle:hover {
    background: rgba(255,215,0,0.1);
    border-color: #ffd54f;
    color: #ffd54f;
}

/* 副标题 */
[data-theme="dark"] .subtitle { color: #777; }

/* 按钮 */
[data-theme="dark"] .btn:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.25); }

/* 商品卡片 */
[data-theme="dark"] .item-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}
[data-theme="dark"] .item-info h3 { color: #ddd; }
[data-theme="dark"] .item-category {
    background: linear-gradient(135deg, #1a3a1a, #1e401e);
    color: #66bb6a;
}
[data-theme="dark"] .item-seller { color: #777; }
[data-theme="dark"] .item-desc { color: #999; }
[data-theme="dark"] .no-image {
    background: linear-gradient(135deg, #1a261a, #141c14);
    color: #555;
}

/* 徽章 */
[data-theme="dark"] .badge-pass {
    background: linear-gradient(135deg, #1a3a1a, #1e401e);
    color: #66bb6a;
}
[data-theme="dark"] .badge-immune {
    background: linear-gradient(135deg, #3a3000, #4a3800);
    color: #ffd54f;
}
[data-theme="dark"] .detail-badge-pass {
    background: linear-gradient(135deg, #1a3a1a, #1e401e);
    color: #66bb6a; border-color: #2a4a2c;
}
[data-theme="dark"] .detail-badge-immune {
    background: linear-gradient(135deg, #3a3000, #4a3800);
    color: #ffd54f; border-color: #5a4800;
}
[data-theme="dark"] .detail-badge-trial {
    background: linear-gradient(135deg, #3a2000, #4a2800);
    color: #ffb74d; border-color: #5a3800;
}
[data-theme="dark"] .detail-badge-removed {
    background: linear-gradient(135deg, #3a1010, #4a1818);
    color: #ef9a9a; border-color: #5a2020;
}
[data-theme="dark"] .detail-seller { color: #999; }

/* 表单 */
[data-theme="dark"] .form-group label { color: #bbb; }
[data-theme="dark"] .form-group input[type="text"],
[data-theme="dark"] .form-group input[type="number"],
[data-theme="dark"] .form-group textarea {
    background: var(--color-surface);
    border-color: rgba(255,255,255,0.1);
    color: #d0d0d0;
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    background: #1e2c1e;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

/* AI 提示 */
[data-theme="dark"] .ai-tip {
    background: linear-gradient(135deg, #1a3a1a, #1e401e);
    color: #66bb6a; border-color: #2a4a2c;
}

/* 上传区域 */
[data-theme="dark"] .upload-area {
    border-color: #2a4a2c; background: #141c14;
}
[data-theme="dark"] .upload-area:hover {
    border-color: #4CAF50; background: #152015;
}

/* 返回链接 */
[data-theme="dark"] .back-link { color: #777; }
[data-theme="dark"] .back-link:hover { color: #66bb6a; background: rgba(76,175,80,0.1); }

/* 用户栏 */
[data-theme="dark"] .user-bar { color: #777; border-bottom-color: rgba(255,255,255,0.06); }

/* 聊天 */
[data-theme="dark"] .chat-title { color: #ddd; border-bottom-color: #1a3a1a; }
[data-theme="dark"] .chat-login-tip { background: var(--color-surface); color: #888; border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .chat-box { background: var(--color-surface); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .chat-messages { background: linear-gradient(180deg, #121a12 0%, #141c14 100%); }
[data-theme="dark"] .chat-msg-other .chat-msg-bubble { background: #243024; color: #d0d0d0; }
[data-theme="dark"] .chat-input-area { background: var(--color-surface); border-top-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .chat-input-area input { color: #d0d0d0; }
[data-theme="dark"] .chat-buyer-list { background: var(--color-surface); border-color: rgba(255,255,255,0.06); }
[data-theme="dark"] .chat-buyer-item { border-bottom-color: rgba(255,255,255,0.04); }
[data-theme="dark"] .chat-buyer-item:hover { background: #1e2c1e; }
[data-theme="dark"] .chat-buyer-name { color: #ddd; }
[data-theme="dark"] .chat-back { background: var(--color-surface); border-bottom-color: rgba(255,255,255,0.04); }
[data-theme="dark"] .chat-back:hover { background: #1e2c1e; }

/* 头像 */
[data-theme="dark"] .nav-avatar-img { border-color: #2a4a2c; }
[data-theme="dark"] .nav-avatar-link:hover .nav-avatar-img { border-color: #4CAF50; }
[data-theme="dark"] .nav-msg-badge { box-shadow: 0 2px 6px rgba(229,57,53,0.5); }

/* 页脚 */
[data-theme="dark"] .site-footer { border-top-color: rgba(255,255,255,0.06); color: #555; }
[data-theme="dark"] .site-footer a { color: #666; }
[data-theme="dark"] .site-footer a:hover { color: #66bb6a; }

/* ===== 动态背景光斑（CSS-only） ===== */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(600px circle at 20% 30%, rgba(76,175,80,0.07), transparent 60%),
        radial-gradient(500px circle at 80% 60%, rgba(102,187,106,0.06), transparent 60%),
        radial-gradient(450px circle at 50% 80%, rgba(46,125,50,0.05), transparent 60%);
    animation: bgOrbDrift 20s ease-in-out infinite alternate;
}
@keyframes bgOrbDrift {
    0%   { transform: translate(0, 0)   scale(1); }
    33%  { transform: translate(30px, -20px) scale(1.05); }
    66%  { transform: translate(-20px, 15px) scale(0.97); }
    100% { transform: translate(10px, -10px) scale(1.02); }
}

/* 微点阵纹理 */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 32px 32px;
}

[data-theme="dark"] body::before {
    background:
        radial-gradient(600px circle at 20% 30%, rgba(76,175,80,0.05), transparent 60%),
        radial-gradient(500px circle at 80% 60%, rgba(102,187,106,0.04), transparent 60%),
        radial-gradient(450px circle at 50% 80%, rgba(46,125,50,0.03), transparent 60%);
}
[data-theme="dark"] body::after {
    background-image: radial-gradient(circle, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ===== 卡片悬停增强（已合并） ===== */

/* ===== 表单输入增强 ===== */
.form-group input:focus,
.form-group textarea:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76,175,80,0.1);
    outline: none;
    transform: translateY(-1px);
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(76,175,80,0.15);
}

/* ===== 滚动入场动画类 ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-scale {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.visible,
.fade-in-scale.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.stagger-children > *:nth-child(1)  { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2)  { transition-delay: 0.10s; }
.stagger-children > *:nth-child(3)  { transition-delay: 0.15s; }
.stagger-children > *:nth-child(4)  { transition-delay: 0.20s; }
.stagger-children > *:nth-child(5)  { transition-delay: 0.25s; }
.stagger-children > *:nth-child(6)  { transition-delay: 0.30s; }
.stagger-children > *:nth-child(7)  { transition-delay: 0.35s; }
.stagger-children > *:nth-child(8)  { transition-delay: 0.40s; }
.stagger-children > *:nth-child(9)  { transition-delay: 0.45s; }
.stagger-children > *:nth-child(10) { transition-delay: 0.50s; }

/* ===== 按钮涟漪动画 ===== */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: scale(0);
    animation: btnRippleAnim 0.5s ease-out forwards;
    pointer-events: none;
}
@keyframes btnRippleAnim {
    to { transform: scale(4); opacity: 0; }
}

/* ===== 导航栏滚动阴影 ===== */
.global-nav.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
}
[data-theme="dark"] .global-nav.scrolled {
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

/* ===== 页脚装饰线 ===== */
.site-footer {
    position: relative;
}
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, #4CAF50, transparent);
}
[data-theme="dark"] .site-footer::before {
    background: linear-gradient(90deg, transparent, #66bb6a, transparent);
}

/* ===== 第二轮深度视觉美化 — 全局增强 ===== */

/* --- 通用工具动画 keyframes --- */
@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(76,175,80,0.2); }
    50%      { box-shadow: 0 0 20px rgba(76,175,80,0.45); }
}
@keyframes shimmerSlide {
    0%   { left: -75%; }
    100% { left: 125%; }
}

/* --- 按钮系统增强 --- */
.btn {
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
}
.btn:hover {
    transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.06);
}
.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(76,175,80,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(33,150,243,0.35), inset 0 1px 0 rgba(255,255,255,0.3);
}

/* --- 卡片系统增强 --- */
.item-card {
    position: relative;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06), 0 0 0 1px rgba(76,175,80,0.05);
}
.item-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #4CAF50, #66bb6a);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--duration-slow) var(--ease-bounce);
    z-index: 2;
}
.item-card:hover::before {
    transform: scaleX(1);
}
.item-card:hover {
    transform: translateY(-4px);
    transition: transform 0.35s var(--ease-bounce), box-shadow 0.35s ease;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(76,175,80,0.12), var(--shadow-glow-green);
}

/* --- 表单输入增强 --- */
.form-group input:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(76,175,80,0.1), 0 4px 12px rgba(76,175,80,0.08);
}

/* --- 导航栏增强 --- */
.global-nav {
    position: relative;
}
.global-nav::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(76,175,80,0.3), transparent);
}
.global-nav .nav-links a::after {
    content: '';
    position: absolute;
    bottom: 2px; left: 50%; right: 50%;
    height: 2px;
    background: linear-gradient(90deg, #4CAF50, #26a69a);
    border-radius: 2px;
    transition: left 0.3s ease, right 0.3s ease;
}
.global-nav .nav-links a:hover::after,
.global-nav .nav-links a.active::after {
    left: 14px;
    right: 14px;
}

/* --- 页脚增强 --- */
.site-footer {
    letter-spacing: 0.05em;
}

/* --- 深色模式补充 --- */
[data-theme="dark"] .btn {
    box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.1);
}
[data-theme="dark"] .btn:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.3), 0 2px 6px rgba(0,0,0,0.15);
}
[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(76,175,80,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
[data-theme="dark"] .btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(33,150,243,0.35), inset 0 1px 0 rgba(255,255,255,0.15);
}
[data-theme="dark"] .item-card {
    box-shadow: 0 2px 12px rgba(0,0,0,0.2), 0 0 0 1px rgba(76,175,80,0.08);
}
[data-theme="dark"] .item-card::before {
    background: linear-gradient(90deg, #66bb6a, #81c784);
}
[data-theme="dark"] .item-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(76,175,80,0.15), 0 4px 20px rgba(76,175,80,0.15);
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    box-shadow: 0 0 0 4px rgba(76,175,80,0.15), 0 4px 12px rgba(76,175,80,0.1);
}
[data-theme="dark"] .global-nav::after {
    background: linear-gradient(90deg, transparent, rgba(102,187,106,0.25), transparent);
}
[data-theme="dark"] .global-nav .nav-links a::after {
    background: linear-gradient(90deg, #66bb6a, #4db6ac);
}

/* ===== 统一 Shimmer 系统 ===== */
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.title-shimmer {
    background: linear-gradient(135deg, #1b5e20 20%, #4CAF50 50%, #81c784 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

.title-shimmer--teal {
    background: linear-gradient(135deg, #00695c 20%, #009688 50%, #4db6ac 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-shimmer--blue {
    background: linear-gradient(135deg, #1565c0 20%, #42a5f5 50%, #90caf9 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-shimmer--orange {
    background: linear-gradient(135deg, #e65100 20%, #ff9800 50%, #ffb74d 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.title-shimmer--indigo {
    background: linear-gradient(135deg, #283593 20%, #5c6bc0 50%, #9fa8da 80%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== 容器类系统 ===== */
.container-sm { max-width: 540px; margin-left: auto; margin-right: auto; }
.container-md { max-width: 680px; margin-left: auto; margin-right: auto; }
.container-lg { max-width: 960px; margin-left: auto; margin-right: auto; }

/* ===== 骨架屏加载 ===== */
@keyframes skeletonPulse {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    height: 280px;
    border-radius: var(--radius-lg);
}

.skeleton-text {
    height: 1em;
    margin-bottom: var(--space-2);
    border-radius: var(--radius-sm);
}

.skeleton-text--short {
    width: 40%;
}

.skeleton-text--medium {
    width: 70%;
}

[data-theme="dark"] .skeleton {
    background: linear-gradient(90deg, #1c2a1c 25%, #243024 50%, #1c2a1c 75%);
    background-size: 200% 100%;
}

/* ===== 按钮加载态 ===== */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: var(--radius-full);
    animation: btnSpin 0.6s linear infinite;
}

@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ===== 焦点可见性 ===== */
:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

[data-theme="dark"] :focus-visible {
    outline-color: #66bb6a;
}

/* ===== 页面过渡动画 ===== */
body.page-leaving {
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
