/**
 * PD社区 · 活力拼豆 2.0 — 高级感设计系统
 * 玻璃拟态 · 渐变网格 · 多层光影 · 弹性动效 · 深色模式
 * 保留全部既有 class/id 语义，仅升级观感与新增组件。
 */

/* ========== 设计 Tokens ========== */
:root {
    /* 主色 - 蓝绿青渐变 */
    --primary: #0891b2;
    --primary-dark: #0e7490;
    --primary-light: #67e8f9;
    --primary-ultra-light: #ecfeff;
    --primary-grad: linear-gradient(135deg, #0891b2, #06b6d4, #10b981);
    --primary-grad-soft: linear-gradient(135deg, rgba(8,145,178,.12), rgba(16,185,129,.12));

    /* 强调 - 暖橙 */
    --accent: #ea580c;
    --accent-dark: #c2410c;
    --accent-light: #ffedd5;
    --accent-grad: linear-gradient(135deg, #f59e0b, #ea580c);

    /* 拼豆彩色板（标签/头像/装饰） */
    --bead-pink: #ec4899;
    --bead-yellow: #eab308;
    --bead-green: #22c55e;
    --bead-purple: #a855f7;
    --bead-cyan: #06b6d4;
    --bead-orange: #f97316;
    --bead-red: #ef4444;
    --bead-blue: #3b82f6;

    /* 语义色 */
    --success: #059669;
    --success-light: #ecfdf5;
    --danger: #dc2626;
    --danger-light: #fef2f2;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --info: #0284c7;
    --info-light: #f0f9ff;

    /* 背景与表面 */
    --bg-body: #f4f7fb;
    --bg-card: #ffffff;
    --bg-card-hover: #f0fdfa;
    --bg-nav: rgba(255, 255, 255, 0.72);
    --bg-muted: #f1f5f9;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-elevated: #ffffff;

    /* 文字 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* 边框 */
    --border-color: #e6eaf0;
    --border-light: #eef2f7;

    /* 多层光影 */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15,23,42,.04);
    --shadow-md: 0 4px 8px -2px rgba(15, 23, 42, 0.08), 0 3px 6px -3px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 12px 28px -8px rgba(15, 23, 42, 0.14), 0 8px 14px -6px rgba(15, 23, 42, 0.08);
    --shadow-xl: 0 24px 48px -16px rgba(15, 23, 42, 0.22), 0 12px 20px -8px rgba(15, 23, 42, 0.10);
    --shadow-primary: 0 10px 24px -8px rgba(8, 145, 178, 0.45);
    --shadow-accent: 0 10px 24px -8px rgba(234, 88, 12, 0.40);
    --shadow-glow: 0 0 0 4px rgba(8, 145, 178, 0.12);

    /* 圆角 */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-2xl: 36px;
    --radius-full: 9999px;

    /* 间距 */
    --space-xs: .5rem; --space-sm: .75rem; --space-md: 1rem; --space-lg: 1.5rem; --space-xl: 2.5rem;

    /* 过渡 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 280ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 450ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 380ms cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-spring: 500ms cubic-bezier(0.22, 1, 0.36, 1);

    /* 玻璃 */
    --glass-blur: blur(20px) saturate(180%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.6);
}

/* ========== 深色模式 ========== */
[data-theme="dark"] {
    --primary: #22d3ee;
    --primary-dark: #06b6d4;
    --primary-light: #67e8f9;
    --primary-ultra-light: rgba(34, 211, 238, 0.12);
    --primary-grad: linear-gradient(135deg, #22d3ee, #06b6d4, #34d399);
    --primary-grad-soft: linear-gradient(135deg, rgba(34,211,238,.10), rgba(52,211,153,.10));

    --accent: #fb923c;
    --accent-dark: #f97316;
    --accent-light: rgba(251, 146, 60, 0.14);
    --accent-grad: linear-gradient(135deg, #fbbf24, #fb923c);

    --bg-body: #0a0f1d;
    --bg-card: #131a2c;
    --bg-card-hover: #182240;
    --bg-nav: rgba(13, 18, 32, 0.72);
    --bg-muted: #1c2438;
    --bg-glass: rgba(19, 26, 44, 0.7);
    --bg-elevated: #161e33;

    --text-primary: #e8edf6;
    --text-secondary: #9aa6bd;
    --text-muted: #64748b;

    --border-color: #283149;
    --border-light: #222b40;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow-md: 0 4px 12px -2px rgba(0,0,0,.4);
    --shadow-lg: 0 12px 28px -8px rgba(0,0,0,.5);
    --shadow-xl: 0 24px 48px -16px rgba(0,0,0,.6);
    --shadow-primary: 0 10px 24px -8px rgba(34, 211, 238, 0.35);
    --shadow-accent: 0 10px 24px -8px rgba(251, 146, 60, 0.35);
    --shadow-glow: 0 0 0 4px rgba(34, 211, 238, 0.14);

    --glass-bg: rgba(19, 26, 44, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);

    --success-light: rgba(16, 185, 129, 0.14);
    --danger-light: rgba(239, 68, 68, 0.14);
    --warning-light: rgba(245, 158, 11, 0.14);
    --info-light: rgba(14, 165, 233, 0.14);
}

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

html { scroll-behavior: smooth; }
[x-cloak] { display: none !important; }

body {
    background: var(--bg-body);
    background-image:
        radial-gradient(circle at 12% 8%, rgba(8, 145, 178, 0.10) 0%, transparent 42%),
        radial-gradient(circle at 88% 92%, rgba(234, 88, 12, 0.08) 0%, transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.04) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* 噪点纹理叠层（高级感细节） */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
main, nav, footer, .announcement-bar { position: relative; z-index: 1; }

/* 顶部彩色渐变条 */
.top-bar {
    height: 4px;
    background: linear-gradient(90deg, #0891b2, #06b6d4, #10b981, #eab308, #f59e0b, #ec4899, #0891b2);
    background-size: 200% 100%;
    animation: gradient-flow 10s linear infinite;
}
@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

a { color: var(--primary); transition: var(--transition-fast); }
a:hover { color: var(--primary-dark); }
::selection { background: rgba(8, 145, 178, 0.20); color: var(--text-primary); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 9999px; border: 2px solid var(--bg-body); }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ========== 文字渐变 ========== */
.text-gradient, .text-gradient-primary {
    background: var(--primary-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-warm {
    background: var(--accent-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== 导航栏（玻璃拟态） ========== */
.navbar {
    background: var(--bg-nav) !important;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.65rem 0;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}
.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    background: var(--primary-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
    display: inline-flex; align-items: center; gap: 0.5rem;
    transition: var(--transition-bounce);
}
.navbar-brand i {
    font-size: 1.3rem;
    -webkit-text-fill-color: var(--primary); color: var(--primary);
}
.navbar-brand:hover { transform: scale(1.04); }

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 700; font-size: 0.95rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-full);
    transition: var(--transition-fast);
    position: relative;
}
.navbar .nav-link:hover { color: var(--primary) !important; background: var(--primary-ultra-light); }
.navbar .nav-link.active { color: var(--primary) !important; background: var(--primary-ultra-light); }

.navbar .dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    background: var(--bg-elevated);
    margin-top: 0.5rem !important;
    animation: drop-in 0.25s var(--transition-spring);
}
@keyframes drop-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
.navbar .dropdown-item {
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.85rem;
    font-weight: 600; color: var(--text-primary);
    transition: var(--transition-fast);
}
.navbar .dropdown-item:hover { background: var(--primary-ultra-light); color: var(--primary-dark); }
.navbar .dropdown-divider { border-color: var(--border-color); }
.navbar-toggler { border: none; padding: 0.4rem 0.6rem; }
.navbar-toggler:focus { box-shadow: none; }

/* 主题切换按钮 */
.theme-toggle-btn {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-muted);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    cursor: pointer; transition: var(--transition-fast);
    flex-shrink: 0;
}
.theme-toggle-btn:hover { color: var(--primary); background: var(--primary-ultra-light); border-color: var(--primary-light); transform: rotate(15deg); }

/* 通知下拉面板 */
.notif-dropdown {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    background: var(--bg-elevated);
    min-width: 340px;
    padding: 0.5rem;
    animation: drop-in 0.25s var(--transition-spring);
}

/* ========== 按钮 ========== */
.btn {
    border-radius: var(--radius-md);
    font-weight: 700;
    padding: 0.5rem 1.15rem;
    transition: var(--transition-base);
    border: none;
    letter-spacing: 0.01em;
    position: relative; overflow: hidden;
}
.btn-sm { border-radius: var(--radius-sm); padding: 0.3rem 0.8rem; font-size: 0.82rem; }
.btn:focus { box-shadow: var(--shadow-glow); }
.btn::after { /* 微光扫过 */
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.25) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
}
.btn:hover::after { transform: translateX(120%); }

.btn-primary {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #0e7490, #0891b2, #059669);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -8px rgba(8, 145, 178, 0.5);
}
.btn-primary:active { transform: translateY(0); }

.btn-outline-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}
.btn-outline-secondary:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    border-color: var(--primary-light);
    transform: translateY(-2px);
}
.btn-outline-light { border: 1.5px solid rgba(255,255,255,0.5); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); color: #fff; }

.btn-approve { background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; box-shadow: 0 8px 18px -6px rgba(34,197,94,0.45); }
.btn-approve:hover { background: linear-gradient(135deg, #16a34a, #15803d); color:#fff; transform: translateY(-2px); }
.btn-reject { background: linear-gradient(135deg, #f43f5e, #dc2626); color: #fff; box-shadow: 0 8px 18px -6px rgba(244,63,94,0.45); }
.btn-reject:hover { background: linear-gradient(135deg, #dc2626, #b91c1c); color:#fff; transform: translateY(-2px); }

.btn-group { border-radius: var(--radius-full); }
.btn-group .btn { border-radius: 0; }
.btn-group .btn::after { display: none; }
.btn-group .btn:first-child { border-top-left-radius: var(--radius-full); border-bottom-left-radius: var(--radius-full); }
.btn-group .btn:last-child { border-top-right-radius: var(--radius-full); border-bottom-right-radius: var(--radius-full); }

.bookmark-btn.active {
    background: var(--accent-light) !important;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* 关注按钮 */
.follow-btn.following { background: var(--bg-muted); color: var(--text-secondary); border: 1.5px solid var(--border-color); }
.follow-btn:not(.following) { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-primary); }
.follow-btn:hover { transform: translateY(-2px); }

/* 点赞动画 */
.like-animate { animation: heart-pop 450ms cubic-bezier(0.34, 1.56, 0.64, 1); }
@keyframes heart-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.28); }
    70% { transform: scale(0.92); }
    100% { transform: scale(1); }
}

/* ========== 表单 ========== */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    padding: 0.6rem 1rem;
    font-weight: 600; color: var(--text-primary);
    background: var(--bg-card);
    transition: var(--transition-fast);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}
.form-control::placeholder { color: var(--text-muted); font-weight: 500; }
.form-label { font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; }
.form-text { color: var(--text-muted); font-weight: 500; }
.input-group-text {
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-color);
    background: var(--bg-muted); color: var(--text-secondary);
    font-weight: 700;
}
.input-group .form-control { border-radius: var(--radius-md); }
.input-group:not(.has-validation) > .form-control:not(:last-child) { border-top-right-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }

/* ========== 卡片基础 ========== */
.card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    color: var(--text-primary);
}

/* ========== 公告栏 ========== */
.announcement-bar {
    background: linear-gradient(135deg, var(--warning-light), rgba(255,251,235,.6));
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    padding: 0.5rem 0;
    overflow: hidden;
}
.ann-item {
    display: inline-flex; align-items: center;
    font-weight: 700; font-size: 0.88rem;
    color: var(--text-primary); white-space: nowrap;
}
.ann-badge {
    display: inline-block;
    background: var(--accent-grad);
    color: #fff; font-size: 0.68rem; font-weight: 800;
    padding: 0.15rem 0.55rem;
    border-radius: var(--radius-full);
    margin-right: 0.5rem; letter-spacing: 0.05em;
}

/* ========== Hero 区 ========== */
.hero {
    position: relative;
    border-radius: var(--radius-2xl);
    padding: 2.5rem 2rem;
    margin-bottom: 1.5rem;
    background: var(--primary-grad);
    overflow: hidden;
    box-shadow: var(--shadow-primary);
    color: #fff;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.22), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.12), transparent 55%);
    pointer-events: none;
}
/* 拼豆点阵装饰 */
.hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.18) 1.5px, transparent 1.5px);
    background-size: 22px 22px;
    opacity: .5; pointer-events: none;
    mask-image: linear-gradient(90deg, transparent, #000 40%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
}
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.hero p { font-weight: 600; opacity: .92; margin-bottom: 1.25rem; }
.hero .hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero .btn-primary { background: rgba(255,255,255,0.95); color: var(--primary-dark); box-shadow: var(--shadow-lg); }
.hero .btn-outline-light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.4); }

/* ========== 页面标题区 ========== */
.page-header {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}
.page-header h2, .page-header h3, .page-header h4 { font-weight: 800; letter-spacing: -0.02em; }
.page-header p { color: var(--text-secondary); font-weight: 600; }

/* ========== 搜索框 ========== */
.search-box { position: relative; display: flex; align-items: center; }
.search-icon { position: absolute; left: 0.9rem; color: var(--text-muted); font-size: 0.85rem; pointer-events: none; z-index: 2; }
.search-box .form-control { padding-left: 2.3rem; border-radius: var(--radius-full); min-width: 200px; }

/* ========== 标签筛选 ========== */
.tag-filter {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.filter-label { font-weight: 800; color: var(--text-secondary); font-size: 0.88rem; margin-right: 0.25rem; }

/* ========== 彩色标签徽章 ========== */
.badge-grid {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem; font-weight: 800;
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    border: 1px solid transparent;
    transition: var(--transition-fast);
    line-height: 1.4;
}
.badge-grid:nth-child(6n+1) { background: #fce7f3; color: #be185d; }
.badge-grid:nth-child(6n+2) { background: #fef3c7; color: #b45309; }
.badge-grid:nth-child(6n+3) { background: #d1fae5; color: #047857; }
.badge-grid:nth-child(6n+4) { background: #ede9fe; color: #6d28d9; }
.badge-grid:nth-child(6n+5) { background: #cffafe; color: #0e7490; }
.badge-grid:nth-child(6n+6) { background: #ffedd5; color: #c2410c; }
[data-theme="dark"] .badge-grid { background: rgba(255,255,255,0.06) !important; color: var(--text-primary) !important; border-color: var(--border-color); }
[data-theme="dark"] .badge-grid:nth-child(6n+1) { color: #f9a8d4 !important; }
[data-theme="dark"] .badge-grid:nth-child(6n+2) { color: #fcd34d !important; }
[data-theme="dark"] .badge-grid:nth-child(6n+3) { color: #6ee7b7 !important; }
[data-theme="dark"] .badge-grid:nth-child(6n+4) { color: #c4b5fd !important; }
[data-theme="dark"] .badge-grid:nth-child(6n+5) { color: #67e8f9 !important; }
[data-theme="dark"] .badge-grid:nth-child(6n+6) { color: #fdba74 !important; }
a:hover .badge-grid { transform: translateY(-2px) scale(1.05); }
.badge-light { background: rgba(255,255,255,0.85) !important; color: var(--primary) !important; }

/* ========== 画廊网格 ========== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ========== 作品卡片 ========== */
.gallery-grid .card, .card.hover-lift {
    overflow: hidden;
    border: 1px solid var(--border-light);
    position: relative;
}
.card.hover-lift::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--primary-grad);
    opacity: 0;
    transition: var(--transition-base);
    z-index: 2;
}
.card.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}
.card.hover-lift:hover::before { opacity: 1; }

.card-image-wrapper {
    overflow: hidden;
    background: var(--bg-muted);
    position: relative;
}
.card-image-wrapper img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.card.hover-lift:hover .card-image-wrapper img { transform: scale(1.1); }

.card-placeholder {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-grad);
    color: rgba(255,255,255,0.6);
    font-size: 3rem;
}

.card-body { padding: 1.1rem 1.2rem; }
.card-title { font-weight: 800; color: var(--text-primary); font-size: 0.98rem; margin-bottom: 0.4rem; letter-spacing: -0.01em; }
.card-meta { font-size: 0.8rem; color: var(--text-secondary); font-weight: 600; }
.card-meta a { color: var(--text-secondary); }
.card-meta a:hover { color: var(--primary); }
.card-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.media-bg { background: linear-gradient(135deg, var(--primary-ultra-light), var(--bg-muted)); }

/* ========== 热门侧栏 ========== */
.trending-rail {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}
.trending-rail h6 { font-weight: 800; }
.trending-item { display: flex; gap: .75rem; align-items: center; padding: .6rem 0; border-bottom: 1px dashed var(--border-color); transition: var(--transition-fast); }
.trending-item:last-child { border-bottom: none; }
.trending-item:hover { transform: translateX(4px); }
.trending-rank {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm); font-weight: 800; font-size: .8rem;
    background: var(--bg-muted); color: var(--text-secondary);
}
.trending-rank.top1 { background: var(--accent-grad); color:#fff; }
.trending-rank.top2 { background: linear-gradient(135deg,#94a3b8,#64748b); color:#fff; }
.trending-rank.top3 { background: linear-gradient(135deg,#f59e0b,#d97706); color:#fff; }
.trending-thumb { width: 52px; height: 52px; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-muted); flex-shrink: 0; }
.trending-thumb-ph { width: 52px; height: 52px; border-radius: var(--radius-sm); background: var(--primary-grad); flex-shrink: 0; display:flex; align-items:center; justify-content:center; color: rgba(255,255,255,.7); }
.trending-info { min-width: 0; }
.trending-title { font-weight: 700; font-size: .9rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trending-meta { font-size: .75rem; color: var(--text-muted); font-weight: 600; }

/* ========== 加载更多 ========== */
.load-more-wrap { text-align: center; margin: 2rem 0; }
.btn-load-more {
    background: var(--bg-card); color: var(--text-secondary);
    border: 1.5px dashed var(--border-color);
    border-radius: var(--radius-full);
    padding: .65rem 2rem; font-weight: 700; cursor: pointer;
    transition: var(--transition-base);
}
.btn-load-more:hover:not(:disabled) { color: var(--primary); border-color: var(--primary-light); background: var(--primary-ultra-light); transform: translateY(-2px); }
.load-more-end { color: var(--text-muted); font-weight: 600; font-size: .9rem; }

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}
.empty-state i {
    font-size: 4rem;
    background: var(--primary-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.7;
}
.empty-state h5 { font-weight: 800; color: var(--text-secondary); }

/* ========== 提示框 ========== */
.alert {
    border: none;
    border-radius: var(--radius-md);
    padding: 0.9rem 1.2rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}
.alert-success { background: var(--success-light); color: var(--success); }
.alert-info { background: var(--info-light); color: var(--info); }
.alert-warning { background: var(--warning-light); color: var(--warning); }
.alert-danger { background: var(--danger-light); color: var(--danger); }
.alert-dismissible .btn-close { filter: invert(0.5); }

/* ========== 分页 ========== */
.pagination { gap: 0.35rem; }
.page-item .page-link {
    border: none; border-radius: var(--radius-sm);
    min-width: 38px; text-align: center; font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}
.page-item .page-link:hover { background: var(--primary-ultra-light); color: var(--primary); transform: translateY(-2px); }
.page-item.active .page-link { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-primary); }
.page-item.disabled .page-link { opacity: 0.45; background: var(--bg-muted); }

/* ========== 头像 ========== */
.avatar, .avatar-circle {
    width: 64px; height: 64px;
    border-radius: var(--radius-full);
    background: var(--primary-grad);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.8rem; font-weight: 800;
    box-shadow: var(--shadow-primary);
    text-transform: uppercase;
}
.avatar-circle { width: 48px; height: 48px; font-size: 1.4rem; }

/* ========== 统计 ========== */
.stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem;
    text-align: center;
}
.stat-item { padding: 0.5rem 0.25rem; }
.stat-value {
    font-size: 1.5rem; font-weight: 800;
    background: var(--primary-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}
.stat-label { font-size: 0.72rem; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.15rem; }
.stat-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.25rem; box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* ========== 状态标签 ========== */
.status-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.25rem 0.75rem; border-radius: var(--radius-full);
    font-size: 0.75rem; font-weight: 800;
}
.status-badge.pending { background: var(--warning-light); color: var(--warning); }
.status-badge.approved { background: var(--success-light); color: var(--success); }
.status-badge.rejected { background: var(--danger-light); color: var(--danger); }
.announcement-status-badge { font-weight: 800; }
.announcement-status-badge.published { color: var(--success); }
.announcement-status-badge.draft { color: var(--text-muted); }

/* ========== 等级徽章 ========== */
.level-badge {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .2rem .7rem; border-radius: var(--radius-full);
    font-size: .72rem; font-weight: 800;
    color: #fff;
    background: var(--accent-grad);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,.25);
}
.level-badge .lv-num { background: rgba(255,255,255,.25); border-radius: var(--radius-full); padding: 0 .35rem; font-size: .62rem; }
.level-progress { height: 8px; border-radius: var(--radius-full); background: var(--bg-muted); overflow: hidden; }
.level-progress > span { display: block; height: 100%; background: var(--primary-grad); border-radius: var(--radius-full); transition: width 1s var(--transition-spring); }
.level-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.25rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-light);
}
.level-card .level-badge { font-size: .9rem; padding: .35rem 1rem; }

/* ========== 作品详情页 ========== */
.post-header { margin-bottom: 1rem; }
.post-title { font-weight: 800; letter-spacing: -0.02em; color: var(--text-primary); }
.post-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; color: var(--text-secondary); font-weight: 600; margin-top: 0.5rem;
}
.post-meta a { color: var(--text-secondary); }
.post-meta a:hover { color: var(--primary); }
.post-meta-divider { color: var(--text-muted); opacity: 0.6; }

/* 粘性操作栏 */
.sticky-action-bar {
    position: sticky; top: 70px; z-index: 20;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: .6rem .8rem;
    box-shadow: var(--shadow-md);
    display: flex; gap: .5rem; align-items: center; flex-wrap: wrap;
}

/* ========== 用户卡片 ========== */
.user-card { text-align: center; background: var(--bg-card); }
.user-card .avatar { margin: 0 auto 0.75rem; }
.username { font-weight: 800; color: var(--text-primary); margin-bottom: 0.15rem; }
.user-card .role, .role {
    display: inline-block; font-size: 0.72rem; font-weight: 700;
    color: var(--text-muted); background: var(--bg-muted);
    padding: 0.15rem 0.6rem; border-radius: var(--radius-full);
}

/* ========== 信息卡片 ========== */
.info-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.5rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-light);
}
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 0.55rem 0; border-bottom: 1px dashed var(--border-color); }
.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-weight: 600; font-size: 0.85rem; }
.info-value { color: var(--text-primary); font-weight: 700; font-size: 0.85rem; }

/* ========== 评论区 ========== */
.comment-card {
    background: var(--bg-muted);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.6rem;
    transition: var(--transition-fast);
}
.comment-card:hover { background: var(--primary-ultra-light); }
.comment-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 0.3rem; }
.comment-body { color: var(--text-primary); font-weight: 500; line-height: 1.6; word-break: break-word; }
.comment-delete-btn { color: var(--text-muted); cursor: pointer; transition: var(--transition-fast); }
.comment-delete-btn:hover { color: var(--danger); }

/* ========== 分享页 / 登录注册 ========== */
.share-card, .auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    position: relative; overflow: hidden;
}
.share-card::before, .auth-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 6px; background: var(--primary-grad);
}
.share-header, .auth-card .text-center { text-align: center; margin-bottom: 1.75rem; }
.share-icon, .auth-icon {
    width: 72px; height: 72px; margin: 0 auto 1rem;
    border-radius: var(--radius-full);
    background: var(--primary-grad);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem; box-shadow: var(--shadow-primary);
}
.share-title, .auth-title { font-weight: 800; color: var(--text-primary); letter-spacing: -0.02em; }
.share-subtitle, .auth-subtitle { color: var(--text-secondary); font-weight: 600; }
.auth-card { max-width: 460px; margin: 1rem auto; }
.auth-split-brand {
    background: var(--primary-grad); color: #fff;
    border-radius: var(--radius-xl); padding: 2rem;
    display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
}
.auth-split-brand::after {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.2) 1.5px, transparent 1.5px);
    background-size: 22px 22px; opacity: .5; pointer-events: none;
}

/* ========== 导入预览 ========== */
.import-preview {
    background: var(--primary-ultra-light);
    border-radius: var(--radius-md);
    padding: 1rem; border: 1px dashed var(--primary-light);
}
.import-preview-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.import-preview-title { font-weight: 800; color: var(--primary-dark); }
.grid-data {
    background: #0f172a; color: #67e8f9;
    border-radius: var(--radius-sm);
    padding: 0.75rem; overflow: auto;
    font-size: 0.78rem; line-height: 1.5; max-height: 200px;
}

/* ========== 个人主页 ========== */
.profile-header {
    background: var(--primary-grad); color: #fff;
    border-radius: var(--radius-lg); padding: 2rem;
    box-shadow: var(--shadow-primary);
    text-align: center; position: relative; overflow: hidden;
}
.profile-header::after {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 60%),
        radial-gradient(rgba(255,255,255,0.12) 1.5px, transparent 1.5px);
    background-size: auto, 22px 22px;
    pointer-events: none;
}
.profile-header > * { position: relative; z-index: 1; }
.profile-avatar {
    width: 96px; height: 96px; border-radius: var(--radius-full);
    background: rgba(255,255,255,0.25);
    border: 4px solid rgba(255,255,255,0.5);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 800; margin-bottom: 0.75rem;
    overflow: hidden;
}
.profile-name { font-weight: 800; font-size: 1.5rem; margin-bottom: 0.25rem; }
.profile-bio { opacity: 0.9; font-weight: 600; max-width: 480px; margin: 0.5rem auto 0; }
.profile-joined { opacity: 0.85; font-size: 0.85rem; font-weight: 600; margin-top: 0.5rem; }

/* ========== 拼豆网格查看器 ========== */
.grid-viewer { background: var(--bg-card); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--border-light); overflow: hidden; }
.gv-toolbar {
    display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
    padding: .75rem 1rem; background: var(--bg-muted);
    border-bottom: 1px solid var(--border-light);
}
.gv-toolbar .gv-title { font-weight: 800; color: var(--text-primary); margin-right: auto; }
.gv-seg { display: inline-flex; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-full); padding: 2px; }
.gv-seg button {
    border: none; background: transparent; color: var(--text-secondary);
    font-weight: 700; font-size: .8rem; padding: .3rem .8rem;
    border-radius: var(--radius-full); cursor: pointer; transition: var(--transition-fast);
}
.gv-seg button.active { background: var(--primary-grad); color: #fff; box-shadow: var(--shadow-primary); }
.gv-icon-btn {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--bg-card);
    color: var(--text-secondary); cursor: pointer; transition: var(--transition-fast);
    display: inline-flex; align-items: center; justify-content: center;
}
.gv-icon-btn:hover { color: var(--primary); border-color: var(--primary-light); background: var(--primary-ultra-light); }
.gv-stage {
    background:
        linear-gradient(45deg, var(--bg-muted) 25%, transparent 25%),
        linear-gradient(-45deg, var(--bg-muted) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--bg-muted) 75%),
        linear-gradient(-45deg, transparent 75%, var(--bg-muted) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0;
    background-color: var(--bg-card);
    overflow: auto; padding: 1.5rem;
    max-height: 560px;
    display: flex; justify-content: center; align-items: flex-start;
}
.bead-grid-scroll { overflow: auto; max-width: 100%; }
.bead-grid { display: grid; gap: 2px; }
.bead-cell {
    width: var(--cell-size, 36px); height: var(--cell-size, 36px);
    display: flex; align-items: center; justify-content: center;
    border-radius: 4px; cursor: pointer;
    background: var(--cell-color, var(--bg-muted));
    color: rgba(255,255,255,.95);
    font-size: calc(var(--cell-size, 36px) * 0.42);
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
    transition: transform .15s ease, box-shadow .15s ease;
    user-select: none;
}
.bead-cell:hover { transform: scale(1.15); z-index: 2; box-shadow: var(--shadow-md); }
.bead-cell.is-hl { outline: 3px solid var(--accent); outline-offset: 1px; z-index: 3; }
.bead-cell.dim { opacity: .2; }
/* 字符模式：浅色底 + 深字 */
.gv-char .bead-cell { background: #fff; color: var(--text-primary); text-shadow: none; box-shadow: inset 0 0 0 1px var(--border-color); }
.gv-char .bead-cell::before { content: ''; position: absolute; }
[data-theme="dark"] .gv-char .bead-cell { background: var(--bg-muted); }
.gv-char .bead-cell.is-hl { background: var(--primary-ultra-light); }
/* 色块模式：不显示字 */
.gv-color .bead-cell span { display: none; }
/* 混合模式：默认即色块+字（默认样式已含） */

.gv-stats {
    border-top: 1px solid var(--border-light);
    padding: 1rem; background: var(--bg-card);
}
.gv-stats-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.gv-stats-head .gv-stats-title { font-weight: 800; color: var(--text-primary); }
.gv-stats-head .gv-stats-meta { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.gv-bead-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; max-height: 240px; overflow: auto; }
.gv-bead-item {
    display: flex; align-items: center; gap: .5rem;
    padding: .35rem .55rem; border-radius: var(--radius-sm);
    background: var(--bg-muted); cursor: pointer;
    transition: var(--transition-fast); font-size: .8rem; font-weight: 600;
}
.gv-bead-item:hover { background: var(--primary-ultra-light); }
.gv-bead-item.active { background: var(--accent-light); color: var(--accent-dark); }
.gv-bead-swatch { width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.gv-bead-char { font-weight: 800; min-width: 1.2em; text-align: center; }
.gv-bead-count { margin-left: auto; color: var(--text-muted); }
.gv-empty { padding: 3rem 1rem; text-align: center; color: var(--text-muted); }

/* ========== 相关推荐 ========== */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }

/* ========== Modal ========== */
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); overflow: hidden; background: var(--bg-elevated); color: var(--text-primary); }
.modal-header { background: var(--bg-muted); border-bottom: 1px solid var(--border-color); padding: 1.1rem 1.5rem; }
.modal-title { font-weight: 800; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid var(--border-color); padding: 1rem 1.5rem; }
.modal-backdrop.show { opacity: .55; }

/* 分享弹窗 */
.share-modal-row { display: flex; gap: .5rem; align-items: center; }
.share-modal-row input { flex: 1; }
.share-quick { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.share-quick a {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.1rem; transition: var(--transition-base);
}

/* ========== Toast ========== */
.pd-toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.pd-toast {
    background: var(--bg-elevated); color: var(--text-primary);
    padding: .75rem 1.1rem; border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-color);
    font-weight: 600; font-size: .9rem;
    transform: translateX(120%); opacity: 0;
    transition: transform .3s var(--transition-spring), opacity .3s;
    border-left: 4px solid var(--primary);
}
.pd-toast.show { transform: translateX(0); opacity: 1; }
.pd-toast-success { border-left-color: var(--success); }
.pd-toast-danger { border-left-color: var(--danger); }

/* ========== 管理面板 ========== */
.admin-page-header {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem; box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem; border: 1px solid var(--border-light);
}
.admin-sidebar .nav-link {
    border-radius: var(--radius-md); color: var(--text-secondary);
    font-weight: 700; padding: 0.6rem 1rem; margin-bottom: 0.25rem;
    transition: var(--transition-fast);
}
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: var(--primary-ultra-light); color: var(--primary-dark); }

/* ========== 表格 ========== */
.table { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); color: var(--text-primary); }
.table thead th {
    background: var(--bg-muted); color: var(--text-secondary);
    font-weight: 800; text-transform: uppercase; font-size: 0.78rem;
    letter-spacing: 0.05em; border: none; padding: 0.85rem 1rem;
}
.table tbody td { padding: 0.85rem 1rem; border-color: var(--border-light); vertical-align: middle; font-weight: 600; }
.table tbody tr { transition: var(--transition-fast); background: var(--bg-card); }
.table tbody tr:hover { background: var(--primary-ultra-light); }
.table-dark thead th { background: var(--primary-dark); color: #fff; }
.admin-table, .log-table { background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; }
.tag-cell { font-weight: 800; }
.action-btn { padding: 0.25rem 0.6rem; border-radius: var(--radius-sm); font-size: 0.78rem; font-weight: 700; }

/* ========== 审核卡片 ========== */
.review-card {
    background: var(--bg-card); border-radius: var(--radius-lg);
    padding: 1.25rem; box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light); transition: var(--transition-base); margin-bottom: 1rem;
}
.review-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.review-title { font-weight: 800; color: var(--text-primary); margin-bottom: 0.25rem; }
.review-desc { color: var(--text-secondary); font-weight: 500; font-size: 0.88rem; }
.review-meta { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin: 0.5rem 0; }
.review-meta-item { display: inline-flex; align-items: center; gap: 0.3rem; }
.review-actions { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.review-thumbnail, .review-thumb-placeholder { border-radius: var(--radius-md); overflow: hidden; background: var(--bg-muted); margin-bottom: 0.75rem; }
.review-thumb-placeholder { height: 140px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 2rem; background: var(--primary-grad); color: rgba(255,255,255,0.6); }
.review-reject-reason, .review-reviewed-at { font-size: 0.82rem; font-weight: 600; color: var(--text-secondary); margin-top: 0.4rem; }

/* ========== 通知项 ========== */
.notification-list { }
.notification-item { border-left: 3px solid transparent; transition: all var(--transition-fast); background: var(--bg-card); }
.notification-item.unread { border-left-color: var(--primary); background: var(--primary-ultra-light); }
.notification-item:hover { box-shadow: var(--shadow-sm); }
.notif-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: var(--bg-muted); border-radius: 50%; flex-shrink: 0; font-size: 1rem; }
.notification-item.unread .notif-icon { background: var(--primary-ultra-light); }
.unread-dot { display: inline-block; width: 8px; height: 8px; background: var(--primary); border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.mark-read-btn { color: var(--primary); background: var(--primary-ultra-light); border: 1px solid var(--primary-light); }
.mark-read-btn:hover { background: var(--primary); color: #fff; }

/* ========== 动画 ========== */
.fade-in { animation: fade-in-up 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
@keyframes fade-in-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border-light) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: var(--radius-sm);
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner-border { color: var(--primary); }

/* 管理仪表盘统计卡（flex 布局，兼容原内联） */
.stat-card.pending-alert { border: 2px solid rgba(245,158,11,0.3); animation: pulse-border 2s infinite; }
@keyframes pulse-border { 0%,100% { border-color: rgba(245,158,11,0.3); } 50% { border-color: rgba(245,158,11,0.6); } }
.stat-icon { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); font-size: 1.25rem; flex-shrink: 0; }
.stat-content { flex: 1; min-width: 0; }
.stat-trend { font-size: 0.75rem; margin-top: 2px; }
.chart-wrap { position: relative; height: 220px; }

/* ========== 工具类补丁 ========== */
.bg-card { background: var(--bg-card) !important; }
.bg-light { background: var(--bg-muted) !important; }
.opacity-50 { opacity: 0.55; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }
.border-color { border-color: var(--border-color) !important; }
.text-danger { color: var(--danger) !important; }
footer a:hover { color: var(--primary) !important; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; }
    .share-card, .auth-card { padding: 1.75rem 1.25rem; }
    .page-header { padding: 1.1rem; }
    .navbar-brand { font-size: 1.25rem; }
    .stat-value { font-size: 1.25rem; }
    .hero { padding: 1.75rem 1.25rem; }
    .sticky-action-bar { top: 64px; }
    .gv-stats-head { flex-direction: column; align-items: flex-start; gap: .25rem; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { gap: 0.25rem; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========== 减少动效偏好 ========== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    html { scroll-behavior: auto; }
}
