/**
 * 表白墙后台管理样式表
 * v2.1.0 布局改版：采用 clearlove-lovecards v1.8.3 后台布局语言
 * - 玻璃拟态固定侧边栏（280px）+ 渐变 Logo
 * - 渐变色品牌（绿 #66bb6a → 蓝 #42a5f5）
 * - 大圆角卡片（20px）+ 悬浮动效 + 入场动画
 * - 移动端抽屉式侧边栏 + 汉堡按钮
 */

/* ========== 基础与设计变量 ========== */
:root {
    --brand-grad: linear-gradient(135deg, #66bb6a 0%, #42a5f5 100%);
    --brand-green: #66bb6a;
    --brand-blue: #42a5f5;
    --ink: #1a202c;
    --ink-2: #4a5568;
    --ink-3: #718096;
    --line: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.95);
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.08);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: var(--ink-2);
    min-height: 100vh;
}

a { color: var(--brand-blue); text-decoration: none; }
a:hover { color: var(--brand-green); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(102, 187, 106, 0.4); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ========== 登录页 ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeInUp 0.6s ease-out;
}

.login-header { text-align: center; margin-bottom: 36px; }

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-title i {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    margin-top: 10px;
    font-size: 14px;
    color: var(--ink-3);
}

/* ========== 布局容器 ========== */
.admin-container { min-height: 100vh; }

/* ========== 侧边栏（玻璃拟态） ========== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: width 0.4s var(--ease), transform 0.4s var(--ease);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 187, 106, 0.4) transparent;
}

.sidebar-header {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sidebar-logo {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    background: var(--brand-grad);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 8px 24px rgba(102, 187, 106, 0.3);
}

.sidebar-title {
    font-size: 20px;
    font-weight: 700;
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    white-space: nowrap;
}

.sidebar-version {
    font-size: 11px;
    color: var(--ink-3);
    background: rgba(102, 187, 106, 0.12);
    border-radius: 999px;
    padding: 2px 10px;
    white-space: nowrap;
}

.sidebar-toggle {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink-3);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    background: rgba(113, 128, 150, 0.08);
}

.sidebar-toggle:hover { background: rgba(102, 187, 106, 0.15); color: var(--brand-green); }

/* 桌面端折叠态 */
.sidebar.collapsed { width: 76px; }
.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .sidebar-version,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .menu-group-title span,
.sidebar.collapsed .menu-arrow,
.sidebar.collapsed .menu-item .tag { display: none; }
.sidebar.collapsed .sidebar-header { flex-direction: column; padding: 20px 12px; }
.sidebar.collapsed .sidebar-toggle { margin-left: 0; transform: rotate(180deg); }
.sidebar.collapsed .menu-item,
.sidebar.collapsed .menu-group-title { justify-content: center; }
.sidebar.collapsed .menu-item i,
.sidebar.collapsed .menu-group-title i { margin: 0; }
/* 折叠时主内容区同步收窄（:has 现代浏览器均支持） */
body:has(.sidebar.collapsed) .main-content { margin-left: 76px; }

.sidebar-menu { padding: 20px 14px 28px; }

/* ========== 菜单项 ========== */
.menu-item {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    margin-bottom: 6px;
    border-radius: var(--radius-md);
    color: var(--ink-2);
    text-decoration: none;
    font-size: 14.5px;
    transition: all 0.3s var(--ease);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--brand-grad);
    transform: scaleY(0);
    transition: transform 0.3s var(--ease);
}

.menu-item i {
    width: 22px;
    margin-right: 14px;
    font-size: 16px;
    text-align: center;
    flex: 0 0 22px;
}

.menu-item:hover {
    background: rgba(102, 187, 106, 0.1);
    transform: translateX(4px);
    color: var(--ink);
}

.menu-item.active {
    background: linear-gradient(135deg, rgba(102, 187, 106, 0.15) 0%, rgba(66, 165, 245, 0.15) 100%);
    color: var(--ink);
    font-weight: 600;
}

.menu-item.active::before { transform: scaleY(1); }
.menu-item .tag { margin-left: auto; }

.menu-logout { color: #e53e3e; margin-top: 20px; }
.menu-logout:hover { background: rgba(229, 62, 62, 0.1); color: #e53e3e; }

.menu-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.06);
    margin: 16px 8px;
}

/* ========== 可折叠菜单组 ========== */
.menu-group { margin-bottom: 4px; }

.menu-group-title {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    color: var(--ink-3);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    user-select: none;
    white-space: nowrap;
}

.menu-group-title i { width: 22px; margin-right: 14px; font-size: 15px; text-align: center; flex: 0 0 22px; }
.menu-group-title:hover { background: rgba(102, 187, 106, 0.08); color: var(--ink-2); }

.menu-group-title.open { color: var(--brand-green); }
.menu-group-title.open i:first-child { color: var(--brand-green); }

.menu-arrow {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.3s var(--ease);
}

.menu-group-title.open .menu-arrow { transform: rotate(180deg); }

.menu-group-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease);
}

.menu-group-title.open + .menu-group-items,
.menu-group-items.open { max-height: 600px; }

.menu-group-items .menu-item { padding: 11px 18px 11px 24px; font-size: 14px; }

/* ========== 移动端 ========== */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1001;
    width: 48px;
    height: 48px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    border: none;
    color: var(--ink-2);
    font-size: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.mobile-menu-btn:hover { transform: scale(1.05); }

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show { display: block; opacity: 1; }

/* ========== 主内容区 ========== */
.main-content {
    margin-left: 280px;
    padding: 32px;
    min-height: 100vh;
    transition: margin-left 0.4s var(--ease);
}

.content-header { margin-bottom: 28px; animation: fadeInDown 0.6s ease-out; }

.page-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 14px;
}

.page-title i {
    background: var(--brand-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-title { font-size: 30px; font-weight: 700; color: var(--ink); }
.dashboard-subtitle { margin-top: 6px; font-size: 14px; color: var(--ink-3); }

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: all 0.4s var(--ease);
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.25s; }
.stat-card:nth-child(4) { animation-delay: 0.35s; }
.stat-card:nth-child(5) { animation-delay: 0.45s; }
.stat-card:nth-child(6) { animation-delay: 0.55s; }

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* 图标在上、数值在下的竖排布局（v1.8.3 风格） */
.stat-header {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1.2;
}

.stat-label {
    font-size: 13.5px;
    color: var(--ink-3);
    font-weight: 500;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.stat-icon.green  { background: linear-gradient(135deg, rgba(102, 187, 106, 0.2), rgba(102, 187, 106, 0.08)); color: #66bb6a; }
.stat-icon.blue   { background: linear-gradient(135deg, rgba(66, 165, 245, 0.2), rgba(66, 165, 245, 0.08)); color: #42a5f5; }
.stat-icon.purple { background: linear-gradient(135deg, rgba(156, 39, 176, 0.2), rgba(156, 39, 176, 0.08)); color: #9c27b0; }
.stat-icon.orange { background: linear-gradient(135deg, rgba(255, 152, 0, 0.2), rgba(255, 152, 0, 0.08)); color: #fb8c00; }
.stat-icon.yellow { background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.08)); color: #ffc107; }
.stat-icon.red    { background: linear-gradient(135deg, rgba(239, 83, 80, 0.2), rgba(239, 83, 80, 0.08)); color: #ef5350; }

/* ========== 卡片 ========== */
.card,
.content-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-card);
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    animation: fadeInUp 0.6s ease-out;
}

.card-header {
    font-size: 18px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-title i, .card-header i { color: var(--brand-green); }

.card-body { font-size: 14px; }
.card-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

.admin-section { margin-bottom: 24px; }

.settings-form { max-width: 760px; }

.settings-section {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 18px;
}

.settings-section h3 { font-size: 15px; color: var(--ink); margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.section-desc { font-size: 13px; color: var(--ink-3); margin: 4px 0 14px; line-height: 1.6; }

/* ========== 表格 ========== */
.table-container {
    background: #fff;
    border-radius: 16px;
    overflow: auto;
    border: 1px solid var(--line);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    min-width: 640px;
}

.data-table th {
    background: #f7fafc;
    color: var(--ink-3);
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    white-space: nowrap;
    border-bottom: 2px solid var(--line);
    font-size: 12.5px;
    letter-spacing: 0.3px;
}

.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #edf2f7;
    color: var(--ink-2);
    vertical-align: middle;
}

.data-table tbody tr { transition: background 0.2s ease; }
.data-table tbody tr:hover { background: rgba(102, 187, 106, 0.05); }
.data-table tbody tr:last-child td { border-bottom: none; }

.posts-table img, .data-table img { border-radius: 8px; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 20px; }

.form-label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-2);
    margin-bottom: 8px;
}

.form-label .required { color: #e53e3e; margin-left: 2px; }

.form-input,
.form-select,
.form-control,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--line);
    border-radius: var(--radius-md);
    font-size: 14.5px;
    transition: all 0.3s var(--ease);
    background: #fff;
    color: var(--ink);
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-control:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--brand-green);
    box-shadow: 0 0 0 4px rgba(102, 187, 106, 0.1);
}

.form-textarea { resize: vertical; min-height: 110px; }

.form-select { appearance: auto; cursor: pointer; }

.form-hint { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }

.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

.form-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }

.form-checkbox { width: 16px; height: 16px; accent-color: var(--brand-green); cursor: pointer; }

/* 开关 */
.form-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex: 0 0 52px;
}

.form-switch input { opacity: 0; width: 0; height: 0; }

.form-switch-slider {
    position: absolute;
    inset: 0;
    background: var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.form-switch-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.form-switch input:checked + .form-switch-slider { background: var(--brand-grad); }
.form-switch input:checked + .form-switch-slider::before { transform: translateX(24px); }

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--line);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    display: inline-block;
    vertical-align: middle;
}

.toggle-switch.active { background: var(--brand-grad); }
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.toggle-switch.active::after { transform: translateX(24px); }

/* ========== 按钮 ========== */
.btn {
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 4px 16px rgba(102, 187, 106, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(102, 187, 106, 0.4); color: #fff; }

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(229, 62, 62, 0.3);
}
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(229, 62, 62, 0.4); color: #fff; }

.btn-secondary { background: rgba(113, 128, 150, 0.1); color: var(--ink-2); }
.btn-secondary:hover { background: rgba(113, 128, 150, 0.2); color: var(--ink); }

.btn-info { background: linear-gradient(135deg, #4fc3f7, #29b6f6); color: #fff; }
.btn-info:hover { transform: translateY(-2px); color: #fff; }

.btn-success { background: linear-gradient(135deg, #81c784, #66bb6a); color: #fff; }
.btn-success:hover { transform: translateY(-2px); color: #fff; }

.btn-warning { background: linear-gradient(135deg, #ffb74d, #ffa726); color: #fff; }
.btn-warning:hover { transform: translateY(-2px); color: #fff; }

.btn-outline { background: transparent; border: 2px solid var(--line); color: var(--ink-2); }
.btn-outline:hover { border-color: var(--brand-green); color: var(--brand-green); background: rgba(102, 187, 106, 0.06); }

.btn-block { width: 100%; }

.btn-sm { padding: 8px 14px; font-size: 12.5px; border-radius: 10px; }
.btn-sm2 { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 4px 10px; font-size: 11.5px; border-radius: 8px; }
.btn-cancel { background: rgba(113, 128, 150, 0.1); color: var(--ink-3); }

.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.btn-group-sm .btn { padding: 6px 12px; font-size: 12px; }

.btn-exec { background: rgba(102, 187, 106, 0.12); color: #2e7d32; }
.btn-exec:hover { background: rgba(102, 187, 106, 0.22); }

/* ========== 标签 ========== */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 500;
    background: #f1f5f9;
    color: var(--ink-3);
    white-space: nowrap;
}

.tag-success { background: #e8f5e9; color: #2e7d32; }
.tag-danger  { background: #ffebee; color: #c62828; }
.tag-warning { background: #fff8e1; color: #f57f17; }
.tag-info    { background: #e3f2fd; color: #1565c0; }
.tag-anon    { background: #f3e5f5; color: #7b1fa2; }
.tag-ban     { background: #ffebee; color: #c62828; }
.tag-local   { background: #e8f5e9; color: #2e7d32; }
.tag-top     { background: #fff8e1; color: #f57f17; }

.cloud-tag { display: inline-flex; align-items: center; gap: 6px; background: #e3f2fd; color: #1565c0; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 500; }

.word-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(102, 187, 106, 0.1);
    color: #2e7d32;
    border: 1px solid rgba(102, 187, 106, 0.3);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    margin: 0 6px 8px 0;
}

.preset-tag-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    border: 2px solid var(--line);
    cursor: pointer;
    font-size: 13.5px;
    transition: all 0.3s var(--ease);
    background: #fff;
}

.preset-tag-option:hover { border-color: rgba(102, 187, 106, 0.5); transform: translateY(-2px); }
.preset-tag-option.active { border-color: var(--brand-green); background: rgba(102, 187, 106, 0.08); color: #2e7d32; font-weight: 600; }

.user-tags-container { display: flex; flex-wrap: wrap; gap: 8px; }
.user-tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(66, 165, 245, 0.1);
    color: #1565c0;
    border: 1px solid rgba(66, 165, 245, 0.3);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 999px;
}

/* ========== 提示条 ========== */
.alert {
    padding: 13px 18px;
    border-radius: var(--radius-md);
    font-size: 13.5px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.5;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-danger, .alert-error { background: #ffebee; color: #c62828; border: 1px solid #ffcdd2; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #bbdefb; }
.alert-warning { background: #fff8e1; color: #f57f17; border: 1px solid #ffecb3; }

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--ink-3);
    font-size: 14px;
}

.empty-state i { font-size: 40px; margin-bottom: 14px; opacity: 0.4; display: block; }

/* ========== 信息网格 ========== */
.info-box {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    padding: 16px 20px;
}

.info-box strong { color: var(--ink); }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

/* ========== 弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
    padding: 20px;
}

.modal.active { display: flex; }

.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 30px;
    max-width: 520px;
    width: 100%;
    max-height: 82vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
}

.modal-header {
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-body { font-size: 14px; line-height: 1.7; }
.modal-footer { margin-top: 22px; display: flex; justify-content: flex-end; gap: 12px; }

/* ========== 批量操作条 ========== */
.batch-bar {
    position: sticky;
    top: 12px;
    z-index: 50;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: 13.5px;
}

.batch-checkbox { width: 15px; height: 15px; accent-color: var(--brand-green); cursor: pointer; }

/* ========== 主题选择 ========== */
.theme-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.theme-option {
    position: relative;
    height: 96px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s var(--ease);
    overflow: hidden;
    border: 3px solid transparent;
    background: #fff;
}

.theme-option:hover { transform: scale(1.04); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); }

.theme-option.selected, .theme-option.active {
    border-color: var(--brand-green);
    box-shadow: 0 8px 24px rgba(102, 187, 106, 0.3);
}

.theme-preview { height: 62px; width: 100%; border-radius: 8px 8px 0 0; }

.theme-name {
    font-size: 12px;
    text-align: center;
    padding: 8px 4px;
    color: var(--ink-2);
    font-weight: 500;
}

/* ========== 音乐来源选择 ========== */
.music-options { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }

.music-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 2px solid var(--line);
    cursor: pointer;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.3s var(--ease);
    background: #fff;
}

.music-option:hover { transform: translateY(-2px); border-color: rgba(102, 187, 106, 0.5); }

.music-option.active, .music-option.selected {
    border-color: var(--brand-green);
    background: rgba(102, 187, 106, 0.08);
    color: #2e7d32;
}

.music-option-label { font-size: 12px; color: var(--ink-3); margin-top: 6px; }

/* ========== 帖子卡片（后台列表） ========== */
.post-item {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    transition: all 0.3s var(--ease);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.post-item:hover { transform: translateX(6px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }

.post-item-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.post-item-nickname { font-weight: 600; color: var(--ink); font-size: 14px; }
.post-item-meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 12px; flex-wrap: wrap; }
.post-item-content { font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.post-item-actions { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.post-item-info { font-size: 12.5px; color: var(--ink-3); margin-top: 8px; }

.author-avatar { width: 38px; height: 38px; border-radius: 12px; object-fit: cover; }
.author-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.author-tags { display: flex; gap: 6px; flex-wrap: wrap; }

.content-preview {
    font-size: 13.5px;
    color: var(--ink-2);
    line-height: 1.6;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ========== 云端同步结果 ========== */
.sync-label { font-size: 13px; color: var(--ink-3); font-weight: 500; margin-bottom: 6px; }

.sync-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.sync-result-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 14px;
    padding: 16px;
    text-align: center;
}

.sync-value { font-size: 24px; font-weight: 700; color: var(--ink); }

/* ========== 通知与加载 ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 22px;
    color: #fff;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

.notification-success { background: linear-gradient(135deg, #81c784, #66bb6a); }
.notification-error { background: linear-gradient(135deg, #ef9a9a, #ef5350); }

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--line);
    border-top-color: var(--brand-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.chart-container { position: relative; width: 100%; }

.fade-in { animation: fadeInUp 0.5s ease-out; }

/* ========== 公告/更新弹窗（保留原有功能样式） ========== */
.admin-announcement-modal,
.admin-update-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.admin-announcement-header,
.admin-update-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 14px;
}

.admin-announcement-body,
.admin-update-body { font-size: 14px; line-height: 1.7; color: var(--ink-2); }

.admin-announcement-footer,
.admin-update-footer { margin-top: 18px; display: flex; justify-content: flex-end; gap: 12px; }

.admin-announcement-list { max-height: 320px; overflow-y: auto; }
.admin-announcement-item { padding: 12px 0; border-bottom: 1px solid #edf2f7; }
.admin-announcement-item:last-child { border-bottom: none; }
.admin-announcement-title { font-weight: 600; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.admin-announcement-text { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.admin-announcement-time { font-size: 12px; color: var(--ink-3); margin-top: 4px; }

.admin-announcement-badge {
    background: linear-gradient(135deg, #ef5350, #e53935);
    color: #fff;
    border-radius: 999px;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    padding: 0 5px;
}

.admin-announcement-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef5350; display: inline-block; }
.admin-announcement-single { background: rgba(102, 187, 106, 0.08); border-radius: 12px; padding: 16px; }
.admin-announcement-nav { display: flex; gap: 10px; align-items: center; justify-content: space-between; }

.update-version-info { font-size: 13px; color: var(--ink-3); }
.update-version-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.update-changelog { background: #f7fafc; border-radius: 12px; padding: 16px; font-size: 13px; line-height: 1.8; max-height: 260px; overflow-y: auto; }

/* ========== 通用工具类 ========== */
.text-muted { color: var(--ink-3); font-size: 12.5px; }
.count { font-weight: 700; color: var(--ink); }
.required { color: #e53e3e; }

.green { color: #66bb6a; }
.blue { color: #42a5f5; }
.purple { color: #9c27b0; }
.orange { color: #fb8c00; }
.danger { color: #e53e3e; }
.success { color: #43a047; }
.warn { color: #f57f17; }

.top-duration-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: 2px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s var(--ease);
    font-family: inherit;
}

.top-duration-btn.active, .top-duration-btn:hover { border-color: var(--brand-green); color: #2e7d32; background: rgba(102, 187, 106, 0.08); }

.region-example { font-family: monospace; background: #f7fafc; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; }
.region-test { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(40px); }
}

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

/* ========== 响应式 ========== */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .theme-options { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .theme-options { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 280px; }
    .sidebar.mobile-open { transform: translateX(0); }
    .sidebar.collapsed { width: 280px; }
    .sidebar.collapsed .sidebar-title,
    .sidebar.collapsed .sidebar-version,
    .sidebar.collapsed .menu-item span,
    .sidebar.collapsed .menu-group-title span,
    .sidebar.collapsed .menu-item .tag { display: inline; }
    .sidebar.collapsed .menu-group-title { justify-content: flex-start; }
    .sidebar.collapsed .sidebar-header { flex-direction: row; }
    .sidebar.collapsed .sidebar-toggle { margin-left: auto; transform: none; }
    .sidebar.collapsed .menu-item,
    .sidebar.collapsed .menu-group-title { justify-content: flex-start; }
    .sidebar.collapsed .menu-item i,
    .sidebar.collapsed .menu-group-title i { margin-right: 14px; }

    .main-content { margin-left: 0; padding: 76px 14px 20px; }

    .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }

    .stats-grid { grid-template-columns: 1fr; gap: 14px; }
    .page-title { font-size: 22px; }
    .stat-value { font-size: 26px; }
    .card, .content-card { padding: 18px; border-radius: 16px; }
    .form-row { flex-direction: column; }
    .modal-content { padding: 20px; }
    .table-container { border-radius: 12px; }
}
