/* 首页 */
.home-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ── Hero 开屏区域 ── */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(135deg, #0a0e27 0%, #0d1340 25%, #111b54 50%, #0a1628 75%, #060d1f 100%);
}

/* 网格底纹 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 130, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 130, 255, 0.07) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black 30%, transparent 80%);
}

/* 中央辉光 */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(56, 130, 255, 0.15) 0%, rgba(99, 60, 255, 0.08) 40%, transparent 70%);
  animation: heroGlow 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes heroGlow {
  0% {
    opacity: 0.6;
    transform: translate(-50%, -50%) scale(1);
  }

  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.15);
  }
}

/* 浮动粒子 */
.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-particles span {
  position: absolute;
  display: block;
  border-radius: 50%;
  background: rgba(100, 160, 255, 0.35);
  animation: particleFloat linear infinite;
}

.hero-particles span:nth-child(1) {
  width: 4px;
  height: 4px;
  left: 10%;
  top: 20%;
  animation-duration: 18s;
  animation-delay: 0s;
}

.hero-particles span:nth-child(2) {
  width: 6px;
  height: 6px;
  left: 25%;
  top: 70%;
  animation-duration: 22s;
  animation-delay: 2s;
}

.hero-particles span:nth-child(3) {
  width: 3px;
  height: 3px;
  left: 45%;
  top: 15%;
  animation-duration: 16s;
  animation-delay: 4s;
}

.hero-particles span:nth-child(4) {
  width: 5px;
  height: 5px;
  left: 60%;
  top: 80%;
  animation-duration: 20s;
  animation-delay: 1s;
}

.hero-particles span:nth-child(5) {
  width: 3px;
  height: 3px;
  left: 80%;
  top: 35%;
  animation-duration: 24s;
  animation-delay: 3s;
}

.hero-particles span:nth-child(6) {
  width: 7px;
  height: 7px;
  left: 15%;
  top: 55%;
  animation-duration: 19s;
  animation-delay: 5s;
}

.hero-particles span:nth-child(7) {
  width: 4px;
  height: 4px;
  left: 70%;
  top: 10%;
  animation-duration: 21s;
  animation-delay: 0s;
}

.hero-particles span:nth-child(8) {
  width: 5px;
  height: 5px;
  left: 90%;
  top: 60%;
  animation-duration: 17s;
  animation-delay: 2s;
}

.hero-particles span:nth-child(9) {
  width: 3px;
  height: 3px;
  left: 35%;
  top: 90%;
  animation-duration: 23s;
  animation-delay: 4s;
}

.hero-particles span:nth-child(10) {
  width: 6px;
  height: 6px;
  left: 55%;
  top: 45%;
  animation-duration: 15s;
  animation-delay: 1s;
}

.hero-particles span:nth-child(11) {
  width: 4px;
  height: 4px;
  left: 5%;
  top: 85%;
  animation-duration: 20s;
  animation-delay: 3s;
}

.hero-particles span:nth-child(12) {
  width: 3px;
  height: 3px;
  left: 85%;
  top: 90%;
  animation-duration: 18s;
  animation-delay: 5s;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  90% {
    opacity: 1;
  }

  100% {
    transform: translateY(-400px) translateX(40px);
    opacity: 0;
  }
}

/* 装饰圆环 */
.hero-rings {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-rings .ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(80, 140, 255, 0.1);
}

.hero-rings .ring:nth-child(1) {
  width: 300px;
  height: 300px;
  animation: ringPulse 8s ease-in-out infinite;
}

.hero-rings .ring:nth-child(2) {
  width: 460px;
  height: 460px;
  border-color: rgba(120, 80, 255, 0.08);
  animation: ringPulse 10s ease-in-out infinite 1s;
}

.hero-rings .ring:nth-child(3) {
  width: 620px;
  height: 620px;
  border-color: rgba(56, 130, 255, 0.05);
  animation: ringPulse 12s ease-in-out infinite 2s;
}

@keyframes ringPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.06);
    opacity: 1;
  }
}

/* AI 科技大脑 */
.hero-brain {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  animation: brainFadeIn 1.5s ease-out;
}

.hero-brain svg {
  width: 420px;
  height: 420px;
  opacity: 0.55;
}

.hero-brain .node {
  animation: nodePulse 3s ease-in-out infinite;
}

.hero-brain .node-1 {
  animation-delay: 0s;
}

.hero-brain .node-2 {
  animation-delay: 0.4s;
}

.hero-brain .node-3 {
  animation-delay: 0.8s;
}

.hero-brain .node-4 {
  animation-delay: 1.2s;
}

.hero-brain .node-5 {
  animation-delay: 1.6s;
}

.hero-brain .node-6 {
  animation-delay: 2.0s;
}

.hero-brain .node-7 {
  animation-delay: 0.6s;
}

.hero-brain .node-8 {
  animation-delay: 1.0s;
}

.hero-brain .node-9 {
  animation-delay: 1.4s;
}

.hero-brain .node-center {
  animation: centerPulse 2.5s ease-in-out infinite;
}

.hero-brain .circuit-line {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: circuitDraw 4s ease-in-out infinite alternate;
}

@keyframes nodePulse {

  0%,
  100% {
    opacity: 0.5;
    r: inherit;
  }

  50% {
    opacity: 1;
  }
}

@keyframes centerPulse {

  0%,
  100% {
    opacity: 0.6;
    filter: url(#softGlow);
  }

  50% {
    opacity: 1;
  }
}

@keyframes circuitDraw {
  0% {
    stroke-dashoffset: 80;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes brainFadeIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* 内容层：整体与「热门AI工具」同宽 1200px，标题/描述/按钮保持 720px 居中 */
.hero-content {
  position: relative;
  z-index: 2;
  padding: 60px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-slogan {
  font-size: 2.6rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.04em;
  line-height: 1.3;
  margin-bottom: 8px;
  text-shadow: 0 0 40px rgba(56, 130, 255, 0.3);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-slogan .accent {
  background: linear-gradient(90deg, #60a5fa, #a78bfa, #60a5fa);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 4s linear infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

.hero-brand {
  font-size: 1.1rem;
  font-weight: 500;
  color: rgba(160, 190, 255, 0.7);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(200, 215, 255, 0.7);
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search-actions {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 auto 0;
}

.hero-search {
  display: flex;
  width: 100%;
  margin: 0 0 20px;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s;
}

.hero-search:focus-within {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(255, 255, 255, 0.12);
}

.hero-search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 13px 18px;
  font-size: 0.95rem;
  background: transparent;
  color: #fff;
}

.hero-search-input::placeholder {
  color: rgba(200, 215, 255, 0.5);
}

.hero-search-btn {
  border: none;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  padding: 13px 24px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}

.hero-search-btn:hover {
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: nowrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s;
  white-space: nowrap;
  cursor: pointer;
  white-space: nowrap;
}

.hero-btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35);
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(59, 130, 246, 0.5);
}

.hero-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(200, 215, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(4px);
}

.hero-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ── 热门工具推荐 ── */
.hot-tools {
  padding: 48px 24px 0;
  background: var(--color-bg);
}

.hot-apps-section,
.hot-wiki-section {
  padding-top: 32px;
}

.hot-tools-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.hot-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.hot-tools-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hot-tools-more {
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.hot-tools-more:hover {
  text-decoration: underline;
}

.hot-tools-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.hot-tools-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}

.hot-tools-refresh:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.hot-tools-refresh.spinning .refresh-icon {
  animation: spin 0.6s ease;
}

@keyframes spin {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

.refresh-icon {
  flex-shrink: 0;
}

.hot-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}

/* 卡片样式 */
.ht-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  overflow: hidden;
  min-height: 110px;
}

.ht-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.ht-card-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ht-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
}

.ht-card-icon-placeholder {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #dbeafe, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--color-primary);
}

.ht-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ht-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ht-card-cat {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--color-primary);
  background: #eff6ff;
  padding: 1px 8px;
  border-radius: 10px;
  width: fit-content;
}

.ht-card-desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

/* ── 最新AI资讯 ── */
.latest-news {
  padding: 32px 24px 56px;
  background: var(--color-bg);
}

.latest-news-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.latest-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.latest-news-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.latest-news-more {
  font-size: 0.9rem;
  color: var(--color-primary);
  text-decoration: none;
  white-space: nowrap;
}

.latest-news-more:hover {
  text-decoration: underline;
}

.latest-news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 20px;
}

.ln-card {
  display: flex;
  flex-direction: row;
  height: 160px;
  box-sizing: border-box;
  background: var(--color-white);
  border-radius: 12px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: all 0.25s;
  overflow: hidden;
}

.ln-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.ln-card-body {
  display: flex;
  flex-direction: column;
  padding: 16px 18px;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ln-card-cover {
  flex-shrink: 0;
  width: 160px;
  object-fit: cover;
  display: block;
  background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 50%, #ede9fe 100%);
}

.ln-card-cover-placeholder {
  flex-shrink: 0;
  width: 160px;
  background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 50%, #ede9fe 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(99, 102, 241, 0.25);
}

.ln-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ln-card-summary {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: break-all;
}

.ln-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}

.ln-card-source {
  font-size: 0.7rem;
  color: #8b95a5;
  background: rgba(99, 102, 241, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.ln-card-date {
  font-size: 0.75rem;
  color: #b0b8c4;
  margin-left: auto;
}

.ln-card-views {
  font-size: 0.75rem;
  color: #b0b8c4;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.ln-card-views svg {
  opacity: 0.6;
}

/* ── 移动端适配 ── */
@media (max-width: 640px) {
  .hero {
    min-height: 420px;
  }

  .hero-slogan {
    font-size: 1.8rem;
  }

  .hero-brand {
    font-size: 0.95rem;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .hero-search-actions {
    max-width: 90%;
  }

  .hero-search-input {
    padding: 11px 14px;
    font-size: 0.85rem;
  }

  .hero-search-btn {
    padding: 11px 16px;
    font-size: 0.85rem;
  }

  .hero-actions {
    gap: 8px;
    flex-wrap: wrap;
  }

  .hero-btn {
    padding: 10px 14px;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .hero-brain svg {
    width: 280px;
    height: 280px;
    opacity: 0.35;
  }

  .hero-rings .ring:nth-child(2),
  .hero-rings .ring:nth-child(3) {
    display: none;
  }

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

  .hot-tools {
    padding: 32px 16px 0;
  }

  .hot-tools-title {
    font-size: 1.2rem;
  }

  .latest-news {
    padding: 32px 16px 40px;
  }

  .latest-news-grid {
    grid-template-columns: 1fr;
  }

  .latest-news-title {
    font-size: 1.2rem;
  }

  .ln-card-cover,
  .ln-card-cover-placeholder {
    width: 120px;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .hot-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}