:root {
  --bg: #0b0d14;
  --bg-2: #11141f;
  --card: #171b28;
  --border: #232838;
  --text: #e8eaf2;
  --muted: #9aa0b5;
  --accent: #5b8cff;
  --accent-2: #8c5bff;
  --grad: linear-gradient(135deg, #5b8cff 0%, #8c5bff 100%);
  --radius: 16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

/* 导航 */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(11, 13, 20, 0.72);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--grad);
  border-radius: 10px;
  font-weight: 700; font-size: 15px;
  color: #fff;
}
.logo-text { font-weight: 700; font-size: 17px; line-height: 1.1; }
.logo-text small { display: block; font-size: 10px; letter-spacing: 2px; color: var(--muted); font-weight: 500; }

.nav-links { display: flex; gap: 28px; }
.nav-links a { font-size: 14px; color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }

.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

.lang-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.lang-toggle:hover { color: var(--text); border-color: var(--accent); }

/* Hero */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 400px at 80% 20%, rgba(92, 91, 255, 0.22), transparent 60%),
    radial-gradient(500px 380px at 15% 75%, rgba(91, 140, 255, 0.18), transparent 60%);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 40%, transparent 75%);
}
.hero-inner { position: relative; max-width: 1120px; margin: 0 auto; padding: 120px 24px 80px; }
.hero-tag { font-size: 13px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; margin-bottom: 20px; }
.hero-title { font-size: 56px; line-height: 1.15; font-weight: 800; letter-spacing: -1px; }
.hero-title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-desc { margin-top: 24px; max-width: 520px; font-size: 17px; color: var(--muted); }
.hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: transform .15s, box-shadow .15s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px rgba(91, 140, 255, 0.35); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,0.04); }

.hero-stats { margin-top: 64px; display: flex; gap: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 30px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 13px; color: var(--muted); }

/* 通用 section */
.section { max-width: 1120px; margin: 0 auto; padding: 96px 24px; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-kicker { font-size: 13px; letter-spacing: 3px; color: var(--accent); text-transform: uppercase; }
.section-title { font-size: 36px; font-weight: 800; margin-top: 8px; }
.section-sub { margin-top: 12px; color: var(--muted); }

/* 游戏作品 */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.game-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.game-card:hover { transform: translateY(-6px); border-color: rgba(91, 140, 255, 0.5); }
.game-cover {
  height: 180px;
  display: grid; place-items: center;
  font-size: 40px;
  background: linear-gradient(135deg, rgba(91,140,255,0.25), rgba(140,91,255,0.25));
}
.game-body { padding: 20px; }
.game-cat { font-size: 12px; color: var(--accent); letter-spacing: 1px; }
.game-name { font-size: 19px; font-weight: 700; margin-top: 6px; }
.game-desc { margin-top: 8px; font-size: 14px; color: var(--muted); }
.game-meta { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; }
.game-tag { font-size: 12px; padding: 3px 10px; border-radius: 999px; background: rgba(91,140,255,0.12); color: var(--accent); }

/* 关于 */
.about { background: var(--bg-2); max-width: 100%; }
.about .section-head { max-width: 1120px; margin-left: auto; margin-right: auto; }
.about-grid {
  max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.about-card h3 { font-size: 18px; margin-bottom: 14px; }
.about-card p { color: var(--muted); font-size: 14px; }
.about-card ul { list-style: none; color: var(--muted); font-size: 14px; }
.about-card li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.about-card li:last-child { border-bottom: none; }

/* 联系 */
.contact-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.contact-item { display: flex; flex-direction: column; gap: 4px; }
.contact-label { font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.contact-value { font-size: 16px; font-weight: 600; }

/* 页脚 */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.footer-sub { margin-top: 6px; font-size: 12px; letter-spacing: 2px; color: #555b70; }
.footer-links { margin-top: 12px; font-size: 13px; }
.footer-links a { color: var(--muted); transition: color .2s; }
.footer-links a:hover { color: var(--text); }
.footer-links .sep { margin: 0 8px; color: #555b70; }

/* ============ 动效 ============ */

/* 1. 区块入场：滚动到视口时上移淡入 */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* 2. Hero 标题入场 */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-tag { animation: heroIn .6s .05s both; }
.hero-title { animation: heroIn .7s .15s both; }
.hero-desc { animation: heroIn .7s .3s both; }
.hero-actions { animation: heroIn .7s .45s both; }
.hero-stats { animation: heroIn .8s .6s both; }

/* 3. Hero 背景光晕缓慢漂浮 */
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 20px) scale(1.08); }
}
.hero-bg {
  animation: floatGlow 12s ease-in-out infinite;
  will-change: transform;
}

/* 4. Hero 标题渐变流光 */
@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.hero-title em {
  background: linear-gradient(90deg, #5b8cff, #8c5bff, #5b8cff);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

/* 5. 主按钮发光脉冲 */
@keyframes pulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(91, 140, 255, 0.35); }
  50% { box-shadow: 0 8px 36px rgba(140, 91, 255, 0.6); }
}
.btn-primary { animation: pulse 3s ease-in-out infinite; }

/* 6. 卡片 hover 增强 */
.game-card, .about-card, .contact-box {
  transition: transform .3s cubic-bezier(.22,.61,.36,1), border-color .3s, box-shadow .3s;
}
.game-card:hover {
  transform: translateY(-10px);
  border-color: rgba(91, 140, 255, 0.6);
  box-shadow: 0 20px 48px rgba(91, 140, 255, 0.18);
}
.about-card:hover {
  transform: translateY(-6px);
  border-color: rgba(140, 91, 255, 0.45);
  box-shadow: 0 16px 40px rgba(140, 91, 255, 0.14);
}

/* 7. 游戏封面 emoji 悬浮 + 缩放 */
@keyframes bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.06); }
}
.game-cover { font-size: 52px; transition: transform .3s; }
.game-card:hover .game-cover { animation: bob 1.2s ease-in-out infinite; }

/* 8. 统计数字微光 */
.stat strong { transition: text-shadow .3s; }
.stat:hover strong { text-shadow: 0 0 24px rgba(140, 91, 255, 0.6); }

/* 9. 导航滚动收缩 */
.nav { transition: box-shadow .3s, background .3s; }
.nav.scrolled {
  background: rgba(11, 13, 20, 0.92);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* 尊重系统「减少动效」偏好 */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg, .hero-title em, .btn-primary, .game-card:hover .game-cover { animation: none; }
  .hero-tag, .hero-title, .hero-desc, .hero-actions, .hero-stats { animation: none; }
}

/* 响应式 */
@media (max-width: 900px) {
  .games-grid, .about-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 42px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  body.menu-open .nav-links {
    display: flex; flex-direction: column; align-items: flex-start;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-2); padding: 16px 24px; gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .hero-title { font-size: 34px; }
  .games-grid, .about-grid, .contact-box { grid-template-columns: 1fr; }
  .hero-stats { gap: 28px; }
}
