/* public/css/style.css */

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

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

html {
  height: 100%;
  overflow-x: hidden;
}

:root {
  color-scheme: light;
  --page-bg: #f5f5f5;
  --page-text: #333333;
  --surface-bg: #ffffff;
  --surface-strong: #f8fafc;
  --surface-soft: #eef2ff;
  --border-color: #e5e7eb;
  --muted-text: #666666;
  --muted-text-2: #999999;
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);
  --nav-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --nav-control-bg: rgba(255, 255, 255, 0.2);
  --nav-control-bg-hover: rgba(255, 255, 255, 0.3);
  --nav-control-border: rgba(255, 255, 255, 0.18);
  --nav-link-hover: rgba(255, 255, 255, 0.2);
  --link-color: #667eea;
}

html.theme-dark {
  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--page-bg);
  color: var(--page-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
}

html.theme-dark body {
  --page-bg: #0b1220;
  --page-text: #e5e7eb;
  --surface-bg: #111827;
  --surface-strong: #0f172a;
  --surface-soft: #172036;
  --border-color: #243042;
  --muted-text: #cbd5e1;
  --muted-text-2: #94a3b8;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.32);
  --nav-gradient: linear-gradient(135deg, #0f172a 0%, #111827 54%, #1f2937 100%);
  --nav-control-bg: rgba(255, 255, 255, 0.08);
  --nav-control-bg-hover: rgba(255, 255, 255, 0.16);
  --nav-control-border: rgba(255, 255, 255, 0.12);
  --nav-link-hover: rgba(255, 255, 255, 0.1);
  --link-color: #8ab4ff;
}

/* ========== 横幅公告 ========== */

.banner {
  background: linear-gradient(90deg, #ff6b6b 0%, #ff8e72 50%, #ffa502 100%);
  color: white;
  padding: 12px 20px;
  text-align: center;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.banner-icon {
  font-size: 16px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0.5; }
}

.banner-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.banner-content a {
  color: white;
  text-decoration: underline;
  font-weight: bold;
}

.banner-close {
  cursor: pointer;
  font-size: 20px;
  padding: 0 10px;
  transition: transform 0.3s;
}

.banner-close:hover {
  transform: scale(1.2);
}

/* ========== 导航栏样式 ========== */

nav,
nav.site-nav {
  background: var(--nav-gradient);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .nav-container {
  max-width: 1800px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-height: 70px;
  height: auto;
  gap: 20px;
  flex-wrap: wrap;
}

nav .nav-brand {
  font-size: 24px;
  font-weight: bold;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

nav .nav-brand:hover {
  opacity: 0.8;
}

nav .nav-brand-icon {
  font-size: 28px;
}

nav .nav-brand-logo {
  height: 36px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  border-radius: 4px;
}

.nav-mobile-toggle {
  display: none;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
}

/* ========== 搜索栏 ========== */

.nav-search {
  flex: 0 1 320px;
  max-width: 320px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 10px 40px 10px 15px;
  border: none;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  transition: all 0.3s ease;
  color: #333;
}

.nav-search input:focus {
  outline: none;
  background-color: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  color: #333;
}

.nav-search input::placeholder {
  color: #999;
}

.nav-search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
  font-size: 16px;
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s ease;
}

.nav-search-icon:hover {
  color: #667eea;
}

.nav-search.has-value .nav-search-icon,
.nav-search.is-focused .nav-search-icon {
  color: #667eea;
}

/* ========== 导航公告轮播 ========== */

.nav-announcement {
  flex: 1 1 420px;
  min-width: 240px;
  max-width: 640px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  overflow: hidden;
}

.nav-announcement-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-announcement-label-icon {
  font-size: 13px;
  animation: navAnnouncementPulse 2.8s ease-in-out infinite;
}

.nav-announcement-viewport {
  position: relative;
  flex: 1;
  min-width: 0;
  height: 1.45em;
  overflow: hidden;
}

.nav-announcement-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.nav-announcement-item.is-active {
  opacity: 1;
  transform: translateY(0);
}

.nav-announcement-text {
  display: block;
  color: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-announcement-count {
  flex-shrink: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.9);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

@keyframes navAnnouncementPulse {
  0%, 100% { opacity: 0.72; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-1px); }
}

/* ========== 导航菜单 ========== */

nav .nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 0;
}

nav .nav-menu a {
  color: white;
  text-decoration: none;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

nav .nav-menu a:hover {
  background-color: var(--nav-link-hover);
  transform: translateY(-2px);
}

nav .nav-menu .btn-primary {
  background-color: #ff6b6b;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  white-space: nowrap;
  color: white;
}

nav .nav-menu .btn-primary:hover {
  background-color: #ff5252;
}

/* ========== 通知/好友圆形按钮 ========== */

.nav-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--nav-control-bg);
  border: 1px solid var(--nav-control-border);
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.nav-translate-btn {
  width: auto;
  min-width: 118px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  gap: 8px;
}

.nav-translate-btn::before {
  content: '🌐';
  font-size: 15px;
  line-height: 1;
}

.nav-icon-btn:hover {
  background-color: var(--nav-control-bg-hover);
  transform: scale(1.1);
}

.nav-tool-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-tool-group .nav-icon-btn {
  flex-shrink: 0;
}

/* 通知徽章 */
.nav-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #ff6b6b;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  border: 2px solid #764ba2;
}

/* ========== 下拉菜单 ========== */

.dropdown {
  position: relative;
}

.dropdown-user .nav-avatar-btn {
  padding: 0;
  border: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface-bg);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  min-width: 250px;
  margin-top: 10px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  color: var(--page-text);
}

html.theme-dark .dropdown-menu {
  border: 1px solid var(--border-color);
}

html.theme-dark .sidebar-left,
html.theme-dark .sidebar-right,
html.theme-dark .card,
html.theme-dark .post-card,
html.theme-dark .dropdown-menu,
html.theme-dark .post-item,
html.theme-dark .message-item,
html.theme-dark .notification-item,
html.theme-dark .settings-card,
html.theme-dark .page-header,
html.theme-dark .empty-state,
html.theme-dark .profile-card,
html.theme-dark .section-card {
  background-color: var(--surface-bg) !important;
  color: var(--page-text);
  border-color: var(--border-color);
  box-shadow: var(--shadow-soft);
}

html.theme-dark .banner {
  background: linear-gradient(90deg, #ff6b6b 0%, #ff8e72 50%, #d97706 100%);
}

html.theme-dark .nav-search input,
html.theme-dark input:not([type="checkbox"]):not([type="radio"]),
html.theme-dark textarea,
html.theme-dark select {
  background-color: #0f172a;
  color: #e5e7eb;
  border-color: var(--border-color);
}

html.theme-dark .nav-search input::placeholder,
html.theme-dark input::placeholder,
html.theme-dark textarea::placeholder {
  color: #94a3b8;
}

html.theme-dark .nav-announcement {
  background: rgba(15, 23, 42, 0.44);
  border-color: rgba(255, 255, 255, 0.12);
}

html.theme-dark .nav-announcement-label {
  background: rgba(255, 255, 255, 0.08);
}

html.theme-dark .nav-icon-btn,
html.theme-dark nav .nav-menu a,
html.theme-dark .nav-brand {
  color: #f8fafc;
}

html.theme-dark .nav-menu .btn-primary {
  background-color: #ff6b6b;
  color: #fff;
}

html.theme-dark .nav-menu .btn-primary:hover {
  background-color: #ff5252;
}

html.theme-dark .hot-item,
html.theme-dark .random-card,
html.theme-dark .user-card,
html.theme-dark .post-item .post-title,
html.theme-dark .post-item .post-excerpt,
html.theme-dark .card-title,
html.theme-dark .card-text,
html.theme-dark .page-header h1,
html.theme-dark .page-header h2 {
  color: #e5e7eb;
}

html.theme-dark .home-carousel-section--featured {
  background: linear-gradient(135deg, #0f172a 0%, #111827 52%, #1f2937 100%);
  color: #f8fafc;
}

html.theme-dark .home-carousel-section--sticky {
  background: linear-gradient(135deg, #0b1220 0%, #111827 52%, #1f2937 100%);
  color: #f8fafc;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

html.theme-dark .home-carousel-card {
  background: #111827;
  border-color: #243042;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.34);
}

html.theme-dark .home-carousel-card:hover {
  border-color: #334155;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
}

html.theme-dark .home-carousel-media::after {
  background: linear-gradient(180deg, rgba(15,23,42,0.06) 0%, rgba(15,23,42,0.24) 42%, rgba(2,6,23,0.92) 100%);
}

html.theme-dark .home-carousel-media.is-placeholder {
  background: linear-gradient(135deg, #172036 0%, #111827 50%, #0b1220 100%);
}

html.theme-dark .home-carousel-media.is-placeholder::after {
  background: linear-gradient(180deg, rgba(15,23,42,0.06) 0%, rgba(15,23,42,0.18) 40%, rgba(59,130,246,0.14) 100%);
}

html.theme-dark .home-carousel-body {
  background: linear-gradient(180deg, rgba(15,23,42,0) 0%, rgba(15,23,42,0.34) 18%, rgba(2,6,23,0.94) 100%);
}

html.theme-dark .home-carousel-section-title,
html.theme-dark .home-carousel-card-title,
html.theme-dark .home-carousel-section-label {
  color: #f8fafc;
}

html.theme-dark .home-carousel-card-excerpt,
html.theme-dark .home-carousel-card-meta {
  color: rgba(226, 232, 240, 0.82);
}

html.theme-dark .home-carousel-section-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e5e7eb;
}

html.theme-dark .home-carousel-section-btn:hover {
  background: rgba(255, 255, 255, 0.14);
}

html.theme-dark .home-carousel-section-btn--primary {
  background: rgba(138, 180, 255, 0.14);
  color: #dbeafe;
  border-color: rgba(138, 180, 255, 0.30);
}

html.theme-dark .home-carousel-section-btn--primary:hover {
  background: rgba(138, 180, 255, 0.20);
  color: #fff;
}

html.theme-dark .home-carousel-empty {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
}

html.theme-dark .home-carousel-grid-card {
  background: #111827;
  border-color: #243042;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

html.theme-dark .home-carousel-grid-media::after {
  background: linear-gradient(180deg, transparent 18%, rgba(15,23,42,0.18) 100%);
}

html.theme-dark .home-carousel-grid-body {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
  color: #e5e7eb;
}

html.theme-dark .home-carousel-grid-title {
  color: #f8fafc;
}

html.theme-dark .home-carousel-grid-excerpt,
html.theme-dark .home-carousel-grid-meta {
  color: #94a3b8;
}

html.theme-dark .sticky-bar {
  background: #0f172a;
  border-bottom-color: #243042;
}

html.theme-dark .sticky-bar-label {
  color: #f59e0b;
}

html.theme-dark .sticky-card {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.20);
  color: #f8fafc;
}

html.theme-dark .sticky-card:hover {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.30);
}

html.theme-dark .main-layout {
  background: linear-gradient(180deg, rgba(11,18,32,0.96) 0%, rgba(15,23,42,0.98) 100%);
}

html.theme-dark .hot-rank {
  background: #1f2937;
  color: #cbd5e1;
}

html.theme-dark .hot-rank.top3 {
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
}

html.theme-dark .hot-views,
html.theme-dark .random-author,
html.theme-dark .user-meta {
  color: #94a3b8;
}

html.theme-dark .card-grid .feed-card {
  background: #1e293b;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

html.theme-dark .card-grid .feed-card:hover {
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.5);
}

html.theme-dark .feed-card-cover {
  background-color: #0f172a;
}

html.theme-dark .feed-card-cover.is-placeholder {
  background-image: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #020617 100%);
}

html.theme-dark .feed-card-body {
  color: #e2e8f0;
}

html.theme-dark .feed-card-title {
  color: #f1f5f9;
}

html.theme-dark .feed-card-footer {
  color: #94a3b8;
}

html.theme-dark .pagination a,
html.theme-dark .pagination span {
  background: #0f172a;
  color: #dbeafe;
  border-color: #243042;
}

html.theme-dark .pagination a:hover {
  color: #ffffff;
  border-color: #8ab4ff;
}

html.theme-dark .pagination .active {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
  border-color: transparent;
}

html.theme-dark .pagination-jump input {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
}

html.theme-dark .pagination-jump button {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
}

html.theme-dark .login-container,
html.theme-dark .register-shell,
html.theme-dark .recovery-shell {
  background: linear-gradient(180deg, rgba(11,18,32,0.96) 0%, rgba(15,23,42,0.98) 100%);
}

html.theme-dark .login-card,
html.theme-dark .register-hero,
html.theme-dark .register-card,
html.theme-dark .recovery-hero,
html.theme-dark .recovery-panel,
html.theme-dark .recovery-option {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
  border-color: #243042;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34);
  color: #e5e7eb;
}

html.theme-dark .register-hero,
html.theme-dark .recovery-hero {
  background: linear-gradient(135deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
}

html.theme-dark .register-kicker,
html.theme-dark .recovery-kicker {
  background: rgba(138,180,255,0.12);
  color: #dbeafe;
}

html.theme-dark .register-hero h1,
html.theme-dark .register-header h2,
html.theme-dark .recovery-hero h1,
html.theme-dark .recovery-panel h2,
html.theme-dark .login-header h2,
html.theme-dark .recovery-option h3 {
  color: #f8fafc;
}

html.theme-dark .register-hero p,
html.theme-dark .register-header p,
html.theme-dark .recovery-hero p,
html.theme-dark .recovery-panel .sub,
html.theme-dark .recovery-option p,
html.theme-dark .login-header p,
html.theme-dark .recovery-note,
html.theme-dark .hint-text,
html.theme-dark .foot-links,
html.theme-dark .register-card small {
  color: #94a3b8;
}

html.theme-dark .form-group label,
html.theme-dark .agreement,
html.theme-dark .remember-me,
html.theme-dark .demo-account-title,
html.theme-dark .question-box {
  color: #e5e7eb;
}

html.theme-dark .form-group input,
html.theme-dark .form-group select,
html.theme-dark .form-group textarea,
html.theme-dark .login-card input,
html.theme-dark .recovery-panel input {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
  box-shadow: none;
}

html.theme-dark .form-group input:focus,
html.theme-dark .form-group select:focus,
html.theme-dark .form-group textarea:focus,
html.theme-dark .login-card input:focus,
html.theme-dark .recovery-panel input:focus {
  border-color: #8ab4ff;
  box-shadow: 0 0 0 3px rgba(138,180,255,0.14);
}

html.theme-dark .form-group small,
html.theme-dark .agreement,
html.theme-dark .recovery-note,
html.theme-dark .hint-text {
  color: #94a3b8;
}

html.theme-dark .btn-submit,
html.theme-dark .btn-login {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37,99,235,0.22);
}

html.theme-dark .btn-submit:hover,
html.theme-dark .btn-login:hover {
  box-shadow: 0 16px 28px rgba(37,99,235,0.30);
}

html.theme-dark .btn-secondary {
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid #334155;
}

html.theme-dark .btn-secondary:hover {
  background: #273244;
}

html.theme-dark .divider::before,
html.theme-dark .question-box,
html.theme-dark .recovery-option a,
html.theme-dark .foot-links,
html.theme-dark .login-card .divider::before {
  background: #243042;
}

html.theme-dark .divider span {
  background: #111827;
  color: #94a3b8;
}

html.theme-dark .demo-account {
  background: linear-gradient(135deg, rgba(15,23,42,0.96) 0%, rgba(17,24,39,0.96) 100%);
  border-color: #243042;
}

html.theme-dark .demo-account-info code {
  background: #0f172a;
  color: #dbeafe;
}

html.theme-dark .alert-success {
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.22);
}

html.theme-dark .alert-error {
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.22);
}

html.theme-dark .recovery-option a {
  background: #0f172a;
  color: #dbeafe;
}

html.theme-dark .recovery-option a:hover {
  border-color: #8ab4ff;
  color: #fff;
  box-shadow: 0 10px 18px rgba(138,180,255,0.14);
}

html.theme-dark .locked-note {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.22);
  color: #fbbf24;
}

html.theme-dark .help-shell,
html.theme-dark .wallet-page {
  color: #e5e7eb;
}

html.theme-dark .help-hero {
  background: linear-gradient(135deg, #0f172a 0%, #111827 45%, #1f2937 100%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);
}

html.theme-dark .help-card,
html.theme-dark .help-empty,
html.theme-dark .wallet-card,
html.theme-dark .channel-card,
html.theme-dark .notice {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
  border-color: #243042;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.30);
}

html.theme-dark .help-card-header:hover {
  background: rgba(255,255,255,0.03);
}

html.theme-dark .help-card-header h2,
html.theme-dark .help-card-body h3,
html.theme-dark .help-tag,
html.theme-dark .wallet-title,
html.theme-dark .channel-title {
  color: #f8fafc;
}

html.theme-dark .help-card-header .meta,
html.theme-dark .help-card-body,
html.theme-dark .help-empty,
html.theme-dark .wallet-subtitle,
html.theme-dark .summary-label,
html.theme-dark .channel-meta,
html.theme-dark .notice {
  color: #94a3b8;
}

html.theme-dark .help-tag {
  background: rgba(138,180,255,0.12);
}

html.theme-dark .help-empty {
  border-style: dashed;
}

html.theme-dark .wallet-card-header,
html.theme-dark .wallet-card-body {
  color: #e5e7eb;
}

html.theme-dark .summary-item {
  background: linear-gradient(180deg, rgba(17,24,39,0.98) 0%, rgba(15,23,42,0.98) 100%);
  border-color: #243042;
}

html.theme-dark .summary-value {
  color: #dbeafe;
}

html.theme-dark .form-field label {
  color: #dbeafe;
}

html.theme-dark .form-field input,
html.theme-dark .form-field select,
html.theme-dark .form-field textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
}

html.theme-dark .btn-secondary {
  background: #1f2937;
  color: #e5e7eb;
}

html.theme-dark .btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
  color: #fff;
}

html.theme-dark .channel-badge.on {
  background: rgba(16,185,129,0.14);
  color: #6ee7b7;
}

html.theme-dark .channel-badge.off {
  background: rgba(239,68,68,0.14);
  color: #fca5a5;
}

html.theme-dark .channel-qr {
  background: #0f172a;
  border-color: #243042;
}

html.theme-dark .editor-wrapper,
html.theme-dark .tos-container {
  color: #e5e7eb;
}

html.theme-dark .editor-toolbar,
html.theme-dark .module-item,
html.theme-dark .card,
html.theme-dark .access-preview-card,
html.theme-dark .promo-section,
html.theme-dark .draft-notice,
html.theme-dark .tos-card,
html.theme-dark .tos-panel {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
  border-color: #243042 !important;
  box-shadow: 0 16px 34px rgba(0,0,0,0.30) !important;
}

html.theme-dark .editor-header h1,
html.theme-dark .editor-wrapper label,
html.theme-dark .module-type-label,
html.theme-dark .access-preview-summary,
html.theme-dark .promo-checkbox label,
html.theme-dark .tos-hero h1,
html.theme-dark .tos-section h2,
html.theme-dark .tos-section h3 {
  color: #f8fafc;
}

html.theme-dark .editor-toolbar {
  border: 1px solid #243042;
}

html.theme-dark .toolbar-btn {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
}

html.theme-dark .toolbar-btn:hover {
  background: rgba(79,70,229,0.18);
  color: #dbeafe;
  border-color: #8ab4ff;
}

html.theme-dark .module-header {
  background: #111827;
  border-bottom-color: #243042;
}

html.theme-dark .module-body textarea,
html.theme-dark .module-body input[type="text"],
html.theme-dark .editor-wrapper input,
html.theme-dark .editor-wrapper select,
html.theme-dark .editor-wrapper textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
}

html.theme-dark .module-action-btn,
html.theme-dark .separator-line,
html.theme-dark .scale-row span,
html.theme-dark .form-group label,
html.theme-dark .tos-meta,
html.theme-dark .tos-summary,
html.theme-dark .tos-section p,
html.theme-dark .tos-section li,
html.theme-dark .tos-note {
  color: #94a3b8;
}

html.theme-dark .module-item:hover,
html.theme-dark .module-item.drag-over {
  border-color: #8ab4ff;
}

html.theme-dark .image-preview-area img,
html.theme-dark .compare-image-box img,
html.theme-dark .cover-preview,
html.theme-dark .channel-qr img {
  background: #0f172a;
}

html.theme-dark .cover-preview {
  border: 1px solid #243042;
  color: #94a3b8;
}

html.theme-dark .access-preview-badge.public {
  background: rgba(16,185,129,0.14);
  color: #6ee7b7;
}

html.theme-dark .access-preview-badge.vip {
  background: rgba(245,158,11,0.14);
  color: #fbbf24;
}

html.theme-dark .access-preview-badge.paid {
  background: rgba(244,63,94,0.14);
  color: #fda4af;
}

html.theme-dark .access-preview-controls .form-group label {
  color: #dbeafe;
}

html.theme-dark .separator-line::before,
html.theme-dark .separator-line::after,
html.theme-dark .tos-hero,
html.theme-dark .tos-section h2 {
  border-color: #243042;
}

html.theme-dark .tos-kicker {
  background: rgba(138,180,255,0.12);
  color: #dbeafe;
}

html.theme-dark .tos-nav a {
  background: #0f172a;
  color: #dbeafe;
  border-color: #243042;
}

html.theme-dark .tos-nav a:hover {
  background: rgba(79,70,229,0.16);
  color: #fff;
  border-color: #8ab4ff;
}

html.theme-dark .tos-panel {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
}

html.theme-dark .chat-layout,
html.theme-dark .chat-conversation,
html.theme-dark .chat-conv-placeholder,
html.theme-dark .chat-conv-shell,
html.theme-dark .chat-friend-list,
html.theme-dark .chat-conv-header,
html.theme-dark .chat-input-row,
html.theme-dark .chat-composer,
html.theme-dark .chat-emoji-panel,
html.theme-dark .comment-emoji-panel,
html.theme-dark .notification-item,
html.theme-dark .notification-card,
html.theme-dark .post-detail-layout,
html.theme-dark .post-tip-history-panel,
html.theme-dark .post-block-vote,
html.theme-dark .post-block-file,
html.theme-dark .post-block-separator,
html.theme-dark .post-block-table th,
html.theme-dark .post-block-table td,
html.theme-dark .sidebar-card,
html.theme-dark .author-card,
html.theme-dark .tip-panel,
html.theme-dark .comment-thread,
html.theme-dark .comment-children {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
  border-color: #243042 !important;
  color: #e5e7eb;
}

html.theme-dark .chat-layout {
  box-shadow: 0 16px 34px rgba(0,0,0,0.32);
}

html.theme-dark .chat-friend-list,
html.theme-dark .chat-conversation {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%);
}

html.theme-dark .chat-friend-header,
html.theme-dark .chat-conv-title,
html.theme-dark .chat-conv-placeholder,
html.theme-dark .chat-conv-badge,
html.theme-dark .chat-emoji-panel-header,
html.theme-dark .chat-composer-hint,
html.theme-dark .comment-composer-hint,
html.theme-dark .notification-card__text,
html.theme-dark .notification-item-title,
html.theme-dark .post-breadcrumb,
html.theme-dark .author-name,
html.theme-dark .author-meta,
html.theme-dark .post-stats-bar,
html.theme-dark .post-block-text,
html.theme-dark .post-block-title,
html.theme-dark .post-block-vote h4,
html.theme-dark .sidebar-post-title,
html.theme-dark .sidebar-post-meta,
html.theme-dark .sidebar-user-name,
html.theme-dark .sidebar-user-level,
html.theme-dark .comment-thread__name,
html.theme-dark .comment-thread__time,
html.theme-dark .comment-thread__content,
html.theme-dark .comment-thread__replying,
html.theme-dark .comment-action-btn,
html.theme-dark .post-tip-history-title,
html.theme-dark .post-tip-history-summary,
html.theme-dark .post-tip-history-name,
html.theme-dark .post-tip-history-detail {
  color: #e5e7eb;
}

html.theme-dark .chat-friend-item,
html.theme-dark .chat-message-bubble--other,
html.theme-dark .chat-message-empty,
html.theme-dark .chat-emoji-btn,
html.theme-dark .notification-card.unread,
html.theme-dark .notification-target-pill,
html.theme-dark .post-cover-wrap,
html.theme-dark .post-block-image,
html.theme-dark .post-block-compare img,
html.theme-dark .post-tip-history-item,
html.theme-dark .sidebar-post-item,
html.theme-dark .sidebar-user-item,
html.theme-dark .vote-option,
html.theme-dark .post-block-code {
  background: #0f172a;
  border-color: #243042 !important;
}

html.theme-dark .chat-friend-item:hover,
html.theme-dark .chat-friend-item.active,
html.theme-dark .chat-emoji-btn:hover,
html.theme-dark .sidebar-post-item:hover,
html.theme-dark .sidebar-user-item:hover,
html.theme-dark .vote-option:hover {
  background: rgba(79,70,229,0.14);
  border-color: #8ab4ff !important;
}

html.theme-dark .chat-friend-name,
html.theme-dark .chat-friend-status,
html.theme-dark .chat-conv-subtitle,
html.theme-dark .notification-item-time,
html.theme-dark .notification-empty-hint,
html.theme-dark .post-breadcrumb,
html.theme-dark .post-breadcrumb-sep,
html.theme-dark .post-block-image-caption,
html.theme-dark .post-block-compare-caption,
html.theme-dark .comment-thread__replying,
html.theme-dark .comment-thread__meta,
html.theme-dark .comment-thread__actions,
html.theme-dark .post-tip-history-empty,
html.theme-dark .tip-panel label,
html.theme-dark .tip-panel .tip-hint,
html.theme-dark .post-tip-tools label,
html.theme-dark .sidebar-card h4 {
  color: #94a3b8;
}

html.theme-dark .chat-input-box,
html.theme-dark .comment-textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
}

html.theme-dark .chat-input-box::placeholder,
html.theme-dark .comment-textarea::placeholder {
  color: #64748b;
}

html.theme-dark .chat-conv-header {
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(8px);
  border-bottom-color: #243042;
}

html.theme-dark .chat-msgs {
  background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

html.theme-dark .chat-message-bubble--other {
  color: #e5e7eb;
}

html.theme-dark .notification-card {
  box-shadow: 0 12px 28px rgba(0,0,0,0.28);
}

html.theme-dark .notification-card.unread {
  border-left-color: #8ab4ff;
  background: linear-gradient(180deg, rgba(79,70,229,0.14), rgba(15,23,42,0));
}

html.theme-dark .notification-target-pill {
  color: #dbeafe;
}

html.theme-dark .post-detail-layout {
  background: linear-gradient(180deg, rgba(11,18,32,0.96) 0%, rgba(15,23,42,0.98) 100%);
}

html.theme-dark .post-breadcrumb a {
  color: #8ab4ff;
}

html.theme-dark .post-cover-wrap,
html.theme-dark .author-card,
html.theme-dark .post-block-vote,
html.theme-dark .post-block-file,
html.theme-dark .post-block-table,
html.theme-dark .post-tip-history-panel,
html.theme-dark .sidebar-card,
html.theme-dark .tip-panel,
html.theme-dark .comment-reply-banner,
html.theme-dark .comment-emoji-panel {
  box-shadow: 0 16px 34px rgba(0,0,0,0.30);
}

html.theme-dark .post-block-file,
html.theme-dark .post-block-vote,
html.theme-dark .post-block-table th,
html.theme-dark .post-block-table td,
html.theme-dark .post-tip-history-item,
html.theme-dark .comment-thread,
html.theme-dark .comment-children {
  color: #e5e7eb;
}

html.theme-dark .post-block-file {
  color: #dbeafe;
}

html.theme-dark .post-block-file:hover {
  background: #1f2937;
  color: #fff;
}

html.theme-dark .post-block-table th {
  background: #111827;
}

html.theme-dark .action-bar,
html.theme-dark .post-breadcrumb,
html.theme-dark .post-status-badge,
html.theme-dark .post-admin-tools .admin-toggle-btn,
html.theme-dark .post-tip-tools,
html.theme-dark .post-tip-tools label {
  color: #e5e7eb;
}

html.theme-dark .post-status-badge.edit {
  background: rgba(245,158,11,0.14);
  color: #fbbf24;
  border-color: rgba(245,158,11,0.22);
}

html.theme-dark .post-status-badge.admin-edit {
  background: rgba(59,130,246,0.14);
  color: #93c5fd;
  border-color: rgba(59,130,246,0.22);
}

html.theme-dark .post-admin-tools .admin-toggle-btn.off,
html.theme-dark .btn-secondary {
  background: #1f2937;
  color: #e5e7eb;
}

html.theme-dark .post-admin-tools .admin-toggle-btn.sticky.on {
  background: #15803d;
}

html.theme-dark .post-admin-tools .admin-toggle-btn.featured.on {
  background: #b45309;
}

html.theme-dark .post-block-separator::before,
html.theme-dark .post-block-separator::after,
html.theme-dark .comment-children {
  background: #243042;
}

html.theme-dark .comment-reply-banner {
  background: linear-gradient(135deg, rgba(79,70,229,0.12), rgba(37,99,235,0.10));
  border-color: #243042;
}

html.theme-dark .comment-reply-banner__title,
html.theme-dark .comment-reply-banner__hint,
html.theme-dark .comment-reply-banner__target {
  color: #dbeafe;
}

html.theme-dark .profile-page,
html.theme-dark .settings-grid {
  color: #e5e7eb;
}

html.theme-dark .profile-card,
html.theme-dark .settings-nav,
html.theme-dark .settings-card {
  background: linear-gradient(180deg, rgba(15,23,42,0.98) 0%, rgba(17,24,39,0.98) 100%) !important;
  border-color: #243042 !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34) !important;
}

html.theme-dark .profile-card-header {
  background: linear-gradient(135deg, #0f172a 0%, #111827 52%, #1f2937 100%);
}

html.theme-dark .profile-avatar-wrap {
  border-color: #111827;
  background: #172036;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.36);
}

html.theme-dark .avatar-placeholder {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%);
}

html.theme-dark .profile-info h2,
html.theme-dark .edit-section h3,
html.theme-dark .settings-card h3,
html.theme-dark .settings-nav a,
html.theme-dark .profile-meta-item strong,
html.theme-dark .profile-stat-num,
html.theme-dark .avatar-box button {
  color: #f8fafc;
}

html.theme-dark .username-tag,
html.theme-dark .profile-stat-label,
html.theme-dark .edit-note,
html.theme-dark .meta-line,
html.theme-dark .settings-card > p {
  color: #94a3b8;
}

html.theme-dark .profile-meta-item {
  background: #0f172a;
  border-color: #243042;
  color: #dbeafe;
}

html.theme-dark .profile-stats {
  background: #0f172a;
  border-top-color: #243042;
}

html.theme-dark .profile-stat + .profile-stat {
  border-left-color: #243042;
}

html.theme-dark .edit-field > label,
html.theme-dark .privacy-option,
html.theme-dark .settings-field label {
  color: #dbeafe;
}

html.theme-dark .edit-field input:not([type="checkbox"]),
html.theme-dark .edit-field textarea,
html.theme-dark .settings-field input,
html.theme-dark .settings-field textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #243042;
}

html.theme-dark .edit-field input:disabled,
html.theme-dark .settings-field input:disabled {
  background: #111827;
  color: #94a3b8;
}

html.theme-dark .edit-note,
html.theme-dark .settings-nav a:hover {
  background: #0f172a;
  border-color: #243042;
}

html.theme-dark .edit-note-title {
  color: #f8fafc;
}

html.theme-dark .settings-nav a.active {
  background: linear-gradient(135deg, rgba(79,70,229,0.22) 0%, rgba(37,99,235,0.22) 100%);
  color: #f8fafc;
  border-left-color: #8ab4ff;
}

html.theme-dark .avatar-preview {
  background: linear-gradient(135deg, #1f2937, #0f172a);
}

html.theme-dark body:has(.admin-shell),
html.theme-dark body:has(.admin-wrapper) {
  background:
    radial-gradient(circle at top left, rgba(79, 70, 229, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 24%),
    linear-gradient(180deg, #0b1220 0%, #0f172a 100%) !important;
}

html.theme-dark .admin-shell,
html.theme-dark .admin-wrapper {
  color: #e5e7eb;
}

html.theme-dark .admin-sidebar,
html.theme-dark .sidebar {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%) !important;
  border: 1px solid #243042 !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34) !important;
}

html.theme-dark .admin-sidebar h3,
html.theme-dark .sidebar h3,
html.theme-dark .panel-header h1,
html.theme-dark .panel-header h2,
html.theme-dark .panel-header h3,
html.theme-dark .admin-header h1,
html.theme-dark .admin-header h2,
html.theme-dark .settings-section h3,
html.theme-dark .settings-panel h3,
html.theme-dark .hero h1,
html.theme-dark .hero h2,
html.theme-dark .mini-card h3 {
  color: #f8fafc !important;
}

html.theme-dark .admin-sidebar-menu a,
html.theme-dark .sidebar-menu a,
html.theme-dark .sidebar a {
  color: #cbd5e1 !important;
}

html.theme-dark .admin-sidebar-menu a:hover,
html.theme-dark .admin-sidebar-menu a.active,
html.theme-dark .sidebar-menu a:hover,
html.theme-dark .sidebar-menu a.active,
html.theme-dark .sidebar a:hover,
html.theme-dark .sidebar a.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(37, 99, 235, 0.18)) !important;
  color: #f8fafc !important;
  transform: translateX(2px);
}

html.theme-dark .admin-content,
html.theme-dark .admin-main,
html.theme-dark .content {
  color: #e5e7eb;
}

html.theme-dark .admin-header,
html.theme-dark .settings-panel,
html.theme-dark .panel,
html.theme-dark .hero,
html.theme-dark .stats-card,
html.theme-dark .mini-card,
html.theme-dark .detail-card,
html.theme-dark .card,
html.theme-dark .content .panel,
html.theme-dark .admin-content .panel,
html.theme-dark .admin-main .panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.98) 100%) !important;
  border-color: #243042 !important;
  color: #e5e7eb !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.34) !important;
}

html.theme-dark .panel-header,
html.theme-dark .settings-section,
html.theme-dark .table-wrap,
html.theme-dark .section-card,
html.theme-dark .settings-group,
html.theme-dark .search-row,
html.theme-dark .card-grid,
html.theme-dark .list-panel {
  border-color: #243042 !important;
}

html.theme-dark .panel-header,
html.theme-dark .admin-header,
html.theme-dark .settings-section,
html.theme-dark .table-wrap,
html.theme-dark .list-panel {
  background: rgba(15, 23, 42, 0.86) !important;
}

html.theme-dark .table,
html.theme-dark table,
html.theme-dark .data-table {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #243042 !important;
}

html.theme-dark .table th,
html.theme-dark table th,
html.theme-dark .data-table th {
  background: #111827 !important;
  color: #f8fafc !important;
  border-color: #243042 !important;
}

html.theme-dark .table td,
html.theme-dark table td,
html.theme-dark .data-table td {
  border-color: #243042 !important;
  color: #dbeafe !important;
}

html.theme-dark .table tr:hover,
html.theme-dark table tr:hover,
html.theme-dark .data-table tr:hover {
  background: rgba(79, 70, 229, 0.10) !important;
}

html.theme-dark .search-row input,
html.theme-dark .search-row select,
html.theme-dark .form input,
html.theme-dark .form textarea,
html.theme-dark .form select,
html.theme-dark .admin-content input,
html.theme-dark .admin-content textarea,
html.theme-dark .admin-content select,
html.theme-dark .admin-main input,
html.theme-dark .admin-main textarea,
html.theme-dark .admin-main select,
html.theme-dark .settings-panel input,
html.theme-dark .settings-panel textarea,
html.theme-dark .settings-panel select {
  background: #0f172a !important;
  color: #e5e7eb !important;
  border-color: #243042 !important;
}

html.theme-dark .search-row input::placeholder,
html.theme-dark .form input::placeholder,
html.theme-dark .form textarea::placeholder,
html.theme-dark .settings-panel input::placeholder,
html.theme-dark .settings-panel textarea::placeholder {
  color: #64748b !important;
}

html.theme-dark .btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #2563eb 100%) !important;
  color: #fff !important;
}

html.theme-dark .btn-secondary {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border: 1px solid #334155 !important;
}

html.theme-dark .btn-warning {
  background: #b45309 !important;
  color: #fff !important;
}

html.theme-dark .btn-danger,
html.theme-dark .btn-delete {
  background: #b91c1c !important;
  color: #fff !important;
}

html.theme-dark .btn-success {
  background: #15803d !important;
  color: #fff !important;
}

html.theme-dark .badge,
html.theme-dark .status-badge,
html.theme-dark .admin-badge {
  border: 1px solid rgba(148, 163, 184, 0.18);
}

html.theme-dark .badge-active,
html.theme-dark .badge-user,
html.theme-dark .badge-muted,
html.theme-dark .badge-admin,
html.theme-dark .badge-inactive,
html.theme-dark .badge-banned {
  background: rgba(79, 70, 229, 0.14) !important;
  color: #dbeafe !important;
}

html.theme-dark .settings-nav a {
  background: rgba(15, 23, 42, 0.86);
  color: #cbd5e1;
  border-color: #243042;
}

html.theme-dark .settings-nav a:hover,
html.theme-dark .settings-nav a.active {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.22), rgba(37, 99, 235, 0.18));
  color: #f8fafc;
  border-left-color: #8ab4ff;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 下拉菜单中的所有文本默认为黑色 */
.dropdown-menu {
  color: #333;
}

.dropdown-menu * {
  color: #333;
}

html.theme-dark .dropdown-menu,
html.theme-dark .dropdown-menu * {
  color: #e5e7eb !important;
}

html.theme-dark .dropdown-menu a {
  color: #e5e7eb !important;
}

html.theme-dark .dropdown-menu a:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #ffffff !important;
}

html.theme-dark .dropdown-menu .divider {
  background-color: var(--border-color);
}

/* 下拉菜单中的链接 */
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #333 !important;
  text-decoration: none;
  padding: 12px 20px;
  font-size: 14px;
  transition: all 0.2s ease;
  font-weight: normal;
}

.dropdown-menu a:hover {
  background-color: #f5f5f5;
  color: #667eea !important;
  padding-left: 24px;
}

/* 下拉菜单分割线 */
.dropdown-menu .divider {
  height: 1px;
  background-color: #e0e0e0;
  margin: 5px 0;
  border: none;
  color: transparent;
}

/* ========== 用户菜单特殊样式 ========== */

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.dropdown:hover .user-avatar,
.dropdown-user.is-open .user-avatar {
  border-color: rgba(255, 255, 255, 0.6);
}

/* ========== 通知列表 ========== */

.notification-list {
  max-height: 400px;
  overflow-y: auto;
}

.notification-item {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
}

.notification-item:hover {
  background-color: #f9f9f9;
}

.notification-item.unread {
  background-color: #f0f4ff;
}

.notification-item-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 5px;
}

.notification-item-title {
  font-weight: 600;
  color: #333;
  font-size: 13px;
}

.notification-item-time {
  font-size: 12px;
  color: #999;
}

.notification-item-text {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* ========== 消息列表 ========== */

.message-list {
  max-height: 400px;
  overflow-y: auto;
}

.message-item {
  padding: 12px 15px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  gap: 10px;
  align-items: start;
  color: #333;
}

.message-item:hover {
  background-color: #f9f9f9;
}

.message-item.unread {
  background-color: #f0f4ff;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 14px;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

.message-name {
  font-weight: 600;
  font-size: 13px;
  color: #333;
}

.message-time {
  font-size: 11px;
  color: #999;
}

.message-text {
  font-size: 12px;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== 登录/注册按钮 ========== */

.auth-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
  list-style: none;
}

.btn-login {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
}

.btn-login:hover {
  background-color: white;
  color: #667eea;
}

.btn-register {
  background-color: #ff6b6b;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 14px;
  display: inline-block;
}

.btn-register:hover {
  background-color: #ff5252;
  transform: translateY(-2px);
}

/* ========== 容器样式 ========== */

/* 全宽容器：用 calc 突破父容器限制，内部保持 1800px 有效宽度 */
.full-width-container {
  width: 100%;
  margin-left: 0;
  padding: 30px max(16px, calc((100vw - 1800px) / 2));
}

/* 窄容器用于认证页面 */
.auth-container {
  max-width: 440px;
  margin: 40px auto;
  padding: 0 20px;
}

/* 内容卡片通用 */
.content-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* 带侧边栏的布局 */
.layout-with-sidebar {
  width: 100%;
  margin-left: 0;
  padding: 30px max(16px, calc((100vw - 1800px) / 2));
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: #f5f5f5;
  min-height: calc(100vh - 70px);
}

.layout-main {
  flex: 1;
  min-width: 0;
}

.layout-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 侧边栏卡片 */
.sidebar-card {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.sidebar-card h4 {
  font-size: 15px;
  color: #333;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #667eea;
}

.sidebar-card .sidebar-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: #333;
}

.sidebar-card .sidebar-item:last-child { border-bottom: none; }
.sidebar-card .sidebar-item:hover { color: #667eea; }
.sidebar-card .sidebar-item-title { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sidebar-card .sidebar-item-meta { font-size: 11px; color: #999; margin-top: 4px; }
.sidebar-card .sidebar-user-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f5f5f5; }
.sidebar-card .sidebar-user-item:last-child { border-bottom: none; }
.sidebar-card .sidebar-user-avatar { width: 36px; height: 36px; border-radius: 50%; background: #667eea; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.sidebar-card .sidebar-user-name { font-size: 13px; font-weight: 600; }
.sidebar-card .sidebar-user-level { font-size: 11px; color: #999; }

.search-user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.followers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.search-user-card,
.follower-card {
  min-width: 0;
}

.log-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.sidebar-card.sidebar-ad-card {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid #eef2ff;
  border-radius: 10px;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-card.sidebar-ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.12);
}

.sidebar-ad-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 120px;
  object-fit: cover;
  background: #111827;
}

.sidebar-ad-body {
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.sidebar-ad-title {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 6px;
}

.sidebar-ad-text {
  font-size: 12px;
  line-height: 1.5;
  color: #6b7280;
}

/* 公告横幅 */
.announcement-banner {
  background: linear-gradient(135deg, #fff3cd, #ffeeba);
  border-bottom: 1px solid #ffc107;
  padding: 10px 20px;
  text-align: center;
  font-size: 14px;
  color: #856404;
  position: relative;
}

.announcement-banner .close-banner {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  background: none;
  border: none;
  font-size: 16px;
  color: #856404;
  opacity: 0.6;
}

.announcement-banner .close-banner:hover { opacity: 1; }

@media (max-width: 1024px) {
  .layout-with-sidebar { flex-direction: column; padding-left: 16px; padding-right: 16px; }
  .layout-sidebar { width: 100%; position: static; }
}

/* 兼容旧样式 */
.container { max-width: 1800px; margin: 0 auto; padding: 0 20px; }
.page-container { flex: 1; padding: 40px 20px; }
.page-wrapper { max-width: 1800px; margin: 0 auto; padding: 30px 20px; }

/* ========== 页面标题 ========== */

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

.page-header h1 {
  font-size: 32px;
  color: #333;
}

.page-header .header-actions {
  display: flex;
  gap: 15px;
}

/* ========== 按钮样式 ========== */

.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background-color: #667eea;
  color: white;
}

.btn-primary:hover {
  background-color: #5568d3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: #ff6b6b;
  color: white;
}

.btn-danger:hover {
  background-color: #ff5252;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
}

/* ========== 卡片样式 ========== */

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
  text-decoration: none;
  display: block;
}

.card-title:hover {
  color: #667eea;
}

.card-content {
  color: #666;
  margin: 15px 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #999;
  padding-top: 15px;
  border-top: 1px solid #f0f0f0;
  margin-top: 15px;
}

.card-meta-item {
  display: flex;
  gap: 5px;
}

.card-meta-item i {
  color: #667eea;
}

/* ========== 表单样式 ========== */

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  color: #333;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #999;
}

/* ========== 错误和成功提示 ========== */

.alert {
  padding: 15px 20px;
  border-radius: 6px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-error {
  background-color: #ffe0e0;
  color: #d32f2f;
  border: 1px solid #ff9999;
}

.alert-success {
  background-color: #e0ffe0;
  color: #388e3c;
  border: 1px solid #99ff99;
}

.alert-warning {
  background-color: #fff3cd;
  color: #ff6b00;
  border: 1px solid #ffd699;
}

/* ========== 列表样式 ========== */

.posts-list {
  display: grid;
  gap: 20px;
  margin: 30px 0;
}

.post-item {
  display: flex;
  gap: 20px;
}

.post-item .post-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 20px;
  flex-shrink: 0;
}

.post-item .post-content {
  flex: 1;
}

.post-item .post-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.post-item .post-author {
  font-weight: 600;
  color: #333;
}

.post-item .post-time {
  font-size: 14px;
  color: #999;
}

.post-item .post-title {
  font-size: 18px;
  font-weight: 600;
  color: #667eea;
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.post-item .post-title:hover {
  color: #764ba2;
}

.post-item .post-excerpt {
  color: #666;
  margin-bottom: 10px;
}

.post-item .post-stats {
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: #999;
}

/* ========== 空状态 ========== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 18px;
  margin-bottom: 30px;
}

/* ========== 响应式设计 ========== */

@media (max-width: 1024px) {
  nav .nav-container {
    gap: 15px;
  }

  .nav-search {
    max-width: 250px;
    flex-basis: 250px;
  }

  .nav-announcement {
    min-width: 200px;
    max-width: 420px;
  }

  nav .nav-menu {
    gap: 15px;
  }
}

@media (max-width: 768px) {
  .banner {
    padding: 10px 15px;
    font-size: 12px;
  }

  .container,
  .page-container,
  .page-wrapper,
  .full-width-container,
  .layout-with-sidebar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .layout-with-sidebar {
    padding-top: 16px;
    padding-bottom: 24px;
  }

  .page-container,
  .page-wrapper {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .full-width-container {
    padding-top: 18px;
    padding-bottom: 24px;
  }

  .page-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    gap: 10px;
  }

  nav .nav-container {
    padding: 10px 15px 12px;
    align-items: flex-start;
    gap: 12px;
  }

  nav .nav-brand {
    font-size: 20px;
    flex: 1 1 auto;
    min-width: 0;
  }

  nav .nav-brand-icon {
    font-size: 24px;
  }

  .nav-mobile-toggle {
    display: inline-flex;
    order: 2;
    flex-shrink: 0;
  }

  .nav-search {
    order: 3;
    flex-basis: 100%;
    max-width: 100%;
    margin: 0;
  }

  .nav-announcement {
    order: 4;
    flex-basis: 100%;
    max-width: 100%;
    margin: 0;
  }

  .nav-announcement-text {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  nav .nav-menu {
    order: 5;
    display: none;
    width: 100%;
    flex-basis: 100%;
    margin-left: 0;
    padding: 10px 0 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  nav.site-nav.is-mobile-open .nav-menu {
    display: flex;
  }

  nav .nav-menu > li {
    width: 100%;
  }

  .nav-menu a {
    font-size: 14px;
    padding: 10px 12px;
    min-height: 44px;
    width: 100%;
  }

  .nav-tool-group {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .nav-tool-group .nav-icon-btn {
    flex: 1 1 calc(50% - 4px);
    min-height: 44px;
    border-radius: 12px;
    width: auto;
  }

  nav .nav-menu .btn-primary,
  nav .nav-menu .btn-secondary,
  nav .nav-menu .nav-icon-btn,
  nav .nav-menu .nav-avatar-btn {
    width: 100%;
    justify-content: center;
    height: 44px;
  }

  .auth-buttons {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .auth-buttons a {
    width: 100%;
    justify-content: center;
  }

  .dropdown {
    width: 100%;
  }

  .dropdown-menu {
    position: static;
    width: 100% !important;
    margin-top: 8px;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    box-shadow: none;
  }

  .dropdown-user.is-open .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: none;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .page-header h1 {
    font-size: 24px;
  }

  .page-header .header-actions {
    width: 100%;
  }

  .page-header .header-actions .btn {
    width: 100%;
  }

  .card,
  .content-card,
  .sidebar-card,
  .wallet-card,
  .redeem-card,
  .help-card,
  .profile-card,
  .settings-card,
  .notification-card {
    border-radius: 16px;
  }

  .card,
  .content-card,
  .sidebar-card {
    padding: 16px;
  }

  .page-header h1 {
    font-size: 22px;
    line-height: 1.25;
  }

  .btn {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  .btn-small {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .post-item {
    flex-direction: column;
  }

  .post-item .post-avatar {
    width: 40px;
    height: 40px;
  }

  .posts-list {
    gap: 14px;
    margin: 18px 0;
  }

  .post-item {
    gap: 12px;
  }

  .post-item .post-avatar {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .post-item .post-header {
    gap: 8px;
  }

  .post-item .post-title {
    font-size: 16px;
  }

  .post-item .post-excerpt {
    font-size: 14px;
    line-height: 1.6;
  }

  .post-item .post-stats {
    gap: 12px;
    font-size: 12px;
    flex-wrap: wrap;
  }

  .empty-state {
    padding: 38px 14px;
  }

  .empty-state-icon {
    font-size: 48px;
    margin-bottom: 14px;
  }

  .empty-state-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 18px;
  }

  .search-summary-card,
  .search-post-card,
  .search-pagination-card {
    padding: 16px 14px !important;
  }

  .search-user-grid,
  .followers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .search-user-card,
  .follower-card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .followers-grid {
    gap: 14px;
  }

  .form-group {
    margin-bottom: 16px;
  }

  .form-group label {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .form-group input,
  .form-group textarea,
  .form-group select,
  .settings-field input,
  .settings-field textarea,
  .edit-field input:not([type="checkbox"]),
  .edit-field textarea,
  .form-field input,
  .form-field select,
  .form-field textarea,
  .chat-input-box,
  .redeem-row input {
    font-size: 16px;
  }

  .notification-list {
    max-height: none;
  }

  .notification-item {
    padding: 12px 14px;
  }

  .notification-item-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 8px;
  }

  .notification-item-title {
    font-size: 14px;
    line-height: 1.45;
  }

  .notification-item-time {
    font-size: 11px;
  }

  .notification-item-text,
  .notification-card__text {
    font-size: 14px;
    line-height: 1.6;
  }

  .notification-card__body {
    flex-direction: column;
    align-items: stretch;
  }

  .notification-card__meta {
    justify-content: flex-start;
  }

  .notification-card__meta .btn,
  .notification-target-pill {
    width: 100%;
    justify-content: center;
  }

  .wallet-page {
    padding: 16px 14px 28px !important;
  }

  .wallet-card-header,
  .wallet-card-body {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .wallet-card-header {
    padding-top: 18px !important;
  }

  .wallet-title {
    font-size: 22px;
    line-height: 1.25;
  }

  .wallet-summary {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    margin-top: 14px !important;
  }

  .summary-item {
    padding: 14px !important;
    border-radius: 14px !important;
  }

  .summary-value {
    font-size: 20px;
  }

  .channel-card {
    padding: 14px !important;
    border-radius: 14px !important;
  }

  .channel-head {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .channel-qr img {
    max-width: 100%;
  }

  .redeem-shell {
    padding: 16px 14px 32px !important;
  }

  .redeem-card {
    padding: 18px 16px !important;
  }

  .redeem-card h2 {
    font-size: 18px !important;
  }

  .redeem-row {
    flex-direction: column !important;
  }

  .redeem-row button {
    width: 100%;
  }

  .log-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .log-table {
    min-width: 520px;
  }

  .log-table th,
  .log-table td {
    padding: 10px 8px;
    font-size: 13px;
  }

  .help-shell {
    padding: 20px 14px 40px !important;
  }

  .help-hero {
    padding: 20px 16px !important;
    border-radius: 18px !important;
    margin-bottom: 16px !important;
  }

  .help-hero h1 {
    font-size: 24px !important;
  }

  .help-card-header {
    padding: 16px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .help-card-body {
    padding: 0 16px 16px !important;
    line-height: 1.75 !important;
  }

  .help-card-body h3 {
    margin-top: 16px !important;
  }

  .profile-page {
    gap: 14px !important;
  }

  .profile-card {
    border-radius: 16px !important;
  }

  .profile-info {
    padding: 56px 16px 18px !important;
  }

  .profile-info h2 {
    font-size: 22px !important;
  }

  .profile-meta {
    gap: 8px !important;
  }

  .profile-meta-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 10px 12px !important;
  }

  .profile-stats {
    grid-template-columns: 1fr !important;
    margin-top: 16px !important;
  }

  .profile-stat + .profile-stat {
    border-left: none !important;
    border-top: 1px solid #eef2f7 !important;
  }

  .edit-section {
    padding: 18px !important;
  }

  .edit-section h3 {
    font-size: 17px !important;
    margin-bottom: 14px !important;
  }

  .edit-grid {
    gap: 12px !important;
  }

  .edit-actions {
    flex-direction: column !important;
    gap: 10px !important;
    margin-top: 18px !important;
  }

  .edit-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .settings-grid {
    gap: 14px !important;
  }

  .settings-nav a {
    padding: 12px 16px !important;
    font-size: 14px !important;
  }

  .settings-card {
    gap: 16px !important;
  }

  .settings-card h3 {
    font-size: 17px !important;
  }

  .settings-fields {
    gap: 12px !important;
  }

  .settings-field label {
    font-size: 13px !important;
  }

  .settings-actions {
    flex-direction: column !important;
  }

  .settings-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .chat-layout {
    border-radius: 16px;
  }

  .chat-friend-list {
    width: 100% !important;
  }

  .chat-friend-header,
  .chat-friend-item,
  .chat-conv-header,
  .chat-msgs,
  .chat-composer {
    padding-left: 14px;
    padding-right: 14px;
  }

  .chat-friend-item {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .chat-conv-placeholder {
    padding: 24px 16px !important;
    text-align: center !important;
  }

  .chat-conv-title {
    font-size: 15px !important;
  }

  .chat-conv-subtitle,
  .chat-friend-status,
  .chat-composer-hint {
    font-size: 11px !important;
  }

  .chat-msgs {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }

  .chat-message-bubble {
    max-width: 88% !important;
    font-size: 14px !important;
  }

  .chat-input-box {
    min-height: 120px !important;
    font-size: 16px !important;
  }

  .chat-emoji-panel {
    margin: 0 14px 2px !important;
    padding: 10px !important;
  }

  .chat-emoji-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }

  .feed-page {
    gap: 14px;
  }

  .feed-hero {
    padding: 18px;
    border-radius: 18px;
  }

  .feed-hero h1 {
    font-size: 22px;
  }

  .feed-hero-stats {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feed-toolbar-note {
    white-space: normal;
  }

  .feed-grid {
    grid-template-columns: 1fr;
  }

  .feed-card-title {
    -webkit-line-clamp: 2;
  }

  .dropdown-menu {
    right: -50px;
    left: auto;
  }
}

@media (max-width: 480px) {
  .banner {
    font-size: 11px;
  }

  .banner-content {
    flex-direction: column;
    gap: 5px;
  }

  nav .nav-brand {
    font-size: 18px;
  }

  nav .nav-brand-icon {
    display: none;
  }

  .nav-search {
    display: block;
  }

  .nav-search input {
    padding: 9px 12px 9px 36px;
    font-size: 13px;
  }

  .nav-announcement {
    display: flex;
    margin: 8px 0 0;
  }

  nav .nav-menu {
    justify-content: flex-start;
    gap: 8px;
  }

  nav .nav-menu a {
    font-size: 13px;
    padding: 9px 10px;
  }

  nav.site-nav.is-mobile-open .nav-menu {
    justify-content: flex-start;
  }

  nav .nav-menu .nav-avatar-btn {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 14px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .page-header .header-actions {
    width: 100%;
  }

  .page-header .header-actions .btn {
    width: 100%;
    font-size: 14px;
  }
}

/* 聊天布局 — 类 QQ 会话窗口 */
.chat-layout { display: flex; gap: 0; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; height: calc(100vh - 180px); min-height: 500px; }
.chat-friend-list { width: 280px; border-right: 1px solid #f0f0f0; display: flex; flex-direction: column; flex-shrink: 0; background: #fafafa; }
.chat-friend-header { padding: 16px 18px; border-bottom: 1px solid #f0f0f0; font-weight: 700; font-size: 15px; color: #333; }
.chat-friend-items { flex: 1; overflow-y: auto; }
.chat-friend-item { display: flex; align-items: center; gap: 10px; padding: 10px 18px; cursor: pointer; transition: background 0.12s; border-bottom: 1px solid #f5f5f5; }
.chat-friend-item:hover { background: #eef0ff; }
.chat-friend-item.active { background: #e8ebff; }
.chat-friend-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#764ba2); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.chat-friend-info { flex: 1; min-width: 0; }
.chat-friend-name { font-weight: 600; font-size: 14px; color: #333; }
.chat-friend-status { font-size: 11px; color: #999; }

.chat-conversation { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-conv-header { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; background: #fff; }
.chat-conv-title { font-weight: 700; font-size: 16px; color: #333; }
.chat-conv-placeholder { flex: 1; display: flex; align-items: center; justify-content: center; color: #ccc; font-size: 14px; flex-direction: column; gap: 8px; background: #fff; }
.chat-conv-placeholder div { font-size: 56px; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; background: #f5f5f5; }
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.chat-input-row { padding: 12px 24px; border-top: 1px solid #f0f0f0; display: flex; gap: 10px; align-items: center; background: #fff; }
.chat-input-wrapper { flex: 1; position: relative; }
.chat-input-box { width: 100%; padding: 12px 40px 12px 14px; border: 1px solid #e0e0e0; border-radius: 10px; font-size: 14px; font-family: inherit; color: #333; outline: none; transition: border-color 0.2s; }
.chat-input-box:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.08); }

/* ===== 私信聊天窗增强样式 ===== */
.chat-layout { display: flex; gap: 0; background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(15,23,42,0.08); overflow: hidden; height: calc(100vh - 150px); min-height: 560px; border: 1px solid rgba(15,23,42,0.06); }
.chat-friend-list { width: 300px; border-right: 1px solid #edf0f5; display: flex; flex-direction: column; flex-shrink: 0; background: linear-gradient(180deg, #fafbff 0%, #f6f8fc 100%); }
.chat-friend-header { padding: 16px 18px; border-bottom: 1px solid #e8edf6; font-weight: 700; font-size: 15px; color: #1f2937; }
.chat-friend-items { flex: 1; overflow-y: auto; }
.chat-friend-item { display: flex; align-items: center; gap: 10px; padding: 12px 18px; cursor: pointer; transition: background 0.12s, transform 0.12s; border-bottom: 1px solid #edf1f7; }
.chat-friend-item:hover { background: #eef3ff; transform: translateX(2px); }
.chat-friend-item.active { background: #e8edff; box-shadow: inset 3px 0 0 #667eea; }
.chat-friend-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg,#667eea,#764ba2); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.chat-friend-info { flex: 1; min-width: 0; }
.chat-friend-name { font-weight: 600; font-size: 14px; color: #111827; }
.chat-friend-status { font-size: 11px; color: #6b7280; }
.chat-conversation { flex: 1; display: flex; flex-direction: column; min-width: 0; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }
.chat-conv-placeholder { flex: 1; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 14px; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%); }
.chat-conv-placeholder div { font-size: 56px; line-height: 1; }
.chat-conv-shell { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.chat-conv-header { padding: 16px 20px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px); gap: 16px; }
.chat-conv-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chat-conv-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #667eea, #764ba2); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex-shrink: 0; }
.chat-conv-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.chat-conv-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.chat-conv-title { font-weight: 700; font-size: 16px; color: #111827; line-height: 1.2; }
.chat-conv-subtitle { font-size: 12px; color: #6b7280; margin-top: 2px; }
.chat-conv-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.chat-emoji-trigger {
  border: 1px solid #d8e0ef;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.chat-emoji-trigger:hover { border-color: #667eea; color: #4f46e5; box-shadow: 0 4px 12px rgba(102,126,234,0.12); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 20px 20px 14px; display: flex; flex-direction: column; gap: 10px; background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%); }
.chat-msgs::-webkit-scrollbar { width: 4px; }
.chat-msgs::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }
.chat-message-row { display: flex; width: 100%; }
.chat-message-row--self { justify-content: flex-end; }
.chat-message-row--other { justify-content: flex-start; }
.chat-message-bubble { max-width: min(72%, 560px); border-radius: 16px; padding: 10px 14px; line-height: 1.55; font-size: 14px; word-break: break-word; white-space: pre-wrap; box-shadow: 0 8px 22px rgba(15,23,42,0.08); }
.chat-message-bubble--self { background: linear-gradient(135deg, #667eea 0%, #4f46e5 100%); color: #fff; border-bottom-right-radius: 6px; }
.chat-message-bubble--other { background: rgba(255,255,255,0.96); color: #111827; border: 1px solid #e5e7eb; border-bottom-left-radius: 6px; }
.chat-message-meta { font-size: 11px; margin-top: 6px; opacity: 0.72; display: flex; justify-content: flex-end; gap: 8px; }
.chat-message-bubble--other .chat-message-meta { justify-content: flex-start; }
.chat-message-empty { text-align: center; color: #94a3b8; padding: 40px 12px; font-size: 13px; }
.chat-composer { border-top: 1px solid #e5e7eb; background: rgba(255,255,255,0.96); padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.chat-composer-hint { font-size: 12px; color: #6b7280; }
.chat-input-box {
  width: 100%;
  min-height: 140px;
  max-height: 260px;
  padding: 14px;
  border: 1px solid #dbe3f2;
  border-radius: 14px;
  font-size: 14px;
  font-family: inherit;
  color: #111827;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  resize: none;
  overflow-y: auto;
  background: #fff;
}
.chat-input-box:focus { border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.12); }
.chat-send-btn { padding: 11px 20px; white-space: nowrap; min-width: 92px; }
.chat-composer-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chat-emoji-trigger--composer { padding: 9px 15px; background: linear-gradient(135deg, rgba(102,126,234,0.12), rgba(118,75,162,0.12)); }
.chat-emoji-panel { margin: 0 16px 2px; border: 1px solid #dbe3f2; border-radius: 14px; background: #fff; box-shadow: 0 12px 28px rgba(15,23,42,0.12); padding: 12px; }
.chat-emoji-panel-header { font-size: 12px; font-weight: 700; color: #334155; margin-bottom: 10px; }
.chat-emoji-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; }
.chat-emoji-btn { border: 1px solid #e5e7eb; background: #f8fafc; border-radius: 10px; padding: 8px 0; font-size: 18px; cursor: pointer; transition: all 0.15s ease; }
.chat-emoji-btn:hover { transform: translateY(-1px); border-color: #667eea; box-shadow: 0 6px 14px rgba(102,126,234,0.12); }

@media (max-width: 768px) {
  .chat-layout { flex-direction: column; height: auto; min-height: 0; }
  .chat-friend-list { width: 100%; }
  .chat-emoji-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .chat-conv-header { padding: 14px; align-items: flex-start; }
  .chat-conv-user { align-items: flex-start; }
  .chat-conv-avatar { width: 38px; height: 38px; font-size: 15px; }
  .chat-conv-title-row { align-items: flex-start; }
  .chat-message-bubble { max-width: 88%; }
  .chat-emoji-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .chat-composer-actions { flex-direction: column; align-items: stretch; }
  .chat-composer-tools { width: 100%; justify-content: space-between; }
  .chat-send-btn { width: 100%; }
}

/* ===== 帖子卡片流（分类 / 热门 / 全部） ===== */
.feed-page { display: flex; flex-direction: column; gap: 18px; }
.feed-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border: 1px solid rgba(102, 126, 234, 0.12);
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}
.feed-hero-main { min-width: 0; }
.feed-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(102, 126, 234, 0.08);
  color: #4f46e5;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 10px;
}
.feed-hero h1 { font-size: 26px; color: #111827; line-height: 1.2; margin-bottom: 8px; }
.feed-hero p { color: #64748b; font-size: 14px; line-height: 1.6; max-width: 720px; }
.feed-hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  flex-shrink: 0;
}
.feed-stat {
  min-width: 120px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid #e5e7eb;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.feed-stat .num { font-size: 22px; font-weight: 800; color: #4f46e5; line-height: 1.1; }
.feed-stat .label { font-size: 12px; color: #64748b; }
.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 4px 0;
}
.feed-toolbar--stack {
  flex-direction: column;
  align-items: stretch;
  padding-top: 4px;
}
.feed-toolbar-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feed-toolbar-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}
.feed-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.feed-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid #dbe3f2;
  color: #334155;
  background: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.feed-tab:hover { border-color: #667eea; color: #4f46e5; box-shadow: 0 8px 18px rgba(102,126,234,0.10); transform: translateY(-1px); }
.feed-tab.is-active { background: linear-gradient(135deg, #667eea 0%, #4f46e5 100%); color: #fff; border-color: transparent; }
.feed-toolbar-note { font-size: 12px; color: #64748b; white-space: nowrap; }
.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
/* ===== 帖子卡片（参考 iiicg.com 干净的分块式：封面在上 + 内容在下）===== */
.feed-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(31, 45, 61, 0.10);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 100%;
}
.feed-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1rem 3rem rgba(31, 45, 61, 0.16);
}
.feed-card-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: #e7e7e7;
  overflow: hidden;
}
.feed-card-cover::after { display: none; }
.feed-card-cover.is-placeholder {
  background-image: linear-gradient(135deg, #eef2ff 0%, #dbeafe 50%, #f1f5f9 100%);
}
.feed-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.55);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(6px);
}
.feed-card-badge--sticky { background: rgba(245, 124, 0, 0.92); }
.feed-card-badge--featured { background: rgba(79, 70, 229, 0.92); }
.feed-card-reward {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}
/* GIF 后台加载中的微光占位 */
.feed-card-cover.is-loading::after,
.home-carousel-card .feed-card-cover.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
  animation: feedCardShimmer 1.3s ease-in-out infinite;
  z-index: 1;
}
@keyframes feedCardShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
html.theme-dark .feed-card-reward { box-shadow: 0 2px 10px rgba(245, 158, 11, 0.5); }
.feed-card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  background: transparent;
  color: #1f2937;
  flex: 1 1 auto;
}
.feed-card-title {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #1f2937;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
  text-shadow: none;
}
.feed-card-excerpt {
  display: none;
}
.feed-card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 12px;
  color: #9ca3af;
  white-space: nowrap;
  text-shadow: none;
}
.feed-card-footer span { white-space: nowrap; }
.feed-card-footer span:last-child { margin-left: auto; }
.feed-card-time { color: #b1b6c1; }
html.theme-dark .feed-card-time { color: #7c869c; }
.feed-card-author { cursor: pointer; transition: color .15s ease; }
.feed-card-author:hover { color: #4f46e5 !important; text-decoration: underline; }
.feed-empty {
  background: #fff;
  border: 1px dashed #dbe3f2;
  border-radius: 18px;
  padding: 60px 20px;
  text-align: center;
  color: #64748b;
}
.feed-empty .icon { font-size: 48px; margin-bottom: 14px; }
.feed-empty p { font-size: 14px; line-height: 1.6; }

@media (max-width: 1024px) {
  .feed-hero { align-items: flex-start; flex-direction: column; }
  .feed-toolbar { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 768px) {
  .feed-page { gap: 14px; }
  .feed-hero { padding: 18px; border-radius: 18px; }
  .feed-hero h1 { font-size: 22px; }
  .feed-hero-stats { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed-toolbar-note { white-space: normal; }
  .feed-grid { grid-template-columns: 1fr; }
  .feed-card-title { -webkit-line-clamp: 2; }
}
/* ========== Shared Components (extracted from inline templates) ========== */

/* Alert boxes - duplicated across 11+ templates */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 20px;
}
.alert-success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
html.theme-dark .alert-success {
  background: rgba(4, 120, 87, 0.12);
  color: #6ee7b7;
  border-color: rgba(4, 120, 87, 0.30);
}
html.theme-dark .alert-error {
  background: rgba(185, 28, 28, 0.12);
  color: #fca5a5;
  border-color: rgba(185, 28, 28, 0.30);
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner-rotate 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: -3px;
}
@keyframes spinner-rotate {
  to { transform: rotate(360deg); }
}

/* ===== 板块图标（图片/emoji 通用） ===== */
.cat-icon { display: inline-block; border-radius: 9px; vertical-align: middle; background: #f1f5f9; }
.cat-icon-emoji { display: inline-block; vertical-align: middle; line-height: 1; }
.feed-tab-main .cat-icon-emoji { font-size: 1.15em; }

/* ===== 黑夜模式：广覆盖（内联浅色 + 各页卡片/容器补全） ===== */
/* 兜底：内联浅色背景 → 深色 */
html.theme-dark [style*="background:#fff"],
html.theme-dark [style*="background: #fff"],
html.theme-dark [style*="background:#ffffff"],
html.theme-dark [style*="background: #ffffff"],
html.theme-dark [style*="background:#f8fafc"],
html.theme-dark [style*="background: #f8fafc"],
html.theme-dark [style*="background:#f5f5f5"],
html.theme-dark [style*="background: #f5f5f5"],
html.theme-dark [style*="background:#fbfcff"],
html.theme-dark [style*="background:#eef2f7"],
html.theme-dark [style*="background:#eef2ff"],
html.theme-dark [style*="background:#f9fafb"],
html.theme-dark [style*="background-color:#fff"],
html.theme-dark [style*="background-color: #fff"],
html.theme-dark [style*="background-color:#f8fafc"] { background-color:#111827 !important; }

/* 兜底：内联深色文字 → 浅色 */
html.theme-dark [style*="color:#333"],
html.theme-dark [style*="color: #333"],
html.theme-dark [style*="color:#111827"],
html.theme-dark [style*="color: #111827"],
html.theme-dark [style*="color:#1f2937"],
html.theme-dark [style*="color:#0f172a"],
html.theme-dark [style*="color:#1e293b"],
html.theme-dark [style*="color:#222"],
html.theme-dark [style*="color:#000"] { color:#e5e7eb !important; }

/* 兜底：内联次要文字 → 中性灰 */
html.theme-dark [style*="color:#666"],
html.theme-dark [style*="color:#777"],
html.theme-dark [style*="color:#888"],
html.theme-dark [style*="color:#999"],
html.theme-dark [style*="color: #999"],
html.theme-dark [style*="color:#6b7280"],
html.theme-dark [style*="color:#64748b"],
html.theme-dark [style*="color: #64748b"],
html.theme-dark [style*="color:#94a3b8"],
html.theme-dark [style*="color:#555"] { color:#9ca3af !important; }

/* 发帖编辑器 */
html.theme-dark .editor-wrapper,
html.theme-dark .editor-header,
html.theme-dark .editor-toolbar,
html.theme-dark .access-preview-card,
html.theme-dark .access-preview-summary,
html.theme-dark .cover-preview,
html.theme-dark .cover-picker-empty,
html.theme-dark .avatar-preview,
html.theme-dark .avatar-box,
html.theme-dark .bio-box,
html.theme-dark .file-upload-area,
html.theme-dark .image-preview-area,
html.theme-dark .code-block,
html.theme-dark .compare-image-box,
html.theme-dark .compare-side-label,
html.theme-dark .draft-notice,
html.theme-dark .form-options { background:#111827 !important; border-color:#243042 !important; color:#e5e7eb !important; }
html.theme-dark .editor-toolbar { background:#0f172a !important; }
html.theme-dark .editor-header h2,
html.theme-dark .form-group label,
html.theme-dark .access-preview-badge,
html.theme-dark .code-block-badge { color:#f1f5f9 !important; }
html.theme-dark .image-preview-actions .btn,
html.theme-dark .code-copy-btn,
html.theme-dark .code-block-tools button { background:#0f172a !important; color:#cbd5e1 !important; border-color:#243042 !important; }
html.theme-dark .char-count,
html.theme-dark .draft-notice { color:#94a3b8 !important; }

/* 公开主页 */
html.theme-dark .public-profile-card,
html.theme-dark .public-info,
html.theme-dark .public-stats { background:#111827 !important; border-color:#243042 !important; }
html.theme-dark .public-info h2,
html.theme-dark .author-name { color:#f1f5f9 !important; }
html.theme-dark .author-meta,
html.theme-dark .public-meta-item span { color:#94a3b8 !important; }
html.theme-dark .badge--vip { background:rgba(245,158,11,0.16) !important; color:#fbbf24 !important; }

/* 兑换页 */
html.theme-dark .redeem-card,
html.theme-dark .redeem-section { background:#111827 !important; border-color:#243042 !important; color:#e5e7eb !important; }
html.theme-dark .redeem-card h2,
html.theme-dark .redeem-section h3 { color:#f1f5f9 !important; }

/* 登录/注册/找回密码/账号恢复 卡片 */
html.theme-dark .login-card,
html.theme-dark .register-card,
html.theme-dark .forgot-card,
html.theme-dark .recovery-card,
html.theme-dark .auth-container > div { background:#111827 !important; border-color:#243042 !important; color:#e5e7eb !important; }
html.theme-dark .login-card h2,
html.theme-dark .register-card h2,
html.theme-dark .forgot-card h2,
html.theme-dark .recovery-card h2 { color:#f1f5f9 !important; }
html.theme-dark .form-group label,
html.theme-dark .step label,
html.theme-dark .email-hint,
html.theme-dark .back-link,
html.theme-dark .foot-links a { color:#cbd5e1 !important; }
html.theme-dark .form-group small,
html.theme-dark .hint-text,
html.theme-dark .step small { color:#94a3b8 !important; }

/* 帮助中心 */
html.theme-dark .help-card,
html.theme-dark .help-hero { background:#111827 !important; border-color:#243042 !important; color:#e5e7eb !important; }
html.theme-dark .help-card-header,
html.theme-dark .help-hero h1 { color:#f1f5f9 !important; }
html.theme-dark .help-card-body,
html.theme-dark .help-tag { color:#cbd5e1 !important; }

/* 我的帖子 / 收藏 */
html.theme-dark .favorites-page,
html.theme-dark .fav-toolbar,
html.theme-dark .fav-stats { background:#111827 !important; border-color:#243042 !important; color:#e5e7eb !important; }
html.theme-dark .fav-search input { background:#0f172a !important; color:#e5e7eb !important; border-color:#243042 !important; }

/* 通用：代码块/分割线/二级标题 */
html.theme-dark .divider { background:#243042 !important; }
html.theme-dark h1, html.theme-dark h2, html.theme-dark h3 { color:#f1f5f9; }

/* 黑夜模式：补全 slate 系文字（#475569/#334155/#374151 等，此前漏抓导致看不清）*/
html.theme-dark [style*="color:#475569"],
html.theme-dark [style*="color: #475569"],
html.theme-dark [style*="color:#334155"],
html.theme-dark [style*="color: #334155"],
html.theme-dark [style*="color:#374151"],
html.theme-dark [style*="color:#1f2937"] { color:#cbd5e1 !important; }
/* 浅色边框转深 */
html.theme-dark [style*="border:1px solid #e2e8f0"],
html.theme-dark [style*="border:1px solid #eef2f7"],
html.theme-dark [style*="border:1px solid #dbe3f2"],
html.theme-dark [style*="border:2px solid #e0e0e0"] { border-color:#243042 !important; }
