* {
  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: #120000;
  --glass-bg: rgba(60, 10, 10, 0.45);
  --glass-border: rgba(255, 215, 0, 0.25);
  --text-primary: #fff5e6;
  --text-secondary: rgba(255, 220, 180, 0.8);
  --text-muted: rgba(255, 200, 150, 0.5);
  --accent-red: #e60012;
  --accent-gold: #ffd700;
  --accent-glow: rgba(255, 215, 0, 0.3);
  --gold-line: linear-gradient(135deg, #f3d060, #ffecb3, #d4af37, #f3d060);
}

body {
  /* 暗色模式背景：暗红底色 + 红色极光 */
  background: radial-gradient(circle at 20% 20%, #3a0000, 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.6;
  pointer-events: none;
  transition: all 0.5s;
}

/* 灯笼光晕 */
body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(230, 0, 18, 0.6) 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(212, 175, 55, 0.4) 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.5; }
  100% { transform: translate(80px, 60px) scale(1.2); opacity: 0.7; }
}

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

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

.star {
  position: absolute;
  background: #fffde7; /* 星光偏暖 */
  border-radius: 50%;
  animation: twinkle 3s infinite;
  will-change: transform, opacity;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; box-shadow: 0 0 2px #ffd700; }
  50% { opacity: 0.9; box-shadow: 0 0 8px #ffd700, 0 0 12px #e60012; }
}

#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(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border-radius: 32px; 
  padding: 32px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9),
              inset 0 0 0 1px rgba(255, 215, 0, 0.2),
              inset 0 0 40px rgba(230, 0, 18, 0.15);
  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, 1),
              inset 0 0 0 1px rgba(255, 215, 0, 0.5),
              inset 0 0 60px rgba(230, 0, 18, 0.25);
  border-color: rgba(255, 215, 0, 0.4);
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 36px;
  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, #ffd700, #ff8c00, #e60012);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-left: -8px;
  text-shadow: 0 0 20px rgba(230,0,18,0.3);
}

.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(40, 5, 5, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 20px; 
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transition: all 0.3s;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: 64px;
}

.weather-widget:hover, .time-widget:hover {
  border-color: rgba(255, 215, 0, 0.6);
  background: rgba(60, 10, 10, 0.8);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.2);
}

.weather-widget { padding: 0 24px 0 20px; gap: 12px; min-width: 180px; }
.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, 215, 0, 0.6)); }
.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: #ffd700; 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; }

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

.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, 215, 0, 0.1); border-top-color: var(--accent-gold); 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, 5, 5, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 215, 0, 0.1);
  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: #ffd700; 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: #e60012; }

.widget-input-group { display: flex; gap: 8px; }
.widget-input-group input {
  flex: 1;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 8px 12px;
  color: #ffd700;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.widget-input-group input:focus { border-color: var(--accent-gold); box-shadow: 0 0 8px rgba(255,215,0,0.2); }
.widget-input-group button {
  background: linear-gradient(135deg, #e60012, #b30000);
  border: 1px solid #ffd700;
  border-radius: 10px;
  padding: 0 14px;
  color: #ffd700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.widget-input-group button:hover { background: linear-gradient(135deg, #ff1a1a, #e60012); box-shadow: 0 0 10px rgba(230,0,18,0.5); }

.preset-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.preset-item {
  background: rgba(255, 215, 0, 0.05);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.8rem;
  color: rgba(255, 220, 180, 0.9);
  cursor: pointer;
  transition: all 0.2s;
}
.preset-item:hover { background: rgba(230, 0, 18, 0.3); border-color: #ffd700; color: #fff; }

/* ========== 搜索区域 ========== */
.search-section { margin-bottom: 40px; position: relative; z-index: 100; }
.search-box {
  display: flex;
  align-items: center;
  background: rgba(20, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 215, 0, 0.2);
  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.8);
  gap: 2px;
  position: relative;
}
.search-box:hover, .search-box:focus-within {
  border-color: rgba(255, 215, 0, 0.8);
  background: rgba(40, 5, 5, 0.9);
  box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.2), 0 0 30px rgba(255, 215, 0, 0.15);
}

.engine-selector { position: relative; flex-shrink: 0; z-index: 500; }
.engine-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(230, 0, 18, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 60px;
  padding: 10px 14px;
  color: #ffd700;
  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(230, 0, 18, 0.4); border-color: #ffd700; color: #fff; text-shadow: 0 0 5px #ffd700; }
.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, 5, 5, 0.98);
  backdrop-filter: blur(25px) saturate(200%);
  -webkit-backdrop-filter: blur(25px) saturate(200%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 16px;
  padding: 6px;
  min-width: 168px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(255, 215, 0, 0.1);
  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); }
.engine-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #ffd700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
}
.engine-option:hover { background: rgba(230, 0, 18, 0.4); color: #fff; }
.engine-option.active { background: rgba(230, 0, 18, 0.6); border-color: rgba(255, 215, 0, 0.5); color: #fff; font-weight: 500; box-shadow: 0 0 10px rgba(230,0,18,0.3); }
.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: rgba(255, 215, 0, 0.4); transition: color 0.3s; }
.search-box:hover input::placeholder, .search-box:focus-within input::placeholder { color: rgba(255, 215, 0, 0.7); }

.search-box button.search-btn {
  background: linear-gradient(135deg, #e60012, #b30000);
  border: 1px solid #ffd700;
  border-radius: 60px;
  padding: 12px 22px;
  color: #ffd700;
  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(230, 0, 18, 0.6);
  flex-shrink: 0;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.search-box button.search-btn:hover {
  background: linear-gradient(135deg, #ff1a1a, #e60012);
  box-shadow: 0 6px 20px -4px rgba(255, 215, 0, 0.4);
  color: #fff;
}
.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(25, 0, 0, 0.95);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  border-radius: 24px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 1), inset 0 0 0 1px rgba(255, 215, 0, 0.1);
  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 { width: 50%; padding: 20px; border-right: 1px solid rgba(255, 215, 0, 0.15); display: flex; flex-direction: column; }
.panel-right { width: 50%; padding: 20px; display: flex; flex-direction: column; background: rgba(0, 0, 0, 0.2); }
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 4px; }
.panel-header h3 { font-size: 0.85rem; font-weight: 600; color: #ffd700; letter-spacing: 0.5px; display: flex; align-items: center; gap: 6px; }
.panel-header .action-link { font-size: 0.75rem; color: rgba(255, 215, 0, 0.6); 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(230, 0, 18, 0.5); }

.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, 215, 0, 0.08);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 8px;
  padding: 6px 10px;
  color: rgba(255, 220, 180, 0.9);
  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(230, 0, 18, 0.5); border-color: #ffd700; 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: #ffd700; }
.empty-history { color: rgba(255, 215, 0, 0.4); 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 6px; border-radius: 8px; cursor: pointer; transition: background 0.15s; text-decoration: none; color: inherit; }
.news-item:hover { background: rgba(255, 215, 0, 0.1); }
.news-item .news-index { font-size: 0.85rem; font-weight: 700; color: rgba(255, 215, 0, 0.6); min-width: 16px; text-align: right; margin-top: 1px; }
.news-item:nth-child(1) .news-index, .news-item:nth-child(2) .news-index, .news-item:nth-child(3) .news-index { color: #ff3b30; font-weight: 700; text-shadow: 0 0 8px rgba(255,59,48,0.5); }
.news-item .news-content { flex: 1; min-width: 0; }
.news-item .news-title { font-size: 0.85rem; color: rgba(255, 235, 205, 0.9); line-height: 1.4; transition: color 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-item:hover .news-title { color: #ffd700; }

.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, 215, 0, 0.3); border-radius: 10px; }
.history-list::-webkit-scrollbar-thumb:hover, .news-list::-webkit-scrollbar-thumb:hover { background: rgba(255, 215, 0, 0.6); }

/* ========== 导航卡片 ========== */
.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, 0, 0, 0.5);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 215, 0, 0.15);
  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.8);
}
.nav-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 215, 0, 0.5);
  background: rgba(50, 5, 5, 0.7);
  box-shadow: 0 20px 40px -14px rgba(230, 0, 18, 0.4), inset 0 0 0 1px rgba(255, 215, 0, 0.3);
}
.card-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; color: #ffd700; font-weight: 700; font-size: 1.05rem; letter-spacing: 0.5px; text-shadow: 0 0 10px rgba(255, 215, 0, 0.3); }
.card-title i { font-size: 1.3rem; line-height: 1; font-style: normal; filter: drop-shadow(0 0 8px rgba(230, 0, 18, 0.6)); }
.links-list { display: flex; flex-direction: column; gap: 10px; }
.link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 230, 200, 0.8);
  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(230, 0, 18, 0.3); color: #fff; padding-left: 14px; border-color: rgba(255, 215, 0, 0.4); }
.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(230, 0, 18, 0.4); padding: 2px 8px; border-radius: 20px; color: #ffd700; border: 1px solid rgba(255, 215, 0, 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, 215, 0, 0.1); 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, 0, 0, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 215, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.9rem;
  box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.8);
  transition: border-color 0.2s, background 0.2s;
  line-height: 1;
}
.circle-item:active .circle-icon { border-color: #ffd700; background: rgba(230, 0, 18, 0.4); }
.circle-text { font-size: 0.8rem; font-weight: 500; color: rgba(255, 220, 180, 0.9); text-align: center; letter-spacing: 0.5px; white-space: nowrap; }

/* ========== Toast ========== */
.toast {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: rgba(230, 0, 18, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #ffd700;
  border-radius: 12px;
  padding: 12px 24px;
  color: #ffd700;
  font-size: 0.9rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  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; }

/* 响应式 */
@media (max-width: 900px) {
  .header-right { gap: 12px; }
  .weather-widget { padding: 0 16px; height: 54px; min-width: 150px; justify-content: center; gap: 6px; }
  .weather-icon-box { width: 30px; height: 30px; font-size: 1.6rem; }
  .weather-temp { font-size: 1.1rem; }
  .weather-sub { font-size: 0.65rem; }
  .weather-info-box { align-items: center; text-align: center; }
  .time-widget { padding: 0 20px; height: 54px; min-width: 130px; }
  .time-main { font-size: 1.2rem; }
  .time-sub { font-size: 0.65rem; }
  .engine-trigger { padding: 8px 12px; font-size: 0.85rem; }
}

@media (max-width: 700px) {
  body { padding: 12px; }
  .dashboard { padding: 22px; border-radius: 24px; }
  .header { display: none; }
  .greeting h1 { font-size: 1.5rem; }
  .nav-grid { display: none; }
  .mobile-circle-grid { display: grid; }
  .search-box button.search-btn { padding: 12px 16px; font-size: 0.85rem; }
  .engine-selector { display: none; }
  .search-box { background: rgba(20, 0, 0, 0.7); padding: 0 4px 0 4px; border-radius: 60px; }
  .search-box input { padding: 14px 14px; }
  .search-dropdown-panel { flex-direction: column; border-radius: 20px; }
  .panel-left, .panel-right { width: 100%; border-right: none; }
  .panel-left { border-bottom: 1px solid rgba(255, 215, 0, 0.15); }
  .search-box:hover, .weather-widget:hover, .time-widget:hover { border-color: rgba(255, 215, 0, 0.2); background: rgba(20, 0, 0, 0.7); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.8); }
  .search-box:focus-within { border-color: rgba(255, 215, 0, 0.8); background: rgba(40, 5, 5, 0.9); box-shadow: 0 0 0 4px rgba(230, 0, 18, 0.2), 0 0 30px rgba(255, 215, 0, 0.15); }
  .widget-tooltip { display: none !important; }
}

@media (max-width: 480px) {
  .dashboard { padding: 16px; border-radius: 18px; }
  .search-box { flex-wrap: nowrap; }
  .search-box input { background: transparent; border: none; }
  .search-box button.search-btn { width: auto; padding: 12px 18px; }
  .mobile-circle-grid { gap: 20px 16px; }
  .circle-icon { width: 60px; height: 60px; font-size: 1.7rem; }
  .circle-text { font-size: 0.75rem; }
  .search-dropdown-panel { max-height: 480px; }
}

::selection { background: #e60012; color: #ffd700; }
.link-item:focus-visible { outline: 2px solid #ffd700; outline-offset: 2px; }

.theme-toggle-btn {
  background: rgba(230, 0, 18, 0.3);
  border: 1px solid #ffd700;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffd700;
  font-size: 14px;
  margin-left: 0;
  vertical-align: middle;
  transition: all 0.2s;
  outline: none;
}
.theme-toggle-btn:hover { background: rgba(230, 0, 18, 0.8); transform: scale(1.1); box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }

/* 底部页脚 */
.footer-content { display: inline-flex; align-items: center; gap: 12px; padding: 6px 18px; border-radius: 30px; color: #ffd700; background: transparent; border: none; transition: all 0.3s ease; }
.footer-text { font-size: 13px; letter-spacing: 0.5px; line-height: 1; text-shadow: 0 1px 4px rgba(230, 0, 18, 0.5); }

/* ========== 悬停提示框 (Tooltip) ========== */
.tooltip-wrapper { position: relative; display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; }
.tooltip-wrapper::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: #e60012;
  color: #ffd700;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ffd700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
}
.tooltip-wrapper::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #e60012 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 100;
}
.tooltip-wrapper:hover::before, .tooltip-wrapper:hover::after { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.widget-tooltip { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; }
.widget-tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  background-color: #e60012;
  color: #ffd700;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #ffd700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.widget-tooltip::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: #e60012 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.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; visibility: visible; transform: translateX(-50%) translateY(0); }

/* ==========================================================
   浅色模式基础定义（10%黑遮罩）
   ========================================================== */
body.light-theme {
  --bg-dark: #fffbf0;
  --glass-bg: rgba(255, 250, 240, 0.85);
  --glass-border: rgba(230, 0, 18, 0.15);
  --text-primary: #1f2328;
  --text-secondary: rgba(60, 60, 60, 0.85);
  --text-muted: rgba(100, 100, 100, 0.7);
  --accent-red: #cc0000;
  --accent-gold: #b8860b;
  
  background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), url('bg1.webp') no-repeat center center / cover;
  background-attachment: fixed;
}
body.light-theme::before { background: radial-gradient(circle, rgba(255, 180, 180, 0.4) 0%, transparent 70%); opacity: 0.8; }
body.light-theme::after { background: radial-gradient(circle, rgba(255, 230, 150, 0.3) 0%, transparent 70%); opacity: 0.6; z-index: -1; }

/* 文字颜色修正 */
body.light-theme .weather-temp, body.light-theme .time-main { color: #111; text-shadow: none; }
body.light-theme .weather-sub, body.light-theme .time-sub, body.light-theme .greeting p { color: #333; font-weight: 500; }
body.light-theme .card-title { color: #b30000; text-shadow: none; font-weight: 800; }
body.light-theme .link-item { color: #2c3038; }
body.light-theme .link-item:hover { background: rgba(230, 0, 18, 0.08); color: #cc0000; border-color: rgba(230, 0, 18, 0.2); }
body.light-theme .circle-text { color: #2c3038; font-weight: 600; }

/* 强烈突出右侧小标签 */
body.light-theme .link-item .link-tag { 
  background: #ff4d4f;
  color: #ffffff;
  border: 1px solid #ff4d4f; 
  font-weight: 700; 
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  box-shadow: 0 2px 4px rgba(255, 77, 79, 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.15),
              inset 0 1px 0 rgba(255, 255, 255, 1),
              inset 0 0 40px rgba(230, 0, 18, 0.05);
}
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.08);
}
body.light-theme .search-box {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(230, 0, 18, 0.15);
  box-shadow: 0 8px 32px -8px rgba(0, 0, 0, 0.1);
}
body.light-theme .engine-trigger {
  background: rgba(255, 255, 255, 1);
  color: #cc0000;
  border-color: rgba(230, 0, 18, 0.2);
}
body.light-theme .engine-trigger:hover { background: #fff; border-color: #cc0000; }
body.light-theme .search-box input { color: #1f2328; font-weight: 500; }
body.light-theme .search-box input::placeholder { color: #888; }

/* 下拉菜单 */
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(230, 0, 18, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.2);
}
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(230, 0, 18, 0.3);
  box-shadow: 0 20px 40px -14px rgba(230, 0, 18, 0.1);
}

/* 下拉细节 */
body.light-theme .engine-option { color: #333; }
body.light-theme .engine-option:hover { background: rgba(230, 0, 18, 0.08); }
body.light-theme .engine-option.active { background: rgba(230, 0, 18, 0.1); border-color: rgba(230, 0, 18, 0.3); color: #b30000; font-weight: 600;}
body.light-theme .panel-header h3 { color: #b30000; 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(230, 0, 18, 0.1); color: #b30000; border-color: #cc0000;}
body.light-theme .news-item .news-title { color: #333; font-weight: 500; }
body.light-theme .news-item:hover { background: rgba(230, 0, 18, 0.05); }
body.light-theme .news-item:hover .news-title { color: #cc0000; }
body.light-theme .news-item .news-index { color: #cc0000; font-weight: 700; }

body.light-theme .widget-panel-header { color: #b30000; font-weight: 700; }
body.light-theme .widget-input-group input { background: #f8fafc; border-color: rgba(230, 0, 18, 0.2); color: #333; }
body.light-theme .widget-input-group input:focus { border-color: #cc0000; box-shadow: 0 0 8px rgba(230,0,18,0.1); }
body.light-theme .widget-input-group button { background: #cc0000; color: #fff; border: none; }
body.light-theme .widget-input-group button:hover { background: #e60012; }
body.light-theme .preset-item { background: #f1f5f9; border-color: rgba(0,0,0,0.1); color: #333; }
body.light-theme .preset-item:hover { background: rgba(230, 0, 18, 0.1); border-color: #cc0000; color: #b30000; }
body.light-theme .panel-right { background: transparent; }
body.light-theme .panel-left { border-right: 1px solid rgba(230, 0, 18, 0.1); }

/* 主题按钮与页脚 */
body.light-theme .theme-toggle-btn { background: rgba(255, 255, 255, 0.9); border-color: rgba(230, 0, 18, 0.3); color: #cc0000; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
body.light-theme .theme-toggle-btn:hover { background: #fff; border-color: #cc0000; box-shadow: 0 0 10px rgba(230, 0, 18, 0.2); }
body.light-theme .tooltip-wrapper::before, body.light-theme .widget-tooltip::before { background-color: #fff; color: #cc0000; border-color: #cc0000; box-shadow: 0 4px 12px rgba(0,0,0,0.15);}
body.light-theme .tooltip-wrapper::after, body.light-theme .widget-tooltip::after { border-color: #cc0000 transparent transparent transparent; }
body.light-theme .links-list .link-item:not(:last-child)::after { background: rgba(0, 0, 0, 0.08); }

/* ==========================================================
   浅色模式专项修复与优化（文字清晰度与视觉精简）
   ========================================================== */

/* 1. 页脚文字：去除加粗，保持纯白，并优化阴影 */
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 3px rgba(0, 0, 0, 0.8) !important; 
}
body.light-theme #themeToggle {
  font-weight: 400 !important;
}

/* 2. 修复操作按钮（清空历史、刷新）文字过浅 */
body.light-theme .panel-header .action-link {
  color: #cc0000 !important; 
  font-weight: 500;
}
body.light-theme .panel-header .action-link:hover {
  color: #ffffff !important; 
  background: #cc0000 !important; 
}

/* 3. 修复历史标签与右侧热搜列表文字发灰，加深对比度 */
body.light-theme .history-tag {
  color: #1a202c !important; 
  border-color: #cbd5e1 !important;
}
body.light-theme .news-item .news-title {
  color: #1a202c !important;
}
body.light-theme .news-item:hover .news-title {
  color: #cc0000 !important;
}

/* 4. 统一并优化浅色模式的滚动条（消除刺眼的黄色线条） */
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.15) !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.3) !important;
}

/* 5. 强化输入框文字和背景 */
body.light-theme .widget-input-group input,
body.light-theme .search-box input {
  color: #111827 !important; 
  font-weight: 500;
}
body.light-theme .widget-input-group input::placeholder {
  color: #6b7280 !important;
}

/* 6. 优化右上角下拉面板的文字 */
body.light-theme .widget-panel-header span {
  color: #1f2937;
  font-weight: 600;
}
body.light-theme .preset-item {
  color: #374151 !important;
  font-weight: 500;
}

/* 7. 修复面板间分割线，使其更柔和 */
body.light-theme .search-dropdown-panel {
  border-color: rgba(0, 0, 0, 0.08) !important;
}
body.light-theme .panel-left {
  border-right-color: rgba(0, 0, 0, 0.08) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

/* 8. 修复浅色模式下“暂无搜索历史”提示文字看不清的问题 */
body.light-theme .empty-history {
  color: rgba(0, 0, 0, 0.4) !important;
}