/* ==================== CSS 变量（主题系统） ==================== */

:root {
  /* 浅色主题 */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-secondary-rgb: 255, 255, 255;
  --bg-tertiary: #f0f1f3;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-tertiary: #8a8aa0;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --flashlight-color: #1a1a2e;
  --flashlight-glow: rgba(99, 102, 241, 0.15);
  --flashlight-en-bg: #0a0a1a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --border-color: rgba(0, 0, 0, 0.06);
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色主题 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #12122a;
    --bg-secondary-rgb: 18, 18, 42;
    --bg-tertiary: #1a1a3a;
    --text-primary: #f0f0ff;
    --text-secondary: #b0b0d0;
    --text-tertiary: #6060a0;
    --accent-primary: #818cf8;
    --accent-secondary: #a78bfa;
    --accent-glow: rgba(129, 140, 248, 0.4);
    --flashlight-color: #f0f0ff;
    --flashlight-glow: rgba(129, 140, 248, 0.2);
    --flashlight-en-bg: #f8f9fa;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
    --border-color: rgba(255, 255, 255, 0.06);
  }
}

/* 手动深色主题 */
[data-theme="dark"] {
  --bg-primary: #0a0a1a;
  --bg-secondary: #12122a;
  --bg-secondary-rgb: 18, 18, 42;
  --bg-tertiary: #1a1a3a;
  --text-primary: #f0f0ff;
  --text-secondary: #b0b0d0;
  --text-tertiary: #6060a0;
  --accent-primary: #818cf8;
  --accent-secondary: #a78bfa;
  --accent-glow: rgba(129, 140, 248, 0.4);
  --flashlight-color: #f0f0ff;
  --flashlight-glow: rgba(129, 140, 248, 0.2);
  --flashlight-en-bg: #f8f9fa;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --border-color: rgba(255, 255, 255, 0.06);
}

/* 手动浅色主题 */
[data-theme="light"] {
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --bg-secondary-rgb: 255, 255, 255;
  --bg-tertiary: #f0f1f3;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a6a;
  --text-tertiary: #8a8aa0;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --flashlight-color: #1a1a2e;
  --flashlight-glow: rgba(99, 102, 241, 0.15);
  --flashlight-en-bg: #0a0a1a;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --border-color: rgba(0, 0, 0, 0.06);
}

/* ==================== 全局样式 ==================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==================== 顶部导航栏 ==================== */

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  z-index: 100;
  background: var(--bg-secondary);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  font-size: 1.5rem;
  color: var(--accent-primary);
}

.site-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.visit-count {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  border-radius: 1rem;
}

.nav-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s var(--transition);
}

.nav-btn:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
}

/* ==================== 手电筒效果 ==================== */

.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layer-cn {
  background: var(--bg-primary);
  z-index: 2;
}

.layer-en {
  background: var(--flashlight-en-bg);
  z-index: 1;
}

.hero-content {
  text-align: center;
  z-index: 3;
}

.hero-title {
  font-family: -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.layer-en .hero-title {
  color: #ffffff;
}

.layer-en .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

/* 深色模式：英文层（近白底）用黑色文字 */
[data-theme="dark"] .layer-en .hero-title {
  color: #1a1a2e;
}

[data-theme="dark"] .layer-en .hero-subtitle {
  color: #4a4a6a;
}

@media (prefers-color-scheme: dark) {
  .layer-en .hero-title {
    color: #1a1a2e;
  }
  .layer-en .hero-subtitle {
    color: #4a4a6a;
  }
}

/* 手动浅色模式：覆盖系统深色模式的 media query */
[data-theme="light"] .layer-en .hero-title {
  color: #ffffff;
}
[data-theme="light"] .layer-en .hero-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  opacity: 0.8;
}

.layer-cn {
  -webkit-mask-image: radial-gradient(
    circle var(--flashlight-radius, 150px) at var(--mouse-x, 50%) var(--mouse-y, 50%),
    transparent 0%,
    transparent calc(var(--flashlight-radius, 150px) - 10px),
    black var(--flashlight-radius, 150px)
  );
  mask-image: radial-gradient(
    circle var(--flashlight-radius, 150px) at var(--mouse-x, 50%) var(--mouse-y, 50%),
    transparent 0%,
    transparent calc(var(--flashlight-radius, 150px) - 10px),
    black var(--flashlight-radius, 150px)
  );
  transition: --flashlight-radius 0.4s ease;
}

@property --flashlight-radius {
  syntax: '<length>';
  inherits: true;
  initial-value: 150px;
}

@media (max-width: 767px) {
  .hero {
    --flashlight-radius: 0px;
  }
}

.hero.flashlight-off .layer-cn {
  --flashlight-radius: 0px;
}

/* ==================== 泡泡效果 ==================== */

.bubble {
  position: absolute;
  border-radius: 50%;
  background: var(--accent-primary);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  animation: bubble-float var(--duration, 6s) ease-in-out var(--delay, 0s) forwards;
}

.bubble.merging {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.6s ease;
  opacity: 0 !important;
  transform: translate(var(--merge-x, 0), var(--merge-y, 0)) scale(0.2) !important;
}

@keyframes bubble-float {
  0% {
    opacity: 0;
    transform: translateY(0) translateX(0) scale(0.3);
  }
  15% {
    opacity: 0.45;
    transform: translateY(-20px) translateX(var(--drift-x, 10px)) scale(1);
  }
  60% {
    opacity: 0.35;
    transform: translateY(var(--float-y, -100px)) translateX(var(--drift-x2, -15px)) scale(0.8);
  }
  100% {
    opacity: 0;
    transform: translateY(var(--float-y-end, -160px)) translateX(var(--drift-x3, 5px)) scale(0.3);
  }
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  animation: bounce 2s infinite;
  z-index: 3;
}

.layer-en .scroll-hint {
  color: #ffffff;
}

.layer-en .scroll-hint::after {
  border-color: #ffffff;
}

[data-theme="dark"] .layer-en .scroll-hint {
  color: #1a1a2e;
}

[data-theme="dark"] .layer-en .scroll-hint::after {
  border-color: #1a1a2e;
}

@media (prefers-color-scheme: dark) {
  .layer-en .scroll-hint {
    color: #1a1a2e;
  }
  .layer-en .scroll-hint::after {
    border-color: #1a1a2e;
  }
}

[data-theme="light"] .layer-en .scroll-hint {
  color: #ffffff;
}

[data-theme="light"] .layer-en .scroll-hint::after {
  border-color: #ffffff;
}

/* ==================== Hero 区域小部件 ==================== */

.hero-widgets {
  position: absolute;
  top: 80px;
  left: 2rem;
  z-index: 10;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-widgets .widget {
  background: rgba(var(--bg-secondary-rgb, 255, 255, 255), 0.95);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  min-width: 140px;
}

.scroll-hint::after {
  content: '';
  width: 1.5rem;
  height: 1.5rem;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

/* ==================== 主内容区域 ==================== */

.main-content {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

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

.search-section {
  margin-bottom: 2rem;
}

.search-container {
  max-width: 700px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 2px solid var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-box:focus-within {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px var(--accent-glow);
}

.search-engine {
  padding: 0.75rem 1rem;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  border-right: 1px solid var(--border-color);
  min-width: 80px;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1rem;
  outline: none;
}

.search-input::placeholder {
  color: var(--text-tertiary);
}

.search-btn {
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.2s;
}

.search-btn:hover {
  background: var(--accent-secondary);
}

/* ==================== 分类标签栏 ==================== */

.categories-section {
  margin-bottom: 2rem;
}

.categories-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  padding: 1rem 0;
}

.tab-btn {
  padding: 0.5rem 1.25rem;
  border: 2px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.2s var(--transition);
}

.tab-btn:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.tab-btn.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* ==================== 工具卡片网格 ==================== */

.tools-section {
  margin-bottom: 3rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow:
    var(--shadow-lg),
    0 0 20px var(--accent-glow),
    0 0 40px var(--accent-glow);
}

.tool-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  overflow: hidden;
}

.tool-card-icon {
  font-size: 1.5rem;
}

.tool-card-icon .tool-favicon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 4px;
}

.tool-card-icon .tool-emoji {
  font-size: 1.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.tool-card-info {
  flex: 1;
  min-width: 0;
}

.tool-card-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card-desc {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card-fav {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.tool-card-fav:hover,
.tool-card-fav.active {
  color: #ef4444;
}

/* ==================== 小部件 ==================== */

.widgets-section {
  margin-bottom: 3rem;
}

.widgets-container {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
}

.widget {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 200px;
}

.widget-icon {
  font-size: 2rem;
}

.widget-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.time-display {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.date-display {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.weather-temp {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.weather-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.weather-location {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ==================== 收藏和最近使用 ==================== */

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  border-left: 3px solid var(--accent-primary);
}

.favorites-section,
.recent-section {
  margin-bottom: 2rem;
}

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

/* ==================== 工具详情抽屉 ==================== */

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
}

.drawer-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 400px;
  height: 100vh;
  background: var(--bg-secondary);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s var(--transition);
  z-index: 1000;
  overflow-y: auto;
  will-change: transform;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}

.drawer-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.drawer-close {
  width: 2rem;
  height: 2rem;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.drawer-close:hover {
  background: var(--accent-primary);
  color: white;
}

.drawer-body {
  padding: 2rem 1.5rem;
  text-align: center;
}

.drawer-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drawer-icon {
  font-size: 3rem;
}

.drawer-icon .tool-favicon {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
}

.drawer-icon .tool-emoji {
  font-size: 3rem;
}

.drawer-name {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.drawer-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.drawer-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.8rem;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.drawer-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.drawer-link {
  display: block;
  padding: 0.75rem 1.5rem;
  background: var(--accent-primary);
  color: white;
  text-decoration: none;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: background 0.2s;
}

.drawer-link:hover {
  background: var(--accent-secondary);
}

.drawer-favorite {
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-favorite:hover {
  border-color: #ef4444;
  color: #ef4444;
}

.drawer-favorite.active {
  border-color: #ef4444;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ==================== 弹窗 ==================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal {
  background: var(--bg-secondary);
  border-radius: 1.5rem;
  width: 90%;
  max-width: 400px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 2rem;
  height: 2rem;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 1.5rem;
}

.auth-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.auth-tab {
  flex: 1;
  padding: 0.5rem;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.auth-tab.active {
  background: var(--accent-primary);
  color: white;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.75rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus {
  border-color: var(--accent-primary);
}

.auth-submit {
  width: 100%;
  padding: 0.75rem;
  background: var(--accent-primary);
  color: white;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.auth-submit:hover {
  background: var(--accent-secondary);
}

/* ==================== Toast 提示 ==================== */

.toast-container {
  position: fixed;
  top: 80px;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 3000;
}

.toast {
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  animation: slideIn 0.3s var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toast.success { border-left: 3px solid #22c55e; }
.toast.error { border-left: 3px solid #ef4444; }
.toast.info { border-left: 3px solid var(--accent-primary); }

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

@media (max-width: 1200px) {
  .hero-title {
    font-size: 3rem;
  }
}

@media (max-width: 900px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .drawer {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .hero-widgets {
    left: 1rem;
    gap: 0.5rem;
  }

  .hero-widgets .widget {
    min-width: 0;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .hero-widgets .widget-icon {
    font-size: 1.25rem;
  }

  .hero-widgets .time-display,
  .hero-widgets .weather-temp {
    font-size: 1rem;
  }

  .hero-widgets .weather-desc,
  .hero-widgets .weather-location,
  .hero-widgets .date-display {
    font-size: 0.7rem;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .top-nav {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .search-box {
    flex-direction: column;
    border-radius: 0.75rem;
  }

  .search-engine {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }

  .search-btn {
    width: 100%;
  }

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

  .widgets-container {
    flex-direction: column;
  }

  .widget {
    width: 100%;
  }
}

/* ==================== 备案号 Footer ==================== */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.site-footer a {
  color: var(--text-tertiary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--text-secondary);
}
