/* 首页顶部背景包装器 - 深蓝色调 + 底部柔光 (Deep Blue Tone + Bottom Glow) */
.home-hero-wrapper {
  background-color: #0f172a;
  background-image: 
    radial-gradient(circle at 50% 100%, rgba(16, 185, 129, 0.15) 0%, transparent 60%);
  position: relative;
  overflow: hidden;
  padding-top: 100px;
  padding-bottom: 120px;
  margin-bottom: -60px;
  z-index: 1;
}

/* 装饰性网格基础样式 */
.home-hero-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
  animation: hero-decor-anim 20s linear infinite;
}

/* 流动光束基础样式 */
.home-hero-wrapper .hero-beams {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  transform: skewX(-15deg);
}

.home-hero-wrapper .hero-beam {
  position: absolute;
  width: 1.5px;
  height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(16, 185, 129, 0.3), transparent);
  animation: beam-fall 4s linear infinite;
  opacity: 0;
}

.home-hero-wrapper .hero-beam:nth-child(1) { left: 10%; animation-delay: 0s; }
.home-hero-wrapper .hero-beam:nth-child(2) { left: 30%; animation-delay: 1.5s; animation-duration: 5s; }
.home-hero-wrapper .hero-beam:nth-child(3) { left: 55%; animation-delay: 0.5s; animation-duration: 3s; }
.home-hero-wrapper .hero-beam:nth-child(4) { left: 75%; animation-delay: 2.5s; animation-duration: 6s; }
.home-hero-wrapper .hero-beam:nth-child(5) { left: 90%; animation-delay: 1s; animation-duration: 4s; }

/* 亮色模式下的背景 - 科技感几何背景 */
.light-theme .home-hero-wrapper {
  background-color: #10b981;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 40%),
    linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* 亮色模式下的装饰元素覆盖 */
.light-theme .home-hero-wrapper::after {
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.12) 1.5px, transparent 1.5px);
  background-size: 50px 50px;
  animation-duration: 15s;
}

.light-theme .home-hero-wrapper .hero-beam {
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.4), transparent);
  width: 2px;
  height: 100px;
}

@keyframes beam-fall {
  0% { transform: translateY(-100px); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(600px); opacity: 0; }
}

@keyframes hero-decor-anim {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 50px 50px, 0 0; }
}

@keyframes hero-decor-fade {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

.home-hero-wrapper .home-container {
  position: relative;
  z-index: 1;
}

/* 文字与按钮颜色适配 */
.home-hero-wrapper .logo-text {
  color: #ffffff !important;
  font-weight: 700;
}

.home-hero-wrapper .category-option {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
}

.home-hero-wrapper .category-option:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.15);
}

.light-theme .home-hero-wrapper .logo-text {
  color: #064e3b !important;
}

.light-theme .home-hero-wrapper .category-option {
  color: rgba(6, 78, 59, 0.8) !important;
}

.light-theme .home-hero-wrapper .category-option:hover {
  color: #064e3b !important;
  background: rgba(255, 255, 255, 0.4);
}

.light-theme .home-hero-wrapper .category-option,
.light-theme .home-hero-wrapper .lang-btn,
.light-theme .home-hero-wrapper .theme-btn {
  color: rgba(6, 78, 59, 0.8) !important;
}

.light-theme .home-hero-wrapper .category-option:hover,
.light-theme .home-hero-wrapper .lang-btn:hover,
.light-theme .home-hero-wrapper .theme-btn:hover {
  color: #064e3b !important;
  background: rgba(255, 255, 255, 0.3) !important;
}

/* 标题样式 - 现代纤细感 */
.home-hero-wrapper .hero-title {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding-bottom: 8px;
  background: linear-gradient(135deg, #f1f5f9 0%, #94a3b8 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
  margin-bottom: 24px;
  text-shadow: none;
  margin-top: 40px;
}

.light-theme .home-hero-wrapper .hero-title {
  background: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}

.home-hero-wrapper .hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7) !important;
  margin: 0 auto;
  line-height: 1.6;
  opacity: 1 !important;
}

.light-theme .home-hero-wrapper .hero-subtitle {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* 导航分类选项按钮 */
.home-hero-wrapper .nav-center .category-options {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* 分类按钮激活状态 - 简约呼吸感 */
.home-hero-wrapper .category-option.active {
  background: transparent !important;
  color: #10b981 !important;
  font-weight: 600;
  box-shadow: none !important;
  transform: none !important;
}

.home-hero-wrapper .category-option.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
}

.light-theme .home-hero-wrapper .category-option.active::after {
  background: #064e3b;
  box-shadow: 0 0 10px rgba(6, 78, 59, 0.3);
}

.light-theme .home-hero-wrapper .category-option.active {
  color: #064e3b !important;
}

.home-hero-wrapper .logo-icon-container {
  background: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.home-hero-wrapper .logo-shred {
  background: #ffffff;
}

/* 内容区域衔接 */
.content-section {
  position: relative;
  z-index: 2;
  background: #0f172a;
  border-radius: 48px 48px 0 0;
  padding-top: 40px;
  margin-top: -40px;
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .content-section {
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* 在亮色模式下也隐藏原有的 Hero 背景，因为使用了新的大背景 */
.home-hero-wrapper .hero-bg-glow {
  display: none;
}

/* 主内容布局调整 */
.is-home-page .main-content {
  background: #0f172a;
}

.light-theme.is-home-page .main-content {
  background: #ffffff;
}

/* 顶部导航栏 (工具页面专用) */
.top-header:not(.is-home-page-header) {
  display: none; /* 隐藏工具页面的顶部导航 */
}

.top-header:not(.is-home-page-header) .nav {
  max-width: none;
  margin: 0;
  border-radius: 12px;
}

.home-container {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  flex: 1;
  width: 100%;
}

/* 首页特有样式 */
.hero {
  position: relative;
  text-align: center;
  padding: 60px 32px 40px;
  overflow: hidden;
}

.hero-bg-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.1) 50%, transparent 70%);
  filter: blur(60px);
  z-index: -1;
  pointer-events: none;
  animation: pulseGlow 8s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0.8;
  }
}

.hero-title {
  font-size: 56px;
  font-weight: 850;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: 
    fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both 0.1s,
    titleGlow 4s ease-in-out infinite 0.9s;
}

.hero-subtitle {
  font-size: 18px;
  color: #9ca3af;
  margin: 0 auto;
  padding: 0 32px 40px;
  text-align: center;
  white-space: nowrap;
  display: inline-block;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  padding: 10px 32px 40px;
  min-height: auto;
  align-items: start;
  align-content: start;
}

.category-title {
  grid-column: 1 / -1;
  font-size: 24px;
  font-weight: 600;
  color: #f9fafb;
  margin-top: 40px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #1f2937;
}

.tool-card {
  background: radial-gradient(circle at top left, #0b1120, #020617);
  border-radius: 18px;
  border: 1px solid #1f2937;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
  min-height: 280px;
  height: 100%;
  opacity: 0;
}

.tool-card.show {
  animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tool-card:hover {
  transform: translateY(-12px) scale(1.02);
  border-color: #10b981;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.9),
    0 0 0 1px #10b981;
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.tool-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tool-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  width: auto;
  height: 48px;
  padding: 0 8px;
  border-radius: 12px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #0b1120;
  font-size: 24px;
  font-weight: 800;
}

.tool-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #e5e7eb;
}

.tool-card-description {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.6;
  flex: 1;
  min-height: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tool-feature {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid #1f2937;
  font-size: 11px;
  color: #9ca3af;
}

.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid #1f2937;
}

.tool-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #020617;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}

/* 首页亮色模式适配 */
.light-theme .hero-title {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both 0.1s;
  text-shadow: none !important;
}

.light-theme .hero-subtitle {
  color: #64748b;
}

.light-theme .category-title {
  color: #0f172a;
  border-bottom-color: #e2e8f0;
}

.light-theme .tool-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.light-theme .tool-card:hover {
  border-color: #10b981;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 0 0 1px #10b981;
}

.light-theme .tool-card-icon {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
}

.light-theme .tool-card:hover .tool-card-icon {
  transform: scale(1.1) rotate(5deg);
  background: linear-gradient(135deg, #10b981, #06b6d4);
}

.light-theme .tool-card-title {
  color: #0f172a;
}

.light-theme .tool-card-description {
  color: #64748b;
}

.light-theme .tool-feature {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.light-theme .tool-card-footer {
  border-top-color: #e2e8f0;
}