/* ============================================================
   课程资料共享平台 - 全局样式（1:1 复刻 XingHuiSama 博客模板）
   宋体 + 毛玻璃 + 靛蓝紫 + 萤火虫 + 弹幕 + 翻页时钟 + 开场动画
   ============================================================ */
:root {
  --primary: #6366f1;        /* indigo-500 */
  --primary-600: #4f46e5;
  --purple: #a855f7;
  --pink: #ec4899;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-50: #f8fafc;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --glass: rgba(255, 255, 255, 0.40);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.40);
  --r-lg: 24px;   /* rounded-3xl */
  --r-md: 16px;   /* rounded-2xl */
  --r-sm: 12px;   /* rounded-xl */
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.10), 0 10px 10px -5px rgba(0,0,0,0.04);
  --font-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100%;
  font-family: var(--font-serif);
  color: var(--slate-800); font-size: 15px; line-height: 1.75;
  background-color: var(--slate-50);
  background-image: url('/images/bg-pc.jpg');
  background-size: cover; background-position: center; background-repeat: no-repeat; background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0; z-index: -2; background: rgba(255,255,255,0.34); backdrop-filter: blur(9px) saturate(120%); -webkit-backdrop-filter: blur(9px) saturate(120%); pointer-events: none; }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; background: linear-gradient(-45deg, #a18cd1, #fbc2eb, #a1c4fd, #c2e9fb); background-size: 400% 400%; animation: gradientMove 18s ease infinite; opacity: 0.24; mix-blend-mode: soft-light; pointer-events: none; }
@keyframes gradientMove { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
h1, h2, h3, h4, .card-title, .detail-title { font-weight: 900; letter-spacing: -0.01em; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(99,102,241,0.35); border-radius: 10px; }
* { scrollbar-width: thin; scrollbar-color: rgba(99,102,241,0.35) transparent; }

/* ===================== 布局与卡片 ===================== */
.container { max-width: 1200px; margin: 0 auto; padding: 22px 16px; }
.card {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-xl);
  padding: 22px;
  margin-bottom: 16px;
  transition: transform 0.4s, box-shadow 0.4s;
}
.card-title { font-size: 17px; font-weight: 900; margin-bottom: 16px; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px;
  padding: 8px 18px; border-radius: var(--r-sm);
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: var(--slate-600); font-size: 14px; font-weight: 700; transition: all 0.25s; white-space: nowrap;
}
.btn:hover { opacity: 0.92; transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(99,102,241,0.35); }
.btn-danger { background: linear-gradient(135deg, #f43f5e, #ef4444); color: #fff; border-color: transparent; }
.btn-success { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; border-color: transparent; }
.btn-outline { border-color: rgba(99,102,241,0.5); color: var(--primary); background: rgba(255,255,255,0.5); }
.btn-plain { background: transparent; color: var(--slate-600); border-color: transparent; }
.btn-sm { padding: 4px 12px; font-size: 13px; }
.btn-lg { padding: 11px 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ===================== 顶部导航（毛玻璃 + の + 滚动隐藏） ===================== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,0.40);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.20);
  transition: transform 0.5s;
}
.topbar.hide { transform: translateY(-100%); }
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 16px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.logo { font-size: 19px; font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; color: var(--slate-800); }
.logo .no { color: var(--primary); margin: 0 3px; }
.topbar-nav { display: flex; gap: 20px; }
.nav-link { padding: 6px 4px; font-size: 14px; font-weight: 700; color: var(--slate-700); transition: color 0.2s; white-space: nowrap; position: relative; }
.nav-link:hover { color: var(--primary); }
.nav-link.active { color: var(--primary-600); }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.user-name { color: var(--slate-700); font-weight: 700; }
.topbar-search { display: none; }

/* ===================== 首页 Hero（个人信息卡） ===================== */
.hero-card {
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  padding: 32px;
  display: flex; flex-direction: column; justify-content: space-between;
  transition: transform 0.5s; overflow: hidden; position: relative;
}
.hero-card:hover { transform: scale(1.01); }
.hero-top { display: flex; align-items: flex-start; gap: 24px; flex-wrap: wrap; }
.hero-avatar {
  width: 96px; height: 96px; border-radius: var(--r-md); flex-shrink: 0; padding: 4px;
  background: linear-gradient(135deg, #6366f1, #a855f7); box-shadow: 0 10px 24px rgba(99,102,241,0.35);
}
.hero-avatar img { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; background: #fff; }
.hero-name { font-size: 30px; font-weight: 900; letter-spacing: 0.03em; color: var(--slate-900); margin: 0 0 8px; }
.hero-bio { color: var(--slate-700); font-weight: 500; line-height: 1.7; max-width: 460px; margin: 0; }
.hero-stats { display: flex; align-items: center; gap: 24px; margin-top: 28px; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-size: 24px; font-weight: 900; color: var(--primary-600); transition: transform 0.2s; }
.stat-num.purple { color: var(--purple); }
.stat-num.pink { color: var(--pink); }
.stat-label { font-size: 11px; font-weight: 700; color: var(--slate-500); letter-spacing: 0.2em; text-transform: uppercase; }
.stat-divider { width: 1px; height: 40px; background: rgba(203,213,225,0.6); }

/* ===================== 底部看板（翻页时钟 + 运行时长 + 徽章） ===================== */
.dashboard-bar {
  border-radius: var(--r-lg);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-xl);
  overflow: hidden; display: flex; flex-wrap: wrap; align-items: stretch; margin-top: 4px;
}
.flip-clock {
  background: var(--slate-900); color: #fff; font-family: "Courier New", monospace;
  font-size: 28px; font-weight: 900; letter-spacing: 0.15em; padding: 14px 28px;
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.flip-clock::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(0,0,0,0.55); }
.dash-info { flex: 1; padding: 14px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 700; color: var(--slate-600); }
.uptime { display: flex; align-items: center; gap: 8px; }
.uptime .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  padding: 3px 10px; border-radius: 8px; background: rgba(255,255,255,0.5);
  border: 1px solid var(--glass-border); display: flex; align-items: center; gap: 5px; font-size: 12px;
}
.badge i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.icp-link { color: var(--slate-500); border-bottom: 1px dashed var(--slate-400); padding-bottom: 1px; }

/* ===================== 开场动画 ===================== */
.splash {
  position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #fff; transition: opacity 0.8s, transform 0.8s, filter 0.8s;
}
.splash.done { opacity: 0; transform: scale(1.1); filter: blur(20px); pointer-events: none; }
.splash-halo { position: relative; width: 96px; height: 96px; margin-bottom: 28px; }
.splash-halo::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  background: linear-gradient(90deg, #6366f1, #a855f7, #ec4899); opacity: 0.6; filter: blur(3px);
  animation: spin 4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash-halo img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,0.15); }
.splash-name { font-size: 22px; font-weight: 900; color: var(--slate-800); letter-spacing: 0.2em; text-transform: uppercase; margin-bottom: 6px; }
.splash-sub { font-size: 10px; font-weight: 900; color: var(--slate-400); letter-spacing: 0.5em; margin-bottom: 44px; }
.splash-track { width: 160px; height: 1.5px; background: #e2e8f0; position: relative; overflow: hidden; }
.splash-track i { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--primary); box-shadow: 0 0 12px rgba(99,102,241,0.8); animation: progress 1.8s ease-in-out forwards; }
@keyframes progress { to { width: 100%; } }

/* ===================== 萤火虫 ===================== */
.fireflies { position: fixed; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; mix-blend-mode: screen; }
.firefly { position: absolute; border-radius: 50%; background: rgba(200,255,200,0.9); animation: fireflyBreathe 5s ease-in-out infinite; }
@keyframes fireflyBreathe { 0%,100% { opacity: 0; transform: scale(0.3); } 50% { opacity: 1; transform: scale(1.2); box-shadow: 0 0 10px 3px rgba(100,255,150,0.8), 0 0 20px 6px rgba(50,255,100,0.4); } }
@keyframes float1 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(10vw,-15vh); } 66% { transform: translate(-5vw,-20vh); } }
@keyframes float2 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(-12vw,10vh); } 66% { transform: translate(8vw,15vh); } }
@keyframes float3 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(15vw,15vh); } 66% { transform: translate(-10vw,5vh); } }
@keyframes float4 { 0%,100% { transform: translate(0,0); } 33% { transform: translate(-15vw,-10vh); } 66% { transform: translate(10vw,-15vh); } }

/* ===================== 弹幕背景 ===================== */
.danmaku { position: fixed; top: 96px; height: 30vh; left: 0; right: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.danmaku-item { position: absolute; left: 0; white-space: nowrap; color: rgba(255,255,255,0.40); font-weight: 700; font-size: 18px; letter-spacing: 0.1em; user-select: none; animation: danmakuMove linear infinite; }
@keyframes danmakuMove { 0% { transform: translateX(100vw); } 100% { transform: translateX(-100%); } }

/* ===================== 资料卡片网格 ===================== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }
.material-card {
  background: var(--glass); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--glass-border); border-radius: var(--r-lg); box-shadow: 0 6px 20px rgba(99,102,241,0.08);
  padding: 18px; cursor: pointer; transition: transform 0.4s, box-shadow 0.4s;
}
.material-card:hover { transform: scale(1.02) translateY(-4px); box-shadow: 0 18px 40px rgba(99,102,241,0.2); }
.mc-tags { display: flex; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.mc-title { font-size: 16px; font-weight: 900; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-intro { color: var(--slate-400); font-size: 13px; min-height: 42px; margin-bottom: 8px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mc-meta { color: var(--slate-400); font-size: 12px; margin-bottom: 8px; }
.mc-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(203,213,225,0.5); padding-top: 10px; color: var(--slate-400); font-size: 12px; }

/* ===================== 标签 ===================== */
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; line-height: 1.7; font-weight: 700; }
.tag-primary { background: rgba(99,102,241,0.14); color: var(--primary-600); }
.tag-success { background: rgba(16,185,129,0.14); color: #059669; }
.tag-warning { background: rgba(245,158,11,0.16); color: #b45309; }
.tag-danger { background: rgba(239,68,68,0.14); color: #dc2626; }
.tag-info { background: rgba(148,163,184,0.18); color: #64748b; }

/* ===================== 表单 ===================== */
.form-group { margin-bottom: 16px; }
.form-label { display: block; margin-bottom: 6px; color: var(--slate-600); font-weight: 700; }
.form-control {
  width: 100%; height: 40px; padding: 0 14px; border: 1px solid var(--glass-border); border-radius: var(--r-sm);
  outline: none; background: rgba(255,255,255,0.72); backdrop-filter: blur(8px); color: var(--slate-800); font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus { border-color: rgba(99,102,241,0.6); box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
textarea.form-control { height: auto; padding: 10px 14px; resize: vertical; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.form-hint { font-size: 12px; color: var(--slate-400); margin-top: 4px; }
.form-inline { display: flex; gap: 8px; }
.form-inline .form-control { flex: 1; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.filter-bar select { min-width: 150px; }

/* ===================== 表格 / 分页 / 标签页 ===================== */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--glass-border); text-align: left; }
.table th { background: rgba(99,102,241,0.06); color: var(--slate-600); font-weight: 900; white-space: nowrap; }
.table tbody tr:hover { background: rgba(99,102,241,0.05); }
.table .link { color: var(--primary); cursor: pointer; font-weight: 700; }
.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pagination button { min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--glass-border); background: rgba(255,255,255,0.65); border-radius: 10px; color: var(--slate-600); transition: all 0.15s; }
.pagination button.active { background: linear-gradient(135deg, #6366f1, #8b5cf6); border-color: transparent; color: #fff; }
.pagination button[disabled] { opacity: 0.45; cursor: not-allowed; }
.pagination .page-info { display: flex; align-items: center; color: var(--slate-400); padding: 0 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--glass-border); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 18px; cursor: pointer; color: var(--slate-600); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: all 0.2s; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 900; }

/* ===================== 登录/详情/其它 ===================== */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card {
  width: 400px; max-width: 100%; background: var(--glass-strong); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid var(--glass-border); border-radius: 22px; padding: 38px 34px; box-shadow: var(--shadow-xl);
}
.auth-card h2 { margin: 0 0 4px; text-align: center; font-size: 26px; }
.auth-sub { text-align: center; color: var(--slate-400); margin-bottom: 26px; font-size: 14px; }
.auth-footer { margin-top: 16px; text-align: center; color: var(--slate-600); font-size: 14px; }
.auth-footer a { color: var(--primary); font-weight: 700; }
.code-row { display: flex; gap: 10px; } .code-row .form-control { flex: 1; } .code-row .btn { height: 40px; }

.quote-banner { display: flex; align-items: center; gap: 18px; border-radius: var(--r-lg); padding: 22px 26px; margin-bottom: 16px; color: #fff; box-shadow: 0 10px 30px rgba(99,102,241,0.25); position: relative; overflow: hidden; }
.quote-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, rgba(255,255,255,0.18), transparent 60%); pointer-events: none; }
.quote-emoji { font-size: 46px; line-height: 1; flex-shrink: 0; }
.quote-body { flex: 1; min-width: 0; }
.quote-text { font-size: 17px; font-weight: 900; line-height: 1.6; }
.quote-author { font-size: 13px; opacity: 0.92; margin-top: 4px; }
.quote-tag { background: rgba(255,255,255,0.24); padding: 3px 12px; border-radius: 999px; font-size: 12px; white-space: nowrap; }

.detail-title { font-size: 22px; margin: 0 0 12px; }
.detail-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }
.detail-table th, .detail-table td { border: 1px solid var(--glass-border); padding: 10px 12px; text-align: left; }
.detail-table th { background: rgba(99,102,241,0.06); width: 120px; color: var(--slate-600); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.detail-alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.detail-alert.warning { background: rgba(245,158,11,0.12); color: #b45309; }
.detail-alert.error { background: rgba(239,68,68,0.12); color: #dc2626; }

/* ===================== 弹窗 / Toast ===================== */
.modal-overlay { position: fixed; inset: 0; background: rgba(30,27,75,0.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 2000; padding: 20px; }
.modal { background: var(--glass-strong); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); border: 1px solid var(--glass-border); border-radius: 20px; width: 460px; max-width: 100%; max-height: 85vh; overflow: auto; box-shadow: 0 24px 60px rgba(30,27,75,0.28); }
.modal-sm { width: 360px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--glass-border); font-weight: 900; font-size: 16px; }
.modal-close { border: none; background: none; font-size: 22px; color: var(--slate-400); line-height: 1; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--glass-border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.announce-modal { width: 540px; }
.announce-body { white-space: pre-wrap; line-height: 1.9; max-height: 50vh; overflow: auto; color: var(--slate-600); }
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-20px); background: rgba(30,27,75,0.9); backdrop-filter: blur(10px); color: #fff; padding: 10px 20px; border-radius: 12px; z-index: 9999; opacity: 0; transition: all 0.3s; max-width: 80%; box-shadow: 0 8px 24px rgba(0,0,0,0.18); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-error { background: rgba(220,38,38,0.92); }
.toast-success { background: rgba(5,150,105,0.92); }
.toast-warning { background: rgba(217,119,6,0.92); }

/* ===================== 管理后台 ===================== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-side { width: 220px; flex-shrink: 0; background: linear-gradient(180deg, rgba(30,27,75,0.94), rgba(49,46,129,0.94)); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-right: 1px solid rgba(255,255,255,0.08); }
.side-logo { height: 64px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 900; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.side-nav { padding: 8px 0; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 13px 20px; color: #c7d2fe; transition: all 0.18s; }
.side-link:hover { color: #fff; background: rgba(255,255,255,0.08); }
.side-link.active { color: #fff; background: linear-gradient(90deg, rgba(99,102,241,0.5), rgba(139,92,246,0.25)); border-left: 3px solid #a5b4fc; }
.admin-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar { height: 64px; background: rgba(255,255,255,0.4); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-bottom: 1px solid var(--glass-border); display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 10; }
.admin-title { font-size: 16px; font-weight: 900; }
.admin-actions { display: flex; align-items: center; gap: 14px; font-size: 14px; }
.admin-actions a { color: var(--primary); font-weight: 700; }
.admin-content { flex: 1; padding: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card { background: var(--glass); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--glass-border); border-radius: var(--r-lg); box-shadow: 0 6px 18px rgba(99,102,241,0.08); padding: 20px; text-align: center; }
.stat-value { font-size: 30px; font-weight: 900; }
.stat-label { margin-top: 6px; color: var(--slate-400); }
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
.bar-chart { display: flex; align-items: flex-end; gap: 10px; height: 220px; padding: 10px 0; overflow-x: auto; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; min-width: 40px; }
.bar-area { display: flex; align-items: flex-end; gap: 6px; height: 100%; width: 100%; justify-content: center; }
.bar { width: 20px; background: linear-gradient(180deg, #818cf8, #6366f1); border-radius: 6px 6px 0 0; min-height: 2px; transition: height 0.3s; }
.bar.green { background: linear-gradient(180deg, #6ee7b7, #10b981); }
.bar-label { font-size: 12px; color: var(--slate-400); white-space: nowrap; }
.hbar-list { display: flex; flex-direction: column; gap: 12px; }
.hbar-row { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.hbar-name { width: 90px; text-align: right; color: var(--slate-600); flex-shrink: 0; }
.hbar-track { flex: 1; background: rgba(148,163,184,0.18); border-radius: 999px; height: 18px; overflow: hidden; }
.hbar-fill { height: 100%; background: linear-gradient(90deg, #818cf8, #8b5cf6); border-radius: 999px; transition: width 0.3s; }
.hbar-value { width: 40px; color: var(--slate-400); flex-shrink: 0; }

.text-muted { color: var(--slate-400); font-size: 13px; }
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.empty { text-align: center; color: var(--slate-400); padding: 40px 0; font-size: 14px; }
.hot-list { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 4px; }
.hot-item { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14px; }
.hot-item:hover span { color: var(--primary); }
.hot-name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hot-count { color: var(--slate-400); font-size: 12px; }

.click-ripple { position: fixed; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; border: 2px solid rgba(139,92,246,0.7); pointer-events: none; z-index: 9998; animation: rippleOut 0.6s ease-out forwards; }
@keyframes rippleOut { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(4); opacity: 0; } }

/* ===================== 3D 时钟 ===================== */
.clock-card { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 20px; }
.clock3d-scene { perspective: 800px; width: 200px; height: 190px; display: flex; align-items: center; justify-content: center; }
.clock3d { position: relative; width: 170px; height: 170px; transform-style: preserve-3d; transform: rotateX(55deg) rotateZ(-8deg); }
.clock3d-face { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.98), rgba(228,234,250,0.9)); border: 3px solid rgba(99,102,241,0.55); box-shadow: 0 24px 46px rgba(99,102,241,0.32), inset 0 0 22px rgba(99,102,241,0.14); transform-style: preserve-3d; }
.clock3d-tick { position: absolute; left: 50%; top: 7px; width: 3px; height: 10px; margin-left: -1.5px; background: rgba(99,102,241,0.5); border-radius: 2px; transform-origin: 50% 78px; }
.clock3d-hand { position: absolute; left: 50%; bottom: 50%; transform-origin: 50% 100%; border-radius: 4px; background: linear-gradient(180deg, #6366f1, #4338ca); z-index: 2; }
.clock3d-hand.hour { width: 7px; height: 46px; margin-left: -3.5px; }
.clock3d-hand.minute { width: 5px; height: 64px; margin-left: -2.5px; }
.clock3d-hand.second { width: 2px; height: 74px; margin-left: -1px; background: linear-gradient(180deg, #f87171, #ef4444); z-index: 3; }
.clock3d-center { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; background: #6366f1; border-radius: 50%; z-index: 4; box-shadow: 0 0 10px rgba(99,102,241,0.7); }
.clock3d-digital { font-family: "Courier New", monospace; font-size: 24px; font-weight: 700; letter-spacing: 3px; color: #4338ca; text-shadow: 0 2px 8px rgba(99,102,241,0.35); }
.clock3d-label { font-size: 12px; color: var(--slate-400); }

/* ===================== 响应式 ===================== */
@media (max-width: 768px) {
  html, body { background-image: url('/images/bg-mobile.jpg'); background-attachment: scroll; background-position: center top; }
  body::before { backdrop-filter: blur(5px) saturate(115%); -webkit-backdrop-filter: blur(5px) saturate(115%); }
  .container { padding: 12px 10px; }
  .topbar-inner { height: auto; padding: 10px 12px; gap: 10px; flex-wrap: wrap; }
  .logo { font-size: 16px; }
  .topbar-nav { gap: 12px; overflow-x: auto; }
  .nav-link { font-size: 13px; }
  .topbar-user .user-name { display: none; }
  .hero-card { padding: 20px; }
  .hero-name { font-size: 24px; }
  .hero-avatar { width: 72px; height: 72px; }
  .flip-clock { font-size: 20px; padding: 10px 18px; width: 100%; }
  .dash-info { padding: 12px 16px; }
  .auth-page { padding: 14px; }
  .auth-card { padding: 28px 20px; }
  .card { padding: 14px; }
  .form-row { flex-direction: column; gap: 0; }
  .filter-bar { gap: 8px; }
  .filter-bar select, .filter-bar .form-control { flex: 1; min-width: 45%; }
  .detail-actions .btn { flex: 1; }
  .detail-title { font-size: 18px; }
  .quote-banner { padding: 16px; gap: 12px; }
  .quote-emoji { font-size: 34px; }
  .quote-text { font-size: 15px; }
  .clock3d-scene { width: 170px; height: 165px; }
  .clock3d { transform: rotateX(55deg) rotateZ(-8deg) scale(0.85); }
  .clock3d-digital { font-size: 20px; }
  .dash-grid { grid-template-columns: 1fr; }
  .admin-side { width: 56px; }
  .side-logo { font-size: 0; }
  .side-logo::after { content: "📚"; font-size: 22px; }
  .side-link { padding: 14px 12px; justify-content: center; }
  .side-link .side-txt { display: none; }
  .admin-topbar { padding: 0 12px; }
  .admin-content { padding: 12px; }
  .modal { width: 100%; }
}
@media (min-width: 769px) { .side-link .side-txt { display: inline; } }

/* ===================== 下雪 ===================== */
.snow { position: fixed; inset: 0; pointer-events: none; z-index: 20; overflow: hidden; }
.snowflake { position: absolute; top: -30px; color: #fff; animation: snowFall linear infinite; text-shadow: 0 0 6px rgba(255,255,255,0.85); user-select: none; }
@keyframes snowFall { 0% { transform: translateY(-30px) rotate(0deg); } 100% { transform: translateY(110vh) rotate(360deg); } }

/* ===================== 赛博猫 ===================== */
.cyber-cat { position: fixed; right: 24px; bottom: 24px; z-index: 900; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cat-emoji { font-size: 42px; filter: drop-shadow(0 6px 12px rgba(0,0,0,0.22)); transition: transform 0.3s; }
.cyber-cat:hover .cat-emoji { transform: scale(1.18); }
.cat-bubble { background: rgba(255,255,255,0.92); border: 1px solid rgba(255,255,255,0.6); color: var(--slate-700); font-size: 13px; font-weight: 700; padding: 7px 14px; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); opacity: 0; transform: translateY(6px); transition: all 0.3s; pointer-events: none; white-space: nowrap; }
.cat-bubble.show { opacity: 1; transform: translateY(0); }

/* ===================== 浮动音乐播放器 ===================== */
.float-player { position: fixed; left: 24px; bottom: 24px; z-index: 900; display: flex; align-items: center; gap: 4px; background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow-xl); }
.fp-btn { border: none; background: transparent; font-size: 18px; cursor: pointer; color: var(--slate-700); transition: color 0.2s; }
.fp-btn:hover { color: var(--primary); }
.fp-name { font-size: 13px; font-weight: 700; color: var(--slate-600); margin-left: 6px; }

/* ===================== 天气 ===================== */
.weather-widget { position: fixed; top: 80px; right: 20px; z-index: 800; display: flex; align-items: center; gap: 8px; background: var(--glass-strong); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--glass-border); border-radius: 999px; padding: 8px 16px; box-shadow: var(--shadow-xl); font-size: 14px; font-weight: 700; color: var(--slate-700); }

/* 移动端调整浮层 */
@media (max-width: 768px) {
  .weather-widget { top: auto; bottom: 88px; right: 12px; padding: 6px 12px; font-size: 13px; }
  .float-player { left: 12px; bottom: 12px; padding: 6px 12px; }
  .fp-name { display: none; }
  .cyber-cat { right: 12px; bottom: 76px; }
}
