/* ============================================
   RH 博客 — 全局背景样式
   ============================================ */

/* ============================================
   RH 博客 — 全局背景样式
   ============================================ */

/* --- 背景：温暖橘色渐变 + 朦胧光晕 --- */
body {
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(217,119,6,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 100% 0%, rgba(184,134,11,0.06) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 80% 85%, rgba(192,86,33,0.05) 0%, transparent 50%),
    radial-gradient(ellipse 35% 35% at 20% 80%, rgba(217,119,6,0.04) 0%, transparent 45%),
    linear-gradient(160deg, #f3ece4 0%, #efe6db 20%, #f5eee3 40%, #f8f3ea 65%, #f2efe6 100%) !important;
  background-attachment: fixed !important;
  position: relative;
}

/* --- 纸质纹理遮罩，降低亮度、增加质感 --- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* --- 浮动光晕动画（更大更明显） --- */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  filter: blur(90px);
  opacity: 0.45;
  animation: auroraFloat 14s ease-in-out infinite alternate;
}

body::before {
  width: 600px; height: 600px;
  top: -180px; left: -120px;
  background: radial-gradient(circle, rgba(251,146,60,0.12) 0%, rgba(251,191,36,0.06) 40%, transparent 70%);
}

body::after {
  width: 500px; height: 500px;
  bottom: -120px; right: -100px;
  background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, rgba(251,146,60,0.05) 40%, transparent 70%);
  animation-delay: -5s;
  animation-duration: 16s;
}

@keyframes auroraFloat {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(35px, -25px) scale(1.1); }
  66%  { transform: translate(-25px, 15px) scale(0.95); }
  100% { transform: translate(15px, -10px) scale(1.05); }
}

/* --- 中心环境光 --- */
.bg-glow {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(100px); opacity: 0.2; animation: glowPulse 8s ease-in-out infinite alternate;
  width: 500px; height: 500px; top: 40%; left: 35%;
  background: radial-gradient(circle, rgba(139,92,246,0.06) 0%, transparent 60%);
}

@keyframes glowPulse {
  0%   { opacity: 0.15; transform: scale(0.9); }
  100% { opacity: 0.30; transform: scale(1.15); }
}

/* --- 装饰星点（闪烁） --- */
.deco-dot {
  position: fixed; border-radius: 50%; pointer-events: none; z-index: 0;
}

.deco-dot-1 {
  width: 8px; height: 8px; top: 12%; left: 8%;
  background: rgba(251,146,60,0.08);
  box-shadow: 0 0 12px rgba(251,146,60,0.06);
  animation: twinkle 3.5s ease-in-out infinite;
}

.deco-dot-2 {
  width: 6px; height: 6px; top: 28%; left: 90%;
  background: rgba(251,191,36,0.07);
  box-shadow: 0 0 10px rgba(251,191,36,0.05);
  animation: twinkle 4.5s ease-in-out infinite 0.8s;
}

.deco-dot-3 {
  width: 10px; height: 10px; top: 55%; left: 4%;
  background: rgba(249,115,22,0.07);
  box-shadow: 0 0 14px rgba(249,115,22,0.05);
  animation: twinkle 4s ease-in-out infinite 1.5s;
}

.deco-dot-4 {
  width: 7px; height: 7px; top: 75%; left: 80%;
  background: rgba(251,146,60,0.06);
  box-shadow: 0 0 10px rgba(251,146,60,0.04);
  animation: twinkle 5s ease-in-out infinite 0.3s;
}

.deco-dot-5 {
  width: 5px; height: 5px; top: 45%; left: 50%;
  background: rgba(251,191,36,0.06);
  box-shadow: 0 0 8px rgba(251,191,36,0.04);
  animation: twinkle 3.8s ease-in-out infinite 2s;
}

.deco-dot-6 {
  width: 9px; height: 9px; top: 18%; left: 55%;
  background: rgba(249,115,22,0.06);
  box-shadow: 0 0 12px rgba(249,115,22,0.04);
  animation: twinkle 4.2s ease-in-out infinite 1s;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1.3); }
}

/* --- 暖色亮色调导航卡片 (基础，由 index.php 主题覆盖) --- */
.nav {
  background: rgba(255, 252, 248, 0.82) !important;
  backdrop-filter: blur(20px) saturate(1.3) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.3) !important;
  border-bottom: 1px solid rgba(184, 134, 11, 0.15) !important;
}

.card,
.article-card,
.profile-header,
.member-card {
  background: rgba(255, 250, 242, 0.78) !important;
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(184, 134, 11, 0.12) !important;
  box-shadow:
    0 1px 3px rgba(140, 90, 30, 0.04),
    0 4px 16px rgba(140, 90, 30, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.02);
  color: inherit !important;
}

.footer {
  background: rgba(255, 250, 242, 0.65) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(184, 134, 11, 0.12) !important;
  color: inherit !important;
}

/* 卡片悬浮 */
.article-card:hover,
.card:hover {
  background: rgba(255, 253, 247, 0.92) !important;
  box-shadow:
    0 2px 8px rgba(0,0,0,0.03),
    0 8px 24px rgba(184, 134, 11, 0.12),
    0 16px 48px rgba(140, 90, 30, 0.06) !important;
  border-color: rgba(184, 134, 11, 0.28) !important;
}

/* admin 侧边栏和头部 */
.admin-sidebar {
  background: rgba(15, 10, 26, 0.92) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.admin-header {
  background: rgba(248, 246, 255, 0.8) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 223, 216, 0.4) !important;
}

/* ============================================
   主题切换 — 全局样式
   ============================================ */

/* 主题切换按钮（通用） */
.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-dim);
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: rotate(15deg);
}

/* 平滑过渡 */
body, .nav, .article-card, .sb-card, .card, .hero-banner,
.ac-body, .ac-footer, .pinned, input, select, textarea,
.pag-btn, .al-item, .btn-sm, .btn-ghost, .btn-fill,
.hero-orb, .sb-cover-card, .footer, .author-card,
.article-content, .sidebar-widget, .rec-item,
.article-stats, .article-nav a, .admin-header, .admin-content .card {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
}

/* ============================================
   夜间模式 — 覆盖页面公共样式
   ============================================ */
[data-theme="dark"] .nav {
  background: rgba(15,14,18,0.92) !important;
  border-bottom-color: #2D2A35 !important;
}
[data-theme="dark"] body {
  background:
    radial-gradient(ellipse 60% 50% at 0% 0%, rgba(217,119,6,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 50% 45% at 100% 0%, rgba(184,134,11,0.04) 0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 80% 85%, rgba(192,86,33,0.03) 0%, transparent 50%),
    radial-gradient(ellipse 35% 35% at 20% 80%, rgba(217,119,6,0.02) 0%, transparent 45%),
    linear-gradient(160deg, #121016 0%, #16131a 25%, #131016 50%, #18141c 75%, #141118 100%) !important;
}
[data-theme="dark"] .carousel-dot {
  background: rgba(255,255,255,0.3);
}
[data-theme="dark"] .carousel-dot.active {
  background: #B8860B;
}
[data-theme="dark"] .theme-toggle {
  background: rgba(26,24,32,0.5);
  border-color: #2D2A35;
  color: #B0ACBB;
}
[data-theme="dark"] .theme-toggle:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* ============================================
   夜间模式 — 后台管理页面
   ============================================ */
[data-theme="dark"] .admin-header {
  background: rgba(26,24,32,0.92) !important;
  border-bottom-color: #2D2A35 !important;
}
[data-theme="dark"] .admin-content .card {
  background: #1A1820 !important;
  border-color: #2D2A35 !important;
}
[data-theme="dark"] .admin-content .stat-card {
  background: #1A1820 !important;
  border-color: #2D2A35 !important;
}
[data-theme="dark"] .admin-content table th {
  background: rgba(26,24,32,0.8) !important;
  border-color: #2D2A35 !important;
  color: #B0ACBB !important;
}
[data-theme="dark"] .admin-content table td {
  border-color: #2D2A35 !important;
  color: #E8E6ED !important;
}
[data-theme="dark"] .admin-content tr:hover td {
  background: rgba(255,255,255,0.02) !important;
}
[data-theme="dark"] .admin-content .form-input,
[data-theme="dark"] .admin-content .form-select,
[data-theme="dark"] .admin-content .form-textarea {
  background: #1A1820 !important;
  border-color: #2D2A35 !important;
  color: #E8E6ED !important;
}
[data-theme="dark"] .admin-content .btn-secondary {
  background: rgba(255,255,255,0.05) !important;
  border-color: #2D2A35 !important;
  color: #B0ACBB !important;
}
[data-theme="dark"] .admin-content .tag-pub {
  background: rgba(184,134,11,0.15) !important;
}
[data-theme="dark"] .admin-content .tag-draft {
  background: rgba(217,119,6,0.12) !important;
}
[data-theme="dark"] .admin-content .deco-dot-1 {
  background: radial-gradient(circle,rgba(184,134,11,0.08),transparent 70%) !important;
}
[data-theme="dark"] .admin-content .deco-dot-2 {
  background: radial-gradient(circle,rgba(217,119,6,0.06),transparent 70%) !important;
}
[data-theme="dark"] .admin-content .deco-dot-3 {
  background: radial-gradient(circle,rgba(192,86,33,0.04),transparent 70%) !important;
}
[data-theme="dark"] .mobile-menu-btn span {
  background: #B0ACBB !important;
}
