:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f7fa;
  --bg-card: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  --accent: #3b82f6;
  --accent-light: #eff6ff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
}

[data-theme="dark"] {
  --bg-primary: #111111;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --border: #2e2e2e;
  --accent: #60a5fa;
  --accent-light: #1e3a5f;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.4);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* SVG 图标 */
.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

/* 滚动淡入 */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.05s; }
.delay-2 { transition-delay: 0.1s; }
.delay-3 { transition-delay: 0.15s; }
.delay-4 { transition-delay: 0.2s; }
.delay-5 { transition-delay: 0.25s; }
.delay-6 { transition-delay: 0.3s; }

/* 域名提示 */
.domain-tip {
  background: var(--accent);
  color: white;
  padding: 10px 0;
  font-size: 14px;
}

.domain-tip .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.domain-link {
  color: white;
  font-weight: 600;
}

.close-btn {
  position: absolute;
  right: 20px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 导航栏 */
.nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}

.logo .icon {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.theme-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

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

/* Hero */
.hero {
  text-align: center;
  padding: 60px 0 50px;
}

.hero-title {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero-title .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.search-box {
  max-width: 460px;
  margin: 0 auto;
  position: relative;
}

.search-box .icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
}

.search-box input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  font-size: 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* 分类卡片 */
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-left: 4px;
}

.section-title .icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 50px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.category-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.category-card .icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  margin-bottom: 14px;
}

.category-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.category-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* 工具卡片 */
.tools-section {
  margin-bottom: 50px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  text-decoration: none;
  transition: all 0.25s ease;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.tool-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tool-card .icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.tool-info h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tool-info p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* 页脚 */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
}

.footer p + p {
  margin-top: 6px;
}

/* 响应式 */
@media (max-width: 900px) {
  .categories {
    grid-template-columns: repeat(2, 1fr);
  }
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .hero {
    padding: 40px 0 36px;
  }
  .hero-title {
    font-size: 24px;
  }
  .hero-title .icon {
    width: 26px;
    height: 26px;
  }
  .categories {
    grid-template-columns: 1fr;
  }
  .tools-grid {
    grid-template-columns: 1fr;
  }
  .category-card {
    padding: 22px 18px;
  }
  .category-card .icon {
    width: 30px;
    height: 30px;
  }
}
