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

:root {
  --bg: #0a0a1a;
  --bg-card: rgba(22, 22, 45, 0.7);
  --bg-card-hover: rgba(30, 30, 55, 0.85);
  --text: #e8e8f0;
  --text-dim: #8888aa;
  --purple: #7c3aed;
  --blue: #2563eb;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --gradient: linear-gradient(135deg, #7c3aed, #2563eb);
  --gradient-warm: linear-gradient(135deg, #ec4899, #7c3aed);
  --radius: 14px;
  --shadow: 0 4px 32px rgba(0,0,0,0.4);
  --glass: rgba(255,255,255,0.03);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ===== 动态背景效果 ===== */
.bg-effects {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.6;
  animation: float 20s ease-in-out infinite;
}

.orb-1 {
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,0.7), transparent 70%);
  top: -200px;
  left: -150px;
  animation-delay: 0s;
  animation-duration: 25s;
}

.orb-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.6), transparent 70%);
  top: 50%;
  right: -200px;
  animation-delay: -5s;
  animation-duration: 22s;
}

.orb-3 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,0.55), transparent 70%);
  bottom: -100px;
  left: 30%;
  animation-delay: -10s;
  animation-duration: 28s;
}

.orb-4 {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(6,182,212,0.5), transparent 70%);
  top: 30%;
  left: 50%;
  animation-delay: -15s;
  animation-duration: 30s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(60px, -40px) scale(1.05); }
  50% { transform: translate(-30px, 50px) scale(0.95); }
  75% { transform: translate(40px, 20px) scale(1.02); }
}

/* 网格叠加层 */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.15) 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 10%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 10%, transparent 90%);
}

/* ===== Header ===== */
.header {
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(124,58,237,0.15);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
}

.logo-icon {
  font-size: 28px;
}

.search-box {
  flex: 1;
  min-width: 200px;
  max-width: 480px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: #666;
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: all 0.3s;
}

.search-box input::placeholder {
  color: rgba(255,255,255,0.35);
}

.search-box input:focus {
  background: rgba(255,255,255,0.1);
  border-color: rgba(124,58,237,0.7);
  box-shadow: 0 0 20px rgba(124,58,237,0.15);
}

/* ===== Main ===== */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

/* ===== Hero 区域 ===== */
.hero {
  text-align: center;
  padding: 56px 0 40px;
}

.hero-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.gradient-text {
  background: linear-gradient(135deg, #7c3aed, #06b6d4, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* ===== Category Tabs ===== */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 8px 20px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 24px;
  background: var(--bg-card);
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s;
  backdrop-filter: blur(10px);
}

.tab:hover {
  color: var(--text);
  border-color: rgba(124,58,237,0.3);
  background: var(--bg-card-hover);
}

.tab.active {
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  border-color: transparent;
  box-shadow: 0 2px 16px rgba(124,58,237,0.3);
}

/* ===== Tools Grid ===== */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}

.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255,255,255,0.05);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.3s;
}

.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(124,58,237,0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.tool-card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  box-shadow: 0 8px 40px rgba(124,58,237,0.15), 0 2px 12px rgba(0,0,0,0.3);
  border-color: rgba(124,58,237,0.25);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card:hover::after {
  opacity: 1;
}

.tool-card-icon {
  font-size: 36px;
  margin-bottom: 14px;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.3));
}

.tool-card-name {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #fff;
}

.tool-card-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-dim);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 0 24px 48px;
  position: relative;
  z-index: 1;
}

.footer-divider {
  width: 80px;
  height: 2px;
  background: var(--gradient);
  margin: 0 auto 32px;
  border-radius: 2px;
  opacity: 0.5;
}

.footer-brand {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.footer-copy {
  font-size: 13px;
  color: rgba(136,136,170,0.6);
  letter-spacing: 1px;
}

/* ===== 响应式 ===== */
@media (max-width: 640px) {
  .header-inner {
    padding: 12px 16px;
    gap: 12px;
  }

  .logo {
    font-size: 18px;
  }

  .logo-icon {
    font-size: 22px;
  }

  .search-box {
    min-width: 100%;
  }

  .main {
    padding: 0 16px 40px;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

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

  .tool-card {
    padding: 18px;
  }

  .tool-card-icon {
    font-size: 30px;
    margin-bottom: 10px;
  }

  .tool-card-name {
    font-size: 15px;
  }

  .orb { opacity: 0.2; }
  .orb-1 { width: 300px; height: 300px; }
  .orb-2 { width: 250px; height: 250px; }
  .orb-3 { width: 200px; height: 200px; }
  .orb-4 { display: none; }
}
