* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --bg-dark: #0f172a;
  --glass-bg: rgba(30, 41, 59, 0.45);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: rgba(203, 213, 225, 0.8);
  --text-muted: rgba(148, 163, 184, 0.5);
  --accent-blue: #3b82f6;
  --accent-light: #93c5fd;
  --accent-glow: rgba(59, 130, 246, 0.3);
}

body {
  background: radial-gradient(circle at 20% 20%, #1e293b, var(--bg-dark) 70%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.4s, color 0.4s;
}

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  opacity: 0.5;
  pointer-events: none;
  transition: all 0.5s;
}

body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation: float1 18s infinite alternate ease-in-out;
}

body::after {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35) 0%, transparent 70%);
  bottom: -250px;
  right: -200px;
  animation: float2 22s infinite alternate ease-in-out;
}

@keyframes float1 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.4; }
  100% { transform: translate(80px, 60px) scale(1.2); opacity: 0.6; }
}

@keyframes float2 {
  0% { transform: translate(0, 0) scale(1); opacity: 0.3; }
  100% { transform: translate(-100px, -80px) scale(1.3); opacity: 0.5; }
}

.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.star {
  position: absolute;
  background: #e2e8f0;
  border-radius: 50%;
  animation: twinkle 3s infinite;
  will-change: transform, opacity;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.1; box-shadow: 0 0 2px #94a3b8; }
  50% { opacity: 0.8; box-shadow: 0 0 8px #cbd5e1; }
}

#meteorCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease;
}

body:not(.light-theme) #meteorCanvas {
  opacity: 1;
}

.dashboard {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  border-radius: 32px; 
  padding: 32px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5),
              inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  transition: box-shadow 0.4s, border-color 0.3s, background 0.4s;
}

.dashboard:hover {
  box-shadow: 0 35px 70px -18px rgba(0, 0, 0, 0.6),
              inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 26px;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
  z-index: 200;
}

.greeting h1 {
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 0;
  line-height: 1.3;
}

.greeting h1 span {
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: -8px;
}

.greeting p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-top: 6px;
  font-weight: 400;
  line-height: 1.4;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* ========== 天气/时间卡片 ========== */
.weather-widget, .time-widget {
  position: relative;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center; 
  height: 64px;
  flex: 1; 
  min-width: 0; 
  padding: 0 25px; 
}

.weather-widget:hover, .time-widget:hover {
  border-color: rgba(147, 197, 253, 0.4);
  background: rgba(30, 41, 59, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(59, 130, 246, 0.15);
}

.weather-widget { gap: 8px; }
.weather-icon-box { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; font-size: 2rem; line-height: 1; filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3)); }
.weather-info-box { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; text-align: right; }
.weather-temp { font-size: 1.3rem; font-weight: 700; color: #e2e8f0; line-height: 1.2; letter-spacing: 0.5px; }
.weather-sub { font-size: 0.75rem; color: var(--text-secondary); display: flex; align-items: center; justify-content: flex-end; gap: 4px; white-space: nowrap; margin-top: 2px; }
.weather-sub::before { content: '📍'; font-size: 0.75rem; opacity: 0.8; }

.time-widget { flex-direction: column; justify-content: center; align-items: center; }
.time-main { font-size: 1.5rem; font-weight: 700; color: #e2e8f0; line-height: 1.1; letter-spacing: 1px; font-variant-numeric: tabular-nums; text-align: right; width: 100%; }
.time-sub { font-size: 0.75rem; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; text-align: right; width: 100%; }

.loading-box { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--text-secondary); font-size: 0.85rem; width: 100%; height: 100%; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.1); border-top-color: #93c5fd; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.widget-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.6);
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  width: 280px;
}
.widget-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }
.widget-panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 0.85rem; color: #93c5fd; font-weight: 500; }
.widget-panel-header .close-btn { cursor: pointer; opacity: 0.5; transition: opacity 0.2s; }
.widget-panel-header .close-btn:hover { opacity: 1; color: #fff; }

.widget-input-group { display: flex; gap: 8px; }
.widget-input-group input { flex: 1; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 8px 12px; color: #f8fafc; font-size: 0.85rem; outline: none; transition: border-color 0.2s; }
.widget-input-group input:focus { border-color: #93c5fd; box-shadow: 0 0 8px rgba(147, 197, 253, 0.2); }
.widget-input-group button { background: linear-gradient(135deg, #3b82f6, #2563eb); border: none; border-radius: 10px; padding: 0 14px; color: #fff; font-size: 0.85rem; cursor: pointer; transition: background 0.2s; white-space: nowrap; }
.widget-input-group button:hover { background: linear-gradient(135deg, #60a5fa, #3b82f6); }

.preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preset-item { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 6px 12px; font-size: 0.8rem; color: var(--text-secondary); cursor: pointer; transition: all 0.2s; }
.preset-item:hover { background: rgba(59, 130, 246, 0.2); border-color: #93c5fd; color: #fff; }

.search-section { margin-bottom: 30px; position: relative; z-index: 100; }
.search-box { display: flex; align-items: center; background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 60px; padding: 4px 4px 4px 6px; transition: border-color 0.3s, box-shadow 0.3s, background 0.3s; box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5); gap: 2px; position: relative; }
.search-box:hover, .search-box:focus-within { border-color: rgba(147, 197, 253, 0.6); background: rgba(30, 41, 59, 0.9); box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 0 30px rgba(59, 130, 246, 0.1); }

.engine-selector { position: relative; flex-shrink: 0; z-index: 500; }
.engine-trigger { display: flex; align-items: center; gap: 8px; background: rgba(59, 130, 246, 0.15); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 60px; padding: 10px 14px; color: #93c5fd; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: background 0.2s, border-color 0.2s; white-space: nowrap; user-select: none; margin-left: 4px; }
.engine-trigger:hover { background: rgba(59, 130, 246, 0.3); border-color: #93c5fd; color: #fff; }
.engine-trigger .engine-icon { font-size: 1.1rem; line-height: 1; }
.engine-trigger .arrow { font-size: 0.7rem; opacity: 0.8; margin-left: 2px; transition: transform 0.2s; }
.engine-selector.open .engine-trigger .arrow { transform: rotate(180deg); }

.engine-dropdown { position: absolute; top: calc(100% + 8px); left: 0; background: rgba(30, 41, 59, 0.98); backdrop-filter: blur(25px) saturate(200%); -webkit-backdrop-filter: blur(25px) saturate(200%); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; padding: 6px; min-width: 168px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; z-index: 1; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.engine-selector.open .engine-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* ===== 桌面端（>700px）：鼠标悬停展开搜索引擎下拉 ===== */
@media (min-width: 701px) {
  /* 1. 调整下拉框位置：下移 15px （原 8px + 15px = 23px） */
  .engine-selector .engine-dropdown {
    top: calc(100% + 23px);
  }

  /* 2. 隐形桥接层：间隙变大，桥接层也要加高，防止鼠标移向选项时 hover 断链闪烁 */
  .engine-selector::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 28px; /* 盖住 23px 的间隙 */
    z-index: 0;
    pointer-events: auto;
  }

  /* 悬停时箭头旋转 */
  .engine-selector:hover .engine-trigger .arrow {
    transform: rotate(180deg);
  }

  /* 悬停时展开下拉 */
  .engine-selector:hover .engine-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.engine-option { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; color: var(--text-secondary); font-size: 0.9rem; cursor: pointer; transition: background 0.15s, color 0.15s; border: 1px solid transparent; }
.engine-option:hover { background: rgba(59, 130, 246, 0.2); color: #fff; }
.engine-option.active { background: rgba(59, 130, 246, 0.3); border-color: rgba(147, 197, 253, 0.3); color: #fff; font-weight: 500; }
.engine-option .engine-icon { font-size: 1.1rem; line-height: 1; width: 22px; text-align: center; }

.search-input-wrapper { flex: 1; position: relative; display: flex; align-items: center; min-width: 0; z-index: 2; }
.search-box input { flex: 1; background: transparent; border: none; outline: none; color: #fff; font-size: 1rem; padding: 14px 8px; font-weight: 400; min-width: 0; width: 100%; }
.search-box input::placeholder { color: var(--text-muted); transition: color 0.3s; }
.search-box:hover input::placeholder, .search-box:focus-within input::placeholder { color: var(--text-secondary); }

.search-box button.search-btn { background: linear-gradient(135deg, #3b82f6, #2563eb); border: none; border-radius: 60px; padding: 12px 22px; color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: background 0.2s, transform 0.1s, box-shadow 0.2s; display: flex; align-items: center; gap: 8px; box-shadow: 0 4px 16px -4px rgba(59, 130, 246, 0.4); flex-shrink: 0; z-index: 1; }
.search-box button.search-btn:hover { background: linear-gradient(135deg, #60a5fa, #3b82f6); box-shadow: 0 6px 20px -4px rgba(59, 130, 246, 0.6); }
.search-box button.search-btn:active { transform: scale(0.97); }

.search-dropdown-panel { position: absolute; top: calc(100% + 10px); left: 0; right: 0; background: rgba(30, 41, 59, 0.95); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.8); z-index: 1500; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.25s, transform 0.25s, visibility 0.25s; display: flex; overflow: hidden; }
.search-dropdown-panel.open { opacity: 1; visibility: visible; transform: translateY(0); }

.panel-left, .panel-right, .panel-extra { flex: 1; min-width: 0; padding: 20px; display: flex; flex-direction: column; }
.panel-left { border-right: 1px solid rgba(255, 255, 255, 0.05); }
.panel-right { background: rgba(0, 0, 0, 0.1); border-right: 1px solid rgba(255, 255, 255, 0.05); }
.panel-extra { background: rgba(0, 0, 0, 0.05); }

.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 10px; }
.panel-header h3 { font-size: 0.85rem; font-weight: 600; color: #93c5fd; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }
.panel-header .action-link { font-size: 0.75rem; color: var(--text-muted); cursor: pointer; transition: color 0.2s; background: none; border: none; padding: 2px 8px; border-radius: 20px; font-weight: 400; }
.panel-header .action-link:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }

.history-list { display: flex; flex-wrap: wrap; gap: 10px; align-content: flex-start; overflow-y: auto; max-height: 260px; }
.history-tag { display: inline-flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 8px; padding: 6px 10px; color: var(--text-secondary); font-size: 0.8rem; cursor: pointer; transition: background 0.2s, color 0.2s; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-tag:hover { background: rgba(59, 130, 246, 0.2); border-color: #93c5fd; color: #fff; }
.history-tag .remove-history { font-size: 0.75rem; opacity: 0.6; margin-left: 2px; transition: opacity 0.2s, color 0.2s; line-height: 1; }
.history-tag .remove-history:hover { opacity: 1; color: #fff; }
.empty-history { color: var(--text-muted); font-size: 0.85rem; padding: 8px 4px; font-style: italic; }

.news-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; max-height: 236px; padding-right: 4px; }
.news-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background 0.15s; text-decoration: none; color: inherit; }
.news-item:hover { background: rgba(255, 255, 255, 0.05); }

/* ====== 热搜与往事排名数字颜色优化（红橙黄） ====== */
.news-item .news-index { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); min-width: 16px; text-align: left; margin-top: 1px; }
.news-item:nth-child(1) .news-index { color: #ef4444; font-weight: 800; } /* 1 红色 */
.news-item:nth-child(2) .news-index { color: #f97316; font-weight: 800; } /* 2 橙色 */
.news-item:nth-child(3) .news-index { color: #eab308; font-weight: 800; } /* 3 黄色 */

.news-item .news-content { flex: 1; min-width: 0; }
.news-item .news-title { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.4; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-item:hover .news-title { color: #fff; }

/* 右侧"今朝往事"的年份统一改为更协调的柔和色，固定最小宽度防止缺失时塌陷 */
.news-item .news-index.year { 
  min-width: 42px; 
  text-align: left; 
  font-variant-numeric: tabular-nums; 
  color: var(--text-secondary); 
  font-weight: 700; 
  display: inline-block;
}
.news-item .news-index.year:empty::before {
  content: '----'; /* 当接口没给年份时，显示占位符防止布局错乱 */
  opacity: 0.5;
}
/* 今朝往事前三名的年份也应用红橙黄 */
.news-item:nth-child(1) .news-index.year { color: #ef4444; }
.news-item:nth-child(2) .news-index.year { color: #f97316; }
.news-item:nth-child(3) .news-index.year { color: #eab308; }
/* ========================================================= */

.history-list::-webkit-scrollbar, .news-list::-webkit-scrollbar { width: 4px; }
.history-list::-webkit-scrollbar-track, .news-list::-webkit-scrollbar-track { background: transparent; }
.history-list::-webkit-scrollbar-thumb, .news-list::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }
.history-list::-webkit-scrollbar-thumb:hover, .news-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.2); }

.nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin-top: 12px; position: relative; z-index: 10; }
.nav-card { background: rgba(30, 41, 59, 0.5); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 20px; padding: 22px 20px; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s, background 0.25s; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5); }
.nav-card:hover { transform: translateY(-5px); border-color: rgba(255, 255, 255, 0.2); background: rgba(30, 41, 59, 0.8); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.6); }
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: #f8fafc; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.5px; }
.card-title i { font-size: 1.3rem; line-height: 1; font-style: normal; }
.links-list { display: flex; flex-direction: column; gap: 10px; }
.link-item { display: flex; align-items: center; gap: 10px; color: var(--text-secondary); text-decoration: none; font-size: 0.95rem; padding: 8px 10px; border-radius: 10px; transition: background 0.2s, color 0.2s, padding-left 0.2s, border-color 0.2s; background: transparent; border: 1px solid transparent; position: relative; }
.link-item:hover { background: rgba(59, 130, 246, 0.15); color: #fff; padding-left: 14px; border-color: rgba(59, 130, 246, 0.3); }
.link-item .link-icon { font-size: 1.1rem; opacity: 0.9; width: 24px; text-align: center; }
.link-item .link-text { font-weight: 400; }
.link-item .link-tag { margin-left: auto; font-size: 0.65rem; background: rgba(59, 130, 246, 0.2); padding: 2px 8px; border-radius: 20px; color: #93c5fd; border: 1px solid rgba(147, 197, 253, 0.2); white-space: nowrap; }
.links-list .link-item:not(:last-child)::after { content: ''; position: absolute; bottom: 0; left: 12px; right: 12px; height: 1px; background: rgba(255, 255, 255, 0.05); pointer-events: none; }

.mobile-circle-grid { display: none; grid-template-columns: repeat(2, 1fr); gap: 24px 20px; margin-top: 24px; position: relative; z-index: 10; }
.circle-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-decoration: none; transition: transform 0.2s; }
.circle-item:active { transform: scale(0.95); }
.circle-icon { width: 68px; height: 68px; border-radius: 50%; background: rgba(30, 41, 59, 0.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, 0.1); display: flex; align-items: center; justify-content: center; font-size: 1.9rem; box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5); transition: border-color 0.2s, background 0.2s; line-height: 1; }
.circle-item:active .circle-icon { border-color: #93c5fd; background: rgba(59, 130, 246, 0.2); }
.circle-text { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); text-align: center; letter-spacing: 0.5px; white-space: nowrap; }

/* ========== 深色模式弹窗优化 ========== */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(30, 41, 59, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-radius: 14px;
  padding: 12px 24px;
  color: #e2e8f0;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), inset 0 0 15px rgba(59, 130, 246, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-icon { font-size: 1.2rem; }

/* ========== 修复页脚排版（强制水平居中） ========== */
.footer-content { 
  display: inline-flex !important; 
  flex-direction: row !important; 
  align-items: center !important; 
  justify-content: center !important; 
  gap: 12px !important; 
  padding: 6px 18px; 
  border-radius: 30px; 
  color: var(--text-secondary); 
  background: transparent; 
  border: none; 
  transition: all 0.3s ease; 
}
.footer-text { font-size: 13px; letter-spacing: 0.5px; line-height: 1.2; }

/* ========== 还原最开始的主题切换按钮样式并融入整体色调 ========== */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #e2e8f0;
  font-size: 14px;
  margin-left: 0;
  vertical-align: middle;
  transition: all 0.2s;
  outline: none;
}
.theme-toggle-btn:hover { 
  background: rgba(59, 130, 246, 0.2); 
  transform: scale(1.1); 
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4); 
  border-color: #93c5fd;
}
/* ========================================================= */

/* =========================================================
   悬停提示框（Tooltip）及尖角描边修复
   ========================================================= */
.tooltip-wrapper { 
  position: relative !important; 
  display: inline-flex !important; 
  align-items: center !important; 
  justify-content: center !important; 
  vertical-align: middle !important; 
}

.tooltip-wrapper::before, .widget-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: rgba(30, 41, 59, 0.95);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 9999 !important;
}

/* 完美尖角带描边 */
.tooltip-wrapper::after, .widget-tooltip::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(5px) rotate(45deg);
  width: 8px;
  height: 8px;
  background-color: rgba(30, 41, 59, 0.95); 
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 9998 !important;
}

.tooltip-wrapper:hover::before, .tooltip-wrapper:hover::after,
.weather-widget:hover .widget-tooltip::before, .weather-widget:hover .widget-tooltip::after, 
.time-widget:hover .widget-tooltip::before, .time-widget:hover .widget-tooltip::after { 
  opacity: 1 !important; 
  visibility: visible !important; 
  transform: translateX(-50%) translateY(0) !important; 
}

.tooltip-wrapper:hover::after,
.weather-widget:hover .widget-tooltip::after, 
.time-widget:hover .widget-tooltip::after {
  transform: translateX(-50%) translateY(0) rotate(45deg) !important;
}

.widget-tooltip { 
  position: absolute !important; 
  top: 0; 
  left: 0; 
  width: 100%; 
  height: 100%; 
  pointer-events: none; 
  z-index: 100; 
}
/* ========================================================= */

/* ========== 浅色模式 ========== */
body.light-theme {
  --bg-dark: #f8fafc;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(0, 0, 0, 0.05);
  --text-primary: #0f172a;
  --text-secondary: rgba(71, 85, 105, 0.85);
  --text-muted: rgba(148, 163, 184, 0.8);
  
  background: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05)), url('bg1.webp') no-repeat center center / cover;
  background-attachment: fixed;
}
body.light-theme::before { background: radial-gradient(circle, rgba(147, 197, 253, 0.3) 0%, transparent 70%); opacity: 0.6; }
body.light-theme::after { background: radial-gradient(circle, rgba(196, 181, 253, 0.2) 0%, transparent 70%); opacity: 0.4; z-index: -1; }

body.light-theme .weather-temp, body.light-theme .time-main { color: #1e293b; text-shadow: none; }
body.light-theme .weather-sub, body.light-theme .time-sub, body.light-theme .greeting p { color: #475569; font-weight: 500; }
body.light-theme .card-title { color: #1e293b; text-shadow: none; font-weight: 800; }
body.light-theme .link-item { color: #334155; }
body.light-theme .link-item:hover { background: rgba(59, 130, 246, 0.08); color: #2563eb; border-color: rgba(59, 130, 246, 0.2); }
body.light-theme .circle-text { color: #334155; font-weight: 600; }

body.light-theme .link-item .link-tag { 
  background: #3b82f6;
  color: #ffffff;
  border: 1px solid #3b82f6; 
  font-weight: 700; 
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

body.light-theme .dashboard {
  background: rgba(255, 255, 255, 0.85); 
  backdrop-filter: blur(25px) saturate(180%); 
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.1);
}
body.light-theme .weather-widget, 
body.light-theme .time-widget,
body.light-theme .nav-card,
body.light-theme .mobile-circle-grid .circle-icon {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 1);
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.05);
}

/* 浅色模式搜索框悬停/聚焦明显反馈 */
body.light-theme .search-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.08);
}
body.light-theme .search-box:hover, 
body.light-theme .search-box:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 12px 32px -8px rgba(0, 0, 0, 0.12);
}

body.light-theme .engine-trigger {
  background: rgba(255, 255, 255, 1);
  color: #2563eb;
  border-color: rgba(0, 0, 0, 0.05);
}
body.light-theme .engine-trigger:hover { background: #fff; border-color: #3b82f6; }
body.light-theme .search-box input { color: #0f172a; font-weight: 500; }
body.light-theme .search-box input::placeholder { color: #94a3b8; }

body.light-theme .engine-dropdown,
body.light-theme .widget-panel,
body.light-theme .search-dropdown-panel {
  background: rgba(255, 255, 255, 0.98) !important;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}
body.light-theme .nav-card:hover,
body.light-theme .weather-widget:hover, 
body.light-theme .time-widget:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(59, 130, 246, 0.2);
  box-shadow: 0 20px 40px -14px rgba(0, 0, 0, 0.1);
}

body.light-theme .engine-option { color: #333; }
body.light-theme .engine-option:hover { background: rgba(59, 130, 246, 0.08); }
body.light-theme .engine-option.active { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.3); color: #2563eb; font-weight: 600;}
body.light-theme .panel-header h3 { color: #1e293b; text-shadow: none; font-weight: 700; }
body.light-theme .history-tag { background: #fff; color: #333; border-color: rgba(0,0,0,0.1); font-weight: 500;}
body.light-theme .history-tag:hover { background: rgba(59, 130, 246, 0.1); color: #2563eb; border-color: #3b82f6;}
body.light-theme .news-item .news-title { color: #333; font-weight: 500; }
body.light-theme .news-item:hover { background: rgba(59, 130, 246, 0.05); }
body.light-theme .news-item:hover .news-title { color: #2563eb; }

/* 浅色模式下的热搜数字颜色加深 */
body.light-theme .news-item:nth-child(1) .news-index { color: #dc2626; }
body.light-theme .news-item:nth-child(2) .news-index { color: #ea580c; }
body.light-theme .news-item:nth-child(3) .news-index { color: #ca8a04; }
body.light-theme .news-item .news-index.year { color: #64748b; }
body.light-theme .news-item:nth-child(1) .news-index.year { color: #dc2626; }
body.light-theme .news-item:nth-child(2) .news-index.year { color: #ea580c; }
body.light-theme .news-item:nth-child(3) .news-index.year { color: #ca8a04; }

body.light-theme .widget-panel-header { color: #1e293b; font-weight: 700; }
body.light-theme .widget-input-group input { background: #f8fafc; border-color: rgba(0, 0, 0, 0.1); color: #333; }
body.light-theme .widget-input-group input:focus { border-color: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.1); }
body.light-theme .widget-input-group button { background: #3b82f6; color: #fff; border: none; }
body.light-theme .widget-input-group button:hover { background: #2563eb; }
body.light-theme .preset-item { background: #f1f5f9; border-color: rgba(0,0,0,0.05); color: #333; }
body.light-theme .preset-item:hover { background: rgba(59, 130, 246, 0.1); border-color: #3b82f6; color: #2563eb; }

body.light-theme .panel-right,
body.light-theme .panel-extra { background: transparent; }
body.light-theme .panel-left,
body.light-theme .panel-right { border-right: 1px solid rgba(0, 0, 0, 0.05); }
body.light-theme .panel-extra { border-right: none; }

/* 浅色模式下的主题切换按钮调整 */
body.light-theme .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.9); 
  border-color: rgba(0, 0, 0, 0.1); 
  color: #1e293b; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.05); 
}
body.light-theme .theme-toggle-btn:hover { 
  background: #fff; 
  border-color: #3b82f6; 
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2); 
  color: #3b82f6; 
}

/* 浅色模式 Tooltip 适配（加重描边与尖角） */
body.light-theme .tooltip-wrapper::before, body.light-theme .widget-tooltip::before { 
  background-color: #fff; 
  color: #1e293b; 
  border: 1px solid rgba(0, 0, 0, 0.2); 
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
body.light-theme .tooltip-wrapper::after, body.light-theme .widget-tooltip::after { 
  background-color: #fff;
  border-right: 1px solid rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  border-top-color: transparent;
  border-left-color: transparent;
}
body.light-theme .links-list .link-item:not(:last-child)::after { background: rgba(0, 0, 0, 0.05); }

/* ========== 浅色模式底部文字修复 ========== */
body.light-theme .footer-content { font-weight: 400 !important; }
body.light-theme .footer-text { 
  font-weight: 400 !important; 
  color: #ffffff !important; 
  letter-spacing: 0.5px; 
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 0, 0, 0.3) !important; 
}

body:not(.light-theme) .footer-text {
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

body.light-theme .panel-header .action-link { color: #64748b !important; font-weight: 500; }
body.light-theme .panel-header .action-link:hover { color: #ffffff !important; background: #3b82f6 !important; }

body.light-theme .history-tag { color: #1e293b !important; border-color: #e2e8f0 !important; }
body.light-theme .news-item .news-title { color: #1e293b !important; }
body.light-theme .news-item:hover .news-title { color: #3b82f6 !important; }

body.light-theme .news-list::-webkit-scrollbar-thumb,
body.light-theme .history-list::-webkit-scrollbar-thumb,
body.light-theme .engine-dropdown::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1) !important; 
}
body.light-theme .news-list::-webkit-scrollbar-thumb:hover,
body.light-theme .history-list::-webkit-scrollbar-thumb:hover,
body.light-theme .engine-dropdown::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.2) !important;
}

body.light-theme .widget-input-group input,
body.light-theme .search-box input { color: #0f172a !important; font-weight: 500; }
body.light-theme .widget-input-group input::placeholder { color: #94a3b8 !important; }

body.light-theme .widget-panel-header span { color: #1e293b; font-weight: 600; }
body.light-theme .preset-item { color: #475569 !important; font-weight: 500; }

body.light-theme .search-dropdown-panel { border-color: rgba(0, 0, 0, 0.05) !important; }
body.light-theme .panel-left,
body.light-theme .panel-right {
  border-right-color: rgba(0, 0, 0, 0.05) !important;
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}
body.light-theme .panel-extra {
  border-right-color: rgba(0, 0, 0, 0.05) !important;
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .empty-history { color: rgba(0, 0, 0, 0.3) !important; }

/* 浅色模式下的 Toast 适配 */
body.light-theme .toast {
  background: #ffffff;
  border-color: #3b82f6;
  color: #3b82f6;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 0 15px rgba(59, 130, 246, 0.15);
}
/* =========================================================
   浅色模式 · 柔和液态玻璃 & 右上角引导收藏
   仅桌面端 >700px 生效，背景图保持不变
   ========================================================= */
@media (min-width: 701px) {

  body.light-theme {
    --lg-blur: blur(28px) saturate(185%) brightness(1.06);
    --lg-inner:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      inset 0 -1px 0 rgba(255, 255, 255, 0.35),
      inset 1px 0 0 rgba(255, 255, 255, 0.55),
      inset -1px 0 0 rgba(255, 255, 255, 0.55);
    --lg-sheen: radial-gradient(120% 130% at 0% 0%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 58%);
  }

  /* ---------- 主面板 ---------- */
  body.light-theme .dashboard {
    background:
      var(--lg-sheen),
      linear-gradient(155deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.42) 45%, rgba(255, 255, 255, 0.60) 100%);
    backdrop-filter: var(--lg-blur);
    -webkit-backdrop-filter: var(--lg-blur);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: 36px;
    box-shadow:
      var(--lg-inner),
      0 44px 90px -44px rgba(15, 23, 42, 0.35),
      0 14px 34px -22px rgba(15, 23, 42, 0.18);
  }
  body.light-theme .dashboard:hover {
    border-color: #ffffff;
    box-shadow:
      var(--lg-inner),
      0 50px 100px -46px rgba(15, 23, 42, 0.40),
      0 16px 40px -24px rgba(15, 23, 42, 0.20);
  }

  /* ---------- 搜索框 ---------- */
  body.light-theme .search-box {
    background:
      var(--lg-sheen),
      linear-gradient(160deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.50));
    backdrop-filter: blur(24px) saturate(185%) brightness(1.06);
    -webkit-backdrop-filter: blur(24px) saturate(185%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--lg-inner), 0 20px 44px -26px rgba(15, 23, 42, 0.30);
  }
  body.light-theme .search-box:hover,
  body.light-theme .search-box:focus-within {
    background:
      var(--lg-sheen),
      linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.68));
    border-color: #ffffff;
    box-shadow:
      var(--lg-inner),
      0 0 0 4px rgba(255, 255, 255, 0.50),
      0 24px 50px -26px rgba(15, 23, 42, 0.32),
      0 0 42px rgba(147, 197, 253, 0.35);
  }
  body.light-theme .search-box button.search-btn {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.45),
      0 8px 20px -8px rgba(59, 130, 246, 0.55);
  }

  /* ---------- 搜索引擎触发器（保持不动，纯色纯白） ---------- */
  body.light-theme .engine-trigger {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    color: #2563eb !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body.light-theme .engine-trigger:hover {
    background: #ffffff !important;
    border-color: #3b82f6 !important;
    color: #1d4ed8 !important;
  }

  /* ---------- 搜索引擎下拉框（恢复纯白，彻底剥离玻璃效果） ---------- */
  body.light-theme .engine-dropdown {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15) !important;
  }

  /* ---------- 其他浮层面板（侧栏搜索/天气等，保留高不透明度玻璃） ---------- */
  body.light-theme .widget-panel,
  body.light-theme .search-dropdown-panel {
    background:
      var(--lg-sheen),
      linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)) !important;
    backdrop-filter: blur(36px) saturate(190%) brightness(1.06) !important;
    -webkit-backdrop-filter: blur(36px) saturate(190%) brightness(1.06) !important;
    border: 1px solid rgba(255, 255, 255, 1) !important;
    box-shadow:
      var(--lg-inner),
      0 40px 80px -34px rgba(15, 23, 42, 0.32),
      0 12px 30px -18px rgba(15, 23, 42, 0.16) !important;
  }
  body.light-theme .widget-panel { border-radius: 18px !important; }
  body.light-theme .search-dropdown-panel { border-radius: 26px !important; }

  /* ---------- 天气 / 时间胶囊 ---------- */
  body.light-theme .weather-widget,
  body.light-theme .time-widget {
    background:
      var(--lg-sheen),
      linear-gradient(160deg, rgba(255, 255, 255, 0.74), rgba(255, 255, 255, 0.46));
    backdrop-filter: blur(26px) saturate(185%) brightness(1.06);
    -webkit-backdrop-filter: blur(26px) saturate(185%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--lg-inner), 0 18px 36px -24px rgba(15, 23, 42, 0.26);
  }
  body.light-theme .weather-widget:hover,
  body.light-theme .time-widget:hover {
    background:
      var(--lg-sheen),
      linear-gradient(160deg, rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.66));
    border-color: #ffffff;
    box-shadow:
      var(--lg-inner),
      0 24px 46px -24px rgba(15, 23, 42, 0.30),
      0 0 30px rgba(147, 197, 253, 0.30);
  }

  /* ---------- 导航卡片 ---------- */
  body.light-theme .nav-card {
    background:
      var(--lg-sheen),
      linear-gradient(165deg, rgba(255, 255, 255, 0.74) 0%, rgba(255, 255, 255, 0.44) 50%, rgba(255, 255, 255, 0.60) 100%);
    backdrop-filter: blur(26px) saturate(185%) brightness(1.06);
    -webkit-backdrop-filter: blur(26px) saturate(185%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: 24px;
    box-shadow: var(--lg-inner), 0 22px 46px -28px rgba(15, 23, 42, 0.26);
  }
  body.light-theme .nav-card:hover {
    background:
      var(--lg-sheen),
      linear-gradient(165deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.64) 50%, rgba(255, 255, 255, 0.78) 100%);
    border-color: #ffffff;
    box-shadow:
      var(--lg-inner),
      0 34px 66px -30px rgba(15, 23, 42, 0.32),
      0 0 36px rgba(147, 197, 253, 0.32);
  }

  /* ---------- 链接条目 / 标签（标签纯白底色） ---------- */
  body.light-theme .link-item:hover {
    background: rgba(59, 130, 246, 0.08) !important;
    border-color: transparent !important;
    color: #2563eb !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  body.light-theme .link-item .link-tag {
    background: #ffffff !important;
    color: #2563eb !important;
    border: 1px solid rgba(59, 130, 246, 0.3) !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-weight: 600 !important;
    backdrop-filter: none !important;
  }

  /* ---------- 历史标签 / 预设城市 / 时区 ---------- */
  body.light-theme .history-tag,
  body.light-theme .preset-item {
    background: rgba(255, 255, 255, 0.62) !important;
    border: 1px solid rgba(255, 255, 255, 0.95) !important;
    color: #334155 !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      0 6px 14px -10px rgba(15, 23, 42, 0.25);
  }
  body.light-theme .history-tag:hover,
  body.light-theme .preset-item:hover {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: #ffffff !important;
    color: #2563eb !important;
  }

  /* ---------- 引擎选项 ---------- */
  body.light-theme .engine-option { color: #475569; }
  body.light-theme .engine-option:hover {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
  }
  body.light-theme .engine-option.active {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
    box-shadow: none;
  }

  /* ---------- 新闻 / 往事条目 ---------- */
  body.light-theme .news-item:hover {
    background: rgba(255, 255, 255, 0.65);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.90);
  }

  /* ---------- 面板内输入框 ---------- */
  body.light-theme .widget-input-group input {
    background: rgba(255, 255, 255, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.95);
    color: #0f172a;
    box-shadow: inset 0 1px 0 #ffffff;
  }
  body.light-theme .widget-input-group input:focus {
    background: #ffffff;
    border-color: rgba(147, 197, 253, 0.90);
    box-shadow:
      inset 0 1px 0 #ffffff,
      0 0 0 3px rgba(147, 197, 253, 0.25);
  }

  /* ---------- 主题按钮 / Toast ---------- */
  body.light-theme .theme-toggle-btn {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.95);
    color: #2563eb;
    box-shadow:
      inset 0 1px 0 #ffffff,
      0 8px 18px -12px rgba(15, 23, 42, 0.30);
  }
  body.light-theme .theme-toggle-btn:hover {
    background: #ffffff;
    border-color: #ffffff;
    box-shadow:
      inset 0 1px 0 #ffffff,
      0 0 16px rgba(147, 197, 253, 0.60);
  }
  body.light-theme .toast {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(28px) saturate(185%) brightness(1.06);
    -webkit-backdrop-filter: blur(28px) saturate(185%) brightness(1.06);
    border: 1px solid rgba(255, 255, 255, 0.95);
    color: #1e293b;
    box-shadow: var(--lg-inner), 0 26px 52px -24px rgba(15, 23, 42, 0.30);
  }
}

/* =========================================================
   桌面端右上角引导收藏按钮（全局，包含深浅色适配）
   ========================================================= */
.bookmark-guide-wrapper {
  display: none;
}

@media (min-width: 701px) {
  .bookmark-guide-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 1000;
    padding: 8px 16px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease, 
                background 0.3s ease, 
                border-color 0.3s ease;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.15);
  }

  .bookmark-icon {
    font-size: 1.1rem;
    line-height: 1;
    color: var(--accent-light);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s;
  }

  .bookmark-guide-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -12px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-blue);
  }
  .bookmark-guide-wrapper:hover .bookmark-icon {
    transform: rotate(72deg) scale(1.15);
    color: var(--accent-blue);
  }

  /* 深色模式微调 */
  body:not(.light-theme) .bookmark-guide-wrapper:hover {
    background: rgba(30, 41, 59, 0.8);
    color: #fff;
  }
  body:not(.light-theme) .bookmark-guide-wrapper .bookmark-icon {
    color: #fbbf24;
  }
  body:not(.light-theme) .bookmark-guide-wrapper:hover .bookmark-icon {
    color: #fcd34d;
  }

  /* 浅色模式微调 */
  body.light-theme .bookmark-guide-wrapper {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.06);
    color: #334155;
  }
  body.light-theme .bookmark-guide-wrapper .bookmark-icon {
    color: #94a3b8;
  }
  body.light-theme .bookmark-guide-wrapper:hover {
    background: #ffffff;
    border-color: #3b82f6;
    color: #2563eb;
    box-shadow: 0 16px 32px -12px rgba(59, 130, 246, 0.2);
  }
  body.light-theme .bookmark-guide-wrapper:hover .bookmark-icon {
    color: #3b82f6;
  }
}