/* ============================================================
   智趣微光 — 全局视觉增强
   覆盖 React 构建产物的默认样式，提升层次感与阅读体验
   ============================================================ */

/* ===== 1. CSS 变量增强 ===== */
:root {
  --bg: #f3f4f8;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #5b6275;
  --border: #e5e7ef;
  --border-light: #f0f1f5;
  --primary: #64748B;
  --primary-light: #94A3B8;
  --primary-soft: #F1F5F9;
  --code-bg: #1a1a2e;
  --code-text: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 48px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --transition-slow: 0.35s cubic-bezier(.4,0,.2,1);
}

/* ===== 2. 暗色模式 ===== */
html.dark {
  --bg: #090b14;
  --bg-card: #131627;
  --text: #e4e6f0;
  --text-secondary: #9298b0;
  --border: #20243a;
  --border-light: #1a1d30;
  --primary: #94A3B8;
  --primary-light: #CBD5E1;
  --primary-soft: #1E293B;
  --code-bg: #0d0f1a;
  --code-text: #e2e8f0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,.3), 0 1px 3px rgba(0,0,0,.2);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.2);
  --shadow-xl: 0 20px 48px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);
}

/* ===== 3. 基础排版与背景 ===== */
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 滚动条美化 */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5c9d6; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #a0a5b8; }
html.dark ::-webkit-scrollbar-thumb { background: #2d3248; }
html.dark ::-webkit-scrollbar-thumb:hover { background: #3d4258; }

/* 选中文字颜色 */
::selection { background: var(--primary); color: #fff; }

/* ===== 4. 顶栏增强 ===== */
.topbar {
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  box-shadow: 0 1px 0 var(--border-light), 0 4px 24px rgba(0,0,0,.04);
  height: 60px;
}

html.dark .topbar {
  background: rgba(19,22,39,.82);
  box-shadow: 0 1px 0 var(--border-light), 0 4px 24px rgba(0,0,0,.2);
}

.topbar-logo a {
  font-size: 19px;
  font-weight: 750;
  letter-spacing: -.5px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar-links a {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 20px;
  transition: all var(--transition);
}

.topbar-links a:hover {
  background: var(--primary-soft);
}

html.dark .topbar-links a:hover {
  background: rgba(129,132,244,.1);
}

/* ===== 5. Hero 区域增强 ===== */
.home-hero-enhanced {
  position: relative;
  text-align: center;
  padding: 56px 32px 44px;
  margin-bottom: 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.home-hero-enhanced .home-hero-bg {
  opacity: .07;
  background: linear-gradient(135deg,
    var(--primary) 0%,
    #ec4899 25%,
    #f59e0b 50%,
    #14b8a6 75%,
    #8b5cf6 100%
  );
  background-size: 400% 400%;
  animation: heroBgShift 10s ease infinite;
}

.home-hero-enhanced .home-hero-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero-enhanced .home-hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-weight: 400;
  letter-spacing: .2px;
}

.home-hero-search-wrap input {
  padding: 14px 52px 14px 22px;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-size: 15px;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}

.home-hero-search-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft), var(--shadow-sm);
  background: var(--bg-card);
  outline: none;
}

.home-hero-cta {
  padding: 13px 36px;
  background: linear-gradient(135deg, var(--primary), #475569);
  color: #fff;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 4px 16px rgba(91,95,227,.3);
  transition: all var(--transition);
}

.home-hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(91,95,227,.4);
}

.home-hero-dots { margin-top: 24px; gap: 8px; }

.hero-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  opacity: .4;
}

/* 旧版 Hero（未登录） 也增强 */
.home-hero {
  padding: 48px 24px 36px;
  margin-bottom: 28px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
}

.home-hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.3px;
}

/* ===== 6. 卡片体系增强 ===== */
.card {
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  background: var(--bg-card);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

/* 文章卡片 */
.home-post-card-grid {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
  background: var(--bg-card);
}

.home-post-card-grid:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-soft);
}

.grid-cover {
  height: 170px;
  border-bottom: 1px solid var(--border-light);
}

.grid-cover img {
  transition: transform .5s cubic-bezier(.4,0,.2,1);
}

.home-post-card-grid:hover .grid-cover img {
  transform: scale(1.08);
}

.grid-body {
  padding: 16px 18px 14px;
}

.grid-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.5;
  margin-bottom: 8px;
}

.grid-excerpt {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.grid-stats {
  gap: 16px;
  font-size: 12px;
  margin-bottom: 12px;
}

.grid-author {
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

/* 列表式文章卡片 */
.home-post-card {
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  background: var(--bg-card);
}

.home-post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-left-color: #475569;
}

.home-post-card:after {
  opacity: .04;
}

/* ===== 7. 首页布局增强 ===== */
.container {
  max-width: 1140px;
  padding: 24px 20px;
}

.home-layout {
  gap: 24px;
}

.home-feed {
  gap: 20px;
}

/* ===== 8. 侧边栏增强 ===== */
.sidebar-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-section h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-soft);
  letter-spacing: .3px;
}

.sidebar-hot-item {
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.sidebar-hot-item:last-child { border-bottom: none; }

.sidebar-hot-item:hover {
  background: var(--primary-soft);
}

.sidebar-hot-rank {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-hot-rank.r1,
.sidebar-hot-rank.r2,
.sidebar-hot-rank.r3 {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.sidebar-hot-title {
  font-size: 13px;
  font-weight: 550;
}

.sidebar-hot-meta { font-size: 11px; }

.sidebar-user-item {
  padding: 10px 12px;
  margin: 0 -12px;
  border-radius: var(--radius-sm);
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.sidebar-user-item:last-child { border-bottom: none; }

.sidebar-user-item:hover {
  background: var(--primary-soft);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sidebar-user-name { font-size: 13px; font-weight: 550; }

.sidebar-link-tag {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
  transition: all var(--transition);
}

.sidebar-link-tag:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

/* ===== 9. 按钮增强 ===== */
.btn {
  padding: 11px 26px;
  background: linear-gradient(135deg, var(--primary), #475569);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(91,95,227,.2);
  transition: all var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,95,227,.35);
}

.btn-outline {
  padding: 10px 22px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text);
  transition: all var(--transition);
}

.btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.btn-sm {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.btn-sm:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.btn-sm.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== 10. Tab 标签页增强 ===== */
.tab {
  padding: 7px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}

.tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(91,95,227,.2);
}

.tab:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

/* ===== 11. 表单增强 ===== */
.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  background: var(--bg);
  transition: all var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

/* ===== 12. 分页增强 ===== */
.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}

.pagination a:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.pagination span.current {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(91,95,227,.2);
}

/* ===== 13. 用户头像增强 ===== */
.avatar-wrap {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(91,95,227,.25);
  transition: transform var(--transition), box-shadow var(--transition);
}

.avatar-wrap:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(91,95,227,.35);
}

/* ===== 14. 评论区增强 ===== */
.comment-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border-light);
}

.comment-content {
  font-size: 14px;
  line-height: 1.7;
}

.comment-children {
  margin-left: 28px;
  padding-left: 16px;
  border-left: 2px solid var(--primary-soft);
}

.comment-avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ===== 15. 通知卡片增强 ===== */
.msg-card {
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: all var(--transition);
}

.msg-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.msg-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

/* ===== 16. 文章详情页增强 ===== */
.article-content {
  font-size: 16px;
  line-height: 1.85;
  color: var(--text);
}

.article-content h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 36px 0 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-soft);
  color: var(--text);
}

.article-content h3 {
  font-size: 18px;
  font-weight: 650;
  margin: 28px 0 12px;
  color: var(--text);
}

.article-content p { margin: 14px 0; }

.article-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition);
}

.article-content a:hover {
  border-bottom-color: var(--primary);
}

.article-content img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

.article-content blockquote {
  border-left: 3px solid var(--primary);
  background: var(--primary-soft);
  padding: 14px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 18px 0;
  color: var(--text-secondary);
}

.article-content code {
  background: var(--primary-soft);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: .9em;
  color: var(--primary);
}

.tip {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left-width: 4px;
}

.best-practice {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left-width: 4px;
}

.common-mistake {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left-width: 4px;
}

/* ===== 17. 编辑面板增强 ===== */
.edit-section {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.edit-header {
  padding: 20px 24px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.edit-section.open .edit-header {
  border-bottom: 1px solid var(--border-light);
}

/* ===== 18. 模态框增强 ===== */
.modal-box {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
}

.modal-header {
  padding: 22px 28px;
}

.modal-body {
  padding: 24px 28px;
}

/* ===== 19. AI 聊天增强 ===== */
.ai-message-content {
  font-size: 14px;
  line-height: 1.75;
}

.chat-code-block {
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.ai-welcome-icon {
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

.ai-input-area textarea {
  padding: 12px 16px;
  border-radius: 14px;
  border: 2px solid var(--border);
  transition: all var(--transition);
}

.ai-input-area textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
  outline: none;
}

/* ===== 20. 管理后台表格增强 ===== */
.table-wrap {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.table-wrap th {
  background: var(--bg);
  font-weight: 650;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 12px 16px;
}

.table-wrap td {
  padding: 10px 16px;
}

.stat-card {
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card .stat-num {
  font-size: 28px;
  font-weight: 750;
}

/* ===== 21. 游戏卡片增强 ===== */
.game-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

/* ===== 22. 页脚增强 ===== */
.footer-bar {
  border-top: 1px solid var(--border-light);
  padding: 28px 16px 36px;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 23. 骨架屏增强 ===== */
.skeleton-card {
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.skeleton-line {
  height: 14px;
  border-radius: 7px;
  margin-bottom: 14px;
  background: linear-gradient(90deg, var(--border-light) 25%, var(--primary-soft), var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== 24. 代码高亮 ===== */
pre code.hljs {
  display: block;
  overflow-x: auto;
  padding: 20px;
  border-radius: 12px;
  background: var(--code-bg);
  color: var(--code-text);
  font-family: "JetBrains Mono", "Fira Code", "Consolas", "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}

.hljs-keyword { color: #c792ea; }
.hljs-string { color: #c3e88d; }
.hljs-number { color: #f78c6c; }
.hljs-comment { color: #546e7a; font-style: italic; }
.hljs-function { color: #82aaff; }
.hljs-title { color: #82aaff; }
.hljs-params { color: #f78c6c; }
.hljs-built_in { color: #ffcb6b; }
.hljs-type { color: #ffcb6b; }
.hljs-attr { color: #c792ea; }
.hljs-variable { color: #eeffff; }
.hljs-literal { color: #f78c6c; }
.hljs-meta { color: #89ddff; }
.hljs-tag { color: #f07178; }
.hljs-name { color: #f07178; }
.hljs-selector-class { color: #ffcb6b; }
.hljs-selector-id { color: #f78c6c; }

/* ===== 25. 阅读进度条 ===== */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #475569, #ec4899);
  z-index: 9999;
  transition: width .12s ease;
  width: 0;
  border-radius: 0 2px 2px 0;
  box-shadow: 0 0 10px rgba(91,95,227,.3);
}

/* ===== 26. 主题切换按钮 ===== */
#theme-toggle {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

#theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

/* ===== 27. 回到顶部按钮 ===== */
#back-to-top {
  position: fixed;
  bottom: 88px;
  right: 28px;
  z-index: 9998;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

#back-to-top.visible { display: flex; }

#back-to-top:hover {
  color: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

/* ===== 28. 通知徽章增强 ===== */
.notif-badge {
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: var(--shadow-md);
}

/* ===== 29. 移动端响应式微调 ===== */
@media (max-width: 768px) {
  .container {
    padding: 12px 8px;
  }

  .home-hero-enhanced {
    padding: 36px 16px 28px;
    border-radius: var(--radius-lg);
  }

  .home-hero-enhanced .home-hero-title {
    font-size: 24px;
  }

  .home-hero-enhanced .home-hero-sub {
    font-size: 14px;
  }

  .home-hero-enhanced .home-hero-search-wrap input {
    padding: 12px 44px 12px 16px;
    font-size: 14px;
  }

  .card {
    padding: 16px 14px;
    border-radius: var(--radius);
  }

  .home-post-card-grid:hover {
    transform: none;
  }

  .home-post-card:hover {
    transform: none;
  }

  .game-card:hover {
    transform: none;
  }

  .grid-cover {
    height: 140px;
  }

  .grid-body {
    padding: 12px 14px 10px;
  }

  .grid-title {
    font-size: 14px;
  }

  .topbar {
    height: 50px;
  }

  #theme-toggle,
  #back-to-top {
    width: 42px;
    height: 42px;
    right: 16px;
  }

  #theme-toggle { bottom: 20px; }
  #back-to-top { bottom: 74px; }
}

@media (max-width: 480px) {
  .home-hero-enhanced {
    padding: 28px 12px 22px;
  }

  .home-hero-enhanced .home-hero-title {
    font-size: 20px;
  }

  .home-hero-search-wrap input {
    font-size: 13px;
  }
}

/* ===== 30. 暗色模式组件覆盖 ===== */
html.dark .home-hero-enhanced .home-hero-title {
  background: linear-gradient(135deg, #e4e6f0 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.dark .topbar-logo a {
  background: linear-gradient(135deg, var(--primary-light), #c4b5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html.dark .topbar-links a:hover {
  background: rgba(129,132,244,.12);
}

html.dark .home-hero-search-wrap input:focus {
  box-shadow: 0 0 0 4px rgba(129,132,244,.15), var(--shadow-sm);
}

html.dark .sidebar-section h4 {
  border-bottom-color: rgba(129,132,244,.2);
}

html.dark .article-content h2 {
  border-bottom-color: rgba(129,132,244,.2);
}

html.dark .article-content blockquote {
  background: rgba(129,132,244,.08);
}

html.dark .article-content code {
  background: rgba(129,132,244,.12);
  color: var(--primary-light);
}

html.dark .sidebar-hot-item:hover,
html.dark .sidebar-user-item:hover {
  background: rgba(129,132,244,.08);
}

html.dark .skeleton-line {
  background: linear-gradient(90deg, var(--border) 25%, rgba(129,132,244,.1), var(--border) 75%);
}

html.dark .table-wrap th {
  background: rgba(255,255,255,.02);
}

html.dark .admin-table tbody tr:hover,
html.dark .table-wrap tbody tr:hover {
  background: rgba(255,255,255,.02);
}

html.dark .home-hero-search-wrap input:focus {
  background: var(--bg-card);
}

html.dark .form-group input:focus,
html.dark .form-group textarea:focus,
html.dark .ai-input-area textarea:focus {
  box-shadow: 0 0 0 4px rgba(129,132,244,.15);
}

/* ===== 31. 通知弹幕增强 ===== */
.notif-barrages {
  top: 72px;
  right: 20px;
  gap: 10px;
}

.notif-barrage {
  padding: 10px 20px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideIn .35s cubic-bezier(.4,0,.2,1);
}
