/* ============================================================
   吴宇皓的星际基地 - WU.Y.H SPACE STATION
   像素街机 + 科幻 CRT 风
   ============================================================ */

:root {
  --bg-deep: #050816;
  --bg: #0a0e27;
  --bg-light: #161b3d;
  --primary: #00f0ff;
  --secondary: #ff2e97;
  --accent: #ffd23f;
  --success: #39ff14;
  --zombie: #ff3b3b;
  --text: #e8eeff;
  --text-dim: #8090b8;

  --font-pixel: 'Press Start 2P', 'Cascadia Code', 'Consolas', monospace;
  --font-mono: 'VT323', 'Cascadia Code', 'Consolas', 'Microsoft YaHei', 'PingFang SC', monospace;
  --font-cn: 'ZCOOL QingKe HuangYou', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-mono);
  font-size: 22px;
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.45;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

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

a:focus-visible, button:focus-visible {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}

/* ============================================================
   背景：星空 + 扫描线
   ============================================================ */

.starfield {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse at 20% 0%, #1a2151 0%, transparent 50%),
    radial-gradient(ellipse at 85% 100%, #2a1a51 0%, transparent 50%),
    var(--bg-deep);
  overflow: hidden;
}

.starfield::before,
.starfield::after {
  content: '';
  position: absolute;
  inset: -50%;
  background-image:
    radial-gradient(1px 1px at 47px 17px, #fff, transparent),
    radial-gradient(1px 1px at 123px 71px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 67px 123px, #fff, transparent),
    radial-gradient(1px 1px at 187px 47px, var(--primary), transparent),
    radial-gradient(1px 1px at 89px 167px, #fff, transparent),
    radial-gradient(2px 2px at 213px 213px, var(--secondary), transparent),
    radial-gradient(1px 1px at 23px 247px, #fff, transparent),
    radial-gradient(1px 1px at 167px 287px, var(--accent), transparent),
    radial-gradient(1.5px 1.5px at 287px 87px, #fff, transparent),
    radial-gradient(1px 1px at 311px 217px, #fff, transparent),
    radial-gradient(1px 1px at 397px 47px, var(--primary), transparent),
    radial-gradient(1.5px 1.5px at 411px 177px, #fff, transparent),
    radial-gradient(1px 1px at 357px 297px, #fff, transparent),
    radial-gradient(2px 2px at 467px 137px, var(--success), transparent);
  background-size: 500px 350px;
  background-repeat: repeat;
  animation: twinkle 5s ease-in-out infinite;
}

.starfield::after {
  animation-duration: 7s;
  animation-delay: 2s;
  opacity: 0.5;
  background-position: 50% 50%;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.scanlines {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0,
    transparent 2px,
    rgba(0, 0, 0, 0.18) 3px,
    rgba(0, 0, 0, 0.18) 4px
  );
  mix-blend-mode: multiply;
}

/* ============================================================
   状态栏（顶/底）
   ============================================================ */

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  font-family: var(--font-pixel);
  font-size: 12px;
  letter-spacing: 1.5px;
  color: var(--primary);
  text-transform: uppercase;
  background: rgba(10, 14, 39, 0.85);
  border-bottom: 2px solid var(--primary);
  position: relative;
  z-index: 10;
  flex-wrap: wrap;
  gap: 8px;
  backdrop-filter: blur(4px);
}

.status-bar.bottom {
  border-bottom: none;
  border-top: 2px solid var(--primary);
  margin-top: 80px;
  color: var(--text-dim);
}

/* 备案号 */
.status-bar.bottom .icp {
  width: 100%;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: none;
  letter-spacing: 1px;
  color: var(--text-dim);
  transition: color 0.2s, text-shadow 0.2s;
}

.status-bar.bottom .icp:hover {
  color: var(--primary);
  text-shadow: 0 0 6px var(--primary);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  transition: filter 0.2s;
}

.logo:hover { filter: brightness(1.3); }

.logo-rocket {
  width: 22px;
  height: 22px;
  color: var(--primary);
  filter: drop-shadow(0 0 4px var(--primary));
  animation: rocket-bobble 3s ease-in-out infinite;
}

@keyframes rocket-bobble {
  0%, 100% { transform: translateY(0) rotate(-15deg); }
  50%      { transform: translateY(-3px) rotate(15deg); }
}

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--success);
  text-shadow: 0 0 6px var(--success);
}

.status-led {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: currentColor;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
  animation: pulse 1.5s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

/* ============================================================
   Hero：CRT 开机 + 大标题
   ============================================================ */

.hero {
  padding: 60px 24px;
  text-align: center;
  position: relative;
}

.hero-crt {
  max-width: 880px;
  margin: 0 auto;
  border: 3px solid var(--primary);
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.05), rgba(0, 0, 0, 0.4));
  padding: 36px 32px 40px;
  position: relative;
  box-shadow:
    0 0 24px rgba(0, 240, 255, 0.25),
    inset 0 0 40px rgba(0, 240, 255, 0.05);
}

.hero-crt::before,
.hero-crt::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  top: -7px;
  box-shadow: 0 0 8px var(--primary);
}

.hero-crt::before { left:  -7px; }
.hero-crt::after  { right: -7px; }

.crt-line {
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--success);
  text-align: left;
  margin: 4px 0;
  text-shadow: 0 0 4px var(--success);
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--success);
  width: 0;
  max-width: max-content;
  animation: typing 0.7s steps(40) forwards;
}

.crt-line:nth-child(1) { animation-delay: 0.2s; }
.crt-line:nth-child(2) { animation-delay: 0.9s; }
.crt-line:nth-child(3) {
  animation-delay: 1.6s;
  color: var(--accent);
  border-color: var(--accent);
  text-shadow: 0 0 4px var(--accent);
  animation: typing 0.7s steps(40) 1.6s forwards,
             blink 0.8s step-end 2.3s infinite;
}

@keyframes typing {
  from { width: 0; }
  to   { width: 100%; }
}

.hero-title {
  font-family: var(--font-cn);
  font-weight: normal;
  font-size: clamp(40px, 8vw, 78px);
  margin: 28px 0 12px;
  color: var(--primary);
  text-shadow:
    0 0 12px var(--primary),
    0 0 24px rgba(0, 240, 255, 0.4),
    4px 4px 0 var(--secondary);
  line-height: 1.1;
  letter-spacing: 4px;
  opacity: 0;
  animation: fade-in 0.5s 2.4s forwards, glow-pulse 3s 3s ease-in-out infinite;
}

@keyframes glow-pulse {
  0%, 100% {
    text-shadow:
      0 0 12px var(--primary),
      0 0 24px rgba(0, 240, 255, 0.4),
      4px 4px 0 var(--secondary);
  }
  50% {
    text-shadow:
      0 0 20px var(--primary),
      0 0 40px rgba(0, 240, 255, 0.65),
      4px 4px 0 var(--secondary);
  }
}

@keyframes fade-in {
  to { opacity: 1; }
}

.hero-sub {
  font-family: var(--font-pixel);
  font-size: clamp(12px, 2vw, 16px);
  color: var(--accent);
  letter-spacing: 4px;
  margin-bottom: 14px;
  opacity: 0;
  animation: fade-in 0.5s 2.8s forwards;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text);
  margin-bottom: 24px;
  opacity: 0;
  animation: fade-in 0.5s 3.1s forwards;
}

.prompt {
  font-family: var(--font-pixel);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 3px;
  margin-top: 16px;
  text-shadow: 0 0 8px var(--accent);
  opacity: 0;
  animation: fade-in 0.5s 3.4s forwards, blink 0.8s step-end 4s infinite;
}

@keyframes blink {
  0%, 50%  { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* ============================================================
   区块标题
   ============================================================ */

.section-title {
  font-family: var(--font-pixel);
  font-size: clamp(14px, 2.5vw, 20px);
  text-align: center;
  color: var(--primary);
  margin: 70px 0 30px;
  letter-spacing: 3px;
  text-shadow: 0 0 8px var(--primary);
  white-space: nowrap;
}

.section-title::before,
.section-title::after {
  content: '═══';
  color: var(--secondary);
  margin: 0 14px;
  opacity: 0.5;
  letter-spacing: 0;
}

/* ============================================================
   星球卡片（游戏 + 科幻分区）
   ============================================================ */

.planets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

.planet {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 2px solid var(--primary);
  background: rgba(10, 14, 39, 0.78);
  padding: 20px 20px 18px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  text-align: center;
  backdrop-filter: blur(4px);
}

/* 各游戏卡各自的主题色 */
.planet-scifi      { border-color: var(--secondary); }
.planet-parkour-1  { border-color: var(--success);   }
.planet-parkour-2  { border-color: var(--accent);    }
.planet-space      { border-color: var(--primary);   }
.planet-zombie     { border-color: var(--zombie);    }

/* 角落小标签：CLASSIC / SEQUEL · 2 / NEW · 2026 */
.planet-tag {
  position: absolute;
  top: -10px;
  right: 14px;
  font-family: var(--font-pixel);
  font-size: 9px;
  letter-spacing: 1.5px;
  padding: 4px 8px;
  background: var(--bg-deep);
  border: 1px solid currentColor;
  color: var(--text-dim);
}

.planet-scifi     .planet-tag { color: var(--secondary); }
.planet-parkour-1 .planet-tag { color: var(--success);   }
.planet-parkour-2 .planet-tag { color: var(--accent);    }
.planet-space     .planet-tag { color: var(--primary);   }
.planet-zombie    .planet-tag { color: var(--zombie);    }

.planet:hover {
  transform: translateY(-5px) scale(1.015);
}

.planet-scifi:hover {
  box-shadow:
    0 8px 30px rgba(255, 46, 151, 0.3),
    inset 0 0 20px rgba(255, 46, 151, 0.05);
}

.planet-parkour-1:hover {
  box-shadow:
    0 8px 30px rgba(57, 255, 20, 0.32),
    inset 0 0 20px rgba(57, 255, 20, 0.05);
  animation: planet-shake 0.35s ease-in-out;
}

.planet-parkour-2:hover {
  box-shadow:
    0 8px 24px rgba(255, 210, 63, 0.32),
    inset 0 0 20px rgba(255, 210, 63, 0.06);
  animation: planet-tilt 0.45s ease-in-out;
}

.planet-space:hover {
  box-shadow:
    0 8px 30px rgba(0, 240, 255, 0.35),
    inset 0 0 20px rgba(0, 240, 255, 0.06);
  animation: planet-glow 1.2s ease-in-out infinite;
}

.planet-zombie:hover {
  box-shadow:
    0 8px 30px rgba(255, 59, 59, 0.35),
    inset 0 0 20px rgba(255, 59, 59, 0.07);
  animation: planet-heartbeat 0.9s ease-in-out infinite;
}

@keyframes planet-shake {
  0%, 100% { transform: translateY(-5px) scale(1.015) rotate(0); }
  25%      { transform: translateY(-5px) scale(1.015) rotate(-1.2deg); }
  75%      { transform: translateY(-5px) scale(1.015) rotate( 1.2deg); }
}

@keyframes planet-tilt {
  0%, 100% { transform: translateY(-5px) scale(1.015) rotate(0); }
  50%      { transform: translateY(-5px) scale(1.015) rotate(2deg); }
}

@keyframes planet-glow {
  0%, 100% { box-shadow:
    0 8px 30px rgba(0, 240, 255, 0.35),
    inset 0 0 20px rgba(0, 240, 255, 0.06); }
  50%      { box-shadow:
    0 10px 40px rgba(0, 240, 255, 0.55),
    inset 0 0 28px rgba(0, 240, 255, 0.12); }
}

/* 丧尸危机：心跳脉冲（呼应"一条命"） */
@keyframes planet-heartbeat {
  0%, 100% { transform: translateY(-5px) scale(1.015); }
  30%      { transform: translateY(-5px) scale(1.035); }
  45%      { transform: translateY(-5px) scale(1.010); }
  60%      { transform: translateY(-5px) scale(1.028); }
}

.planet-art {
  font-size: 52px;
  margin-bottom: 8px;
  display: inline-block;
  filter: drop-shadow(0 0 10px currentColor);
  animation: float 4s ease-in-out infinite;
  line-height: 1;
}

.planet-scifi     .planet-art { color: var(--secondary); animation-delay: 0s;  }
.planet-parkour-1 .planet-art { color: var(--success);   animation-delay: 1.2s; }
.planet-parkour-2 .planet-art { color: var(--accent);    animation-delay: 2.4s; }
.planet-space     .planet-art { color: var(--primary);   animation-delay: 0.6s; }
.planet-zombie    .planet-art { color: var(--zombie);    animation-delay: 1.8s; }

@keyframes float {
  0%, 100% { transform: translateY(0)    rotate(-3deg); }
  50%      { transform: translateY(-8px) rotate( 3deg); }
}

.planet-info h3 {
  font-family: var(--font-cn);
  font-weight: normal;
  font-size: 26px;
  margin-bottom: 2px;
  letter-spacing: 3px;
  text-shadow: 0 0 8px currentColor;
  line-height: 1.1;
}

.planet-scifi     .planet-info h3 { color: var(--secondary); }
.planet-parkour-1 .planet-info h3 { color: var(--success);   }
.planet-parkour-2 .planet-info h3 { color: var(--accent);    }
.planet-space     .planet-info h3 { color: var(--primary);   }
.planet-zombie    .planet-info h3 { color: var(--zombie);    }

.planet-en {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.planet-desc {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.45;
}

.planet-list {
  list-style: none;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  margin: 0 auto 14px;
  padding: 10px 14px;
  border: 1px dashed rgba(255, 46, 151, 0.35);
  background: rgba(255, 46, 151, 0.05);
  max-width: 260px;
}

.planet-list li { padding: 2px 0; }

.planet-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-pixel);
  font-size: 9px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 1px;
  flex-wrap: wrap;
}

.planet-status {
  font-family: var(--font-pixel);
  font-size: 10px;
  letter-spacing: 2px;
  padding: 7px 14px;
  display: inline-block;
  background: rgba(0, 240, 255, 0.1);
  border: 2px solid var(--primary);
  color: var(--primary);
  text-shadow: 0 0 4px currentColor;
}

.planet-parkour-1 .planet-status {
  background: rgba(57, 255, 20, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.planet-parkour-2 .planet-status {
  background: rgba(255, 210, 63, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}

.planet-scifi .planet-status {
  background: rgba(255, 46, 151, 0.1);
  border-color: var(--secondary);
  color: var(--secondary);
}

.planet-space .planet-status {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--primary);
  color: var(--primary);
}

.planet-zombie .planet-status {
  background: rgba(255, 59, 59, 0.12);
  border-color: var(--zombie);
  color: var(--zombie);
}

/* ============================================================
   指挥官档案
   ============================================================ */

.profile-card {
  max-width: 720px;
  margin: 0 auto;
  border: 3px solid var(--primary);
  background: rgba(10, 14, 39, 0.8);
  display: flex;
  align-items: center;
  padding: 28px 32px;
  gap: 32px;
  position: relative;
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
  flex-wrap: wrap;
}

.profile-card::before {
  content: 'ID-CARD';
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--bg-deep);
  padding: 0 8px;
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 2px;
}

.profile-avatar {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 10px var(--primary));
  animation: float 5s ease-in-out infinite;
}

.profile-avatar svg { width: 100%; height: 100%; image-rendering: pixelated; }

.profile-info {
  flex: 1;
  min-width: 240px;
}

.profile-name {
  font-family: var(--font-cn);
  font-weight: normal;
  font-size: 38px;
  color: var(--accent);
  letter-spacing: 4px;
  text-shadow: 0 0 8px var(--accent);
  margin-bottom: 2px;
  line-height: 1.1;
}

.profile-en {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.profile-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-row {
  display: flex;
  font-family: var(--font-mono);
  font-size: 18px;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(0, 240, 255, 0.18);
  align-items: center;
}

.profile-row span:first-child {
  font-family: var(--font-pixel);
  font-size: 10px;
  color: var(--primary);
  width: 56px;
  flex-shrink: 0;
  letter-spacing: 1px;
}

.profile-row b {
  color: var(--text);
  font-weight: normal;
}

.online {
  color: var(--success);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 640px) {
  body { font-size: 18px; }
  .status-bar { font-size: 9px;  padding: 10px 16px; letter-spacing: 1px; }
  .logo-text { display: none; }
  .status-bar.bottom .icp { font-size: 11px; }
  .hero      { padding: 40px 16px; }
  .hero-crt  { padding: 24px 18px 28px; }
  .section-title { margin: 50px 0 20px; }
  .section-title::before,
  .section-title::after { display: none; }
  .planets   { grid-template-columns: 1fr; padding: 0 16px; }
  .planet    { padding: 24px 18px; }
  .profile-card {
    padding: 24px 20px;
    gap: 20px;
    flex-direction: column;
    text-align: center;
  }
  .profile-card::before { left: 50%; transform: translateX(-50%); }
  .profile-rows { text-align: left; }
}

/* ============================================================
   减少动效偏好
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .crt-line { width: 100% !important; border: none !important; }
  .hero-title, .hero-sub, .hero-tag, .prompt { opacity: 1 !important; }
}
