/* ============================================================
   index.css - 首页特有样式
   ============================================================ */

/* ── 区块标题 + 更多链接 ── */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header .section-title {
  margin-bottom: 0;
}

.section-more {
  font-size: 0.85rem;
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}

.section-more:hover {
  color: var(--purple);
}

/* ── Hero 区域 ── */
.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 32px 60px;
  text-align: center;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124, 77, 255, 0.15) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 80% 80%, rgba(0, 229, 255, 0.08) 0%, transparent 60%);
}

/* 网格背景装饰 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42, 47, 85, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42, 47, 85, 0.4) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; max-width: 680px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid var(--purple);
  border-radius: 20px;
  font-size: 0.78rem;
  color: var(--purple);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero h1 .highlight {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.hero .btn-primary {
  padding: 12px 32px;
  background: linear-gradient(135deg, var(--purple), var(--cyan-dim));
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 4px 20px rgba(124, 77, 255, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(124, 77, 255, 0.5);
}

.hero .btn-secondary {
  padding: 12px 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  color: var(--text-dim);
  background: var(--card);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.hero .btn-secondary:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

/* ── 主体区域 ── */
main {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 24px;
  width: 100%;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── 游戏入口卡片 ── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}

.game-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px 24px;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.game-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--glow, var(--cyan));
  opacity: 0;
  transition: opacity 0.25s;
}
.game-card:hover {
  border-color: var(--glow, var(--cyan));
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}
.game-card:hover::before { opacity: 1; }

.game-icon {
  font-size: 2.4rem;
  margin-bottom: 12px;
  display: block;
  filter: drop-shadow(0 0 8px var(--glow, var(--cyan)));
}
.game-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.game-card p {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.5;
}
.game-tag {
  display: inline-block;
  margin-top: 10px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.7rem;
  background: rgba(0, 229, 255, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(0, 229, 255, 0.25);
}

/* ── 导航功能区 ── */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.link-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.link-card:hover {
  border-color: var(--purple);
  background: rgba(124, 77, 255, 0.06);
  transform: translateX(4px);
}

.link-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(124, 77, 255, 0.12);
  border: 1px solid rgba(124, 77, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.link-info { flex: 1; min-width: 0; }
.link-info h4 { font-size: 0.92rem; font-weight: 600; margin-bottom: 2px; }
.link-info p  { font-size: 0.76rem; color: var(--text-dim); }

.link-arrow {
  color: var(--text-dim);
  font-size: 0.9rem;
  transition: color 0.2s, transform 0.2s;
}
.link-card:hover .link-arrow { color: var(--purple); transform: translateX(3px); }

/* ── 移动端响应式 ── */
@media (max-width: 640px) {
  .hero { padding: 48px 16px 40px; }
  .hero-btns { flex-direction: column; align-items: stretch; }
  .hero .btn-primary, .hero .btn-secondary { text-align: center; }

  main { padding: 40px 16px; }

  .games-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .game-card { padding: 20px 14px 18px; }
}

/* ── 粒子装饰（纯CSS伪元素） ── */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.4; }
  50%       { transform: translateY(-20px) rotate(180deg); opacity: 0.7; }
}
.particle {
  position: fixed;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  pointer-events: none;
  animation: float linear infinite;
  opacity: 0.3;
  z-index: 0;
}
