/* ============================================================
   木雨花园 ARCADE — 黑色游戏主题作品集
   纯 CSS，无外部依赖，中国网络环境友好
   ============================================================ */

:root {
  --bg: #05050a;
  --bg-2: #0a0a14;
  --panel: #0d0d1a;
  --panel-2: #12121f;
  --line: #23233a;

  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --green: #00ff9d;
  --yellow: #ffe600;
  --purple: #b388ff;
  --red: #ff3b5c;

  --text: #e8e8f0;
  --muted: #8a8aa3;

  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  /* 深空渐变底 */
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(179, 136, 255, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 30%, rgba(0, 240, 255, 0.06), transparent 55%),
    radial-gradient(ellipse 60% 50% at 10% 70%, rgba(255, 43, 214, 0.06), transparent 55%);
  background-attachment: fixed;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-shadow: 0 0 8px var(--cyan); }

/* ---------- 星空粒子 ---------- */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.star {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  animation: twinkle 3s infinite ease-in-out;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.9; }
}

/* ---------- CRT 扫描线 & 暗角 ---------- */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.025) 0px,
    rgba(255, 255, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 61;
  background: radial-gradient(ellipse 100% 100% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.55) 100%);
}

/* ---------- 开机动画 ---------- */
.boot {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.boot.done {
  opacity: 0;
  visibility: hidden;
}
.boot-text {
  color: var(--green);
  font-size: clamp(13px, 2.4vw, 18px);
  min-height: 6em;
  white-space: pre-wrap;
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.6);
}
.boot-text .cursor::after {
  content: "▮";
  animation: blink 0.8s steps(1) infinite;
  color: var(--green);
}

/* ---------- 布局 ---------- */
.app {
  position: relative;
  z-index: 10;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ---------- 导航 ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
  gap: 12px;
}
.nav-brand {
  color: var(--cyan);
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
}
.nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.5px;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--cyan); }

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: 72px 0 48px;
  position: relative;
}
.hero-avatar {
  font-size: 72px;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(0, 240, 255, 0.5));
  animation: float 4s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.hero-name {
  margin-top: 20px;
  font-size: clamp(34px, 7vw, 64px);
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.55), 0 0 40px rgba(179, 136, 255, 0.35);
}
.glitch { position: relative; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.glitch::before {
  color: var(--magenta);
  transform: translate(-2px, 0);
  animation: glitch-a 2.4s infinite linear alternate-reverse;
  opacity: 0.6;
}
.glitch::after {
  color: var(--cyan);
  transform: translate(2px, 0);
  animation: glitch-b 3.1s infinite linear alternate-reverse;
  opacity: 0.6;
}
@keyframes glitch-a {
  0%, 100% { clip-path: inset(0 0 88% 0); }
  20% { clip-path: inset(40% 0 40% 0); }
  40% { clip-path: inset(70% 0 10% 0); }
  60% { clip-path: inset(20% 0 60% 0); }
  80% { clip-path: inset(50% 0 30% 0); }
}
@keyframes glitch-b {
  0%, 100% { clip-path: inset(60% 0 20% 0); }
  25% { clip-path: inset(10% 0 70% 0); }
  50% { clip-path: inset(30% 0 50% 0); }
  75% { clip-path: inset(80% 0 5% 0); }
}

.hero-role {
  margin-top: 14px;
  color: var(--yellow);
  font-size: 15px;
  letter-spacing: 2px;
}
.hero-tagline {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}
.hero-status {
  display: inline-block;
  margin-top: 20px;
  padding: 6px 14px;
  border: 1px solid var(--green);
  color: var(--green);
  font-size: 12px;
  letter-spacing: 2px;
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(0, 255, 157, 0.25) inset;
  text-shadow: 0 0 8px rgba(0, 255, 157, 0.5);
}

.start-btn {
  display: inline-block;
  margin-top: 34px;
  padding: 16px 40px;
  background: transparent;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  border: 2px solid var(--cyan);
  cursor: pointer;
  border-radius: 2px;
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.3), 0 0 16px rgba(0, 240, 255, 0.3) inset;
  transition: all 0.15s;
}
.start-btn:hover {
  background: var(--cyan);
  color: #000;
  box-shadow: 0 0 40px rgba(0, 240, 255, 0.7);
}
.start-btn-blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- 区块 ---------- */
.section { padding-top: 64px; }
.section-title {
  font-size: clamp(20px, 3.4vw, 28px);
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 28px;
  color: var(--cyan);
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}
.section-title::before { content: "> "; color: var(--magenta); }

/* ---------- 卡片网格 ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
/* 像素化切角 */
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent, var(--cyan)), transparent);
  opacity: 0.8;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent, var(--cyan));
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 18px var(--accent-glow, rgba(0, 240, 255, 0.25));
}

.card-head { display: flex; align-items: center; gap: 14px; }
.card-emoji {
  font-size: 40px;
  line-height: 1;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.15));
}
.card-title { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: 0.5px; }
.card-meta { font-size: 12px; color: var(--muted); }

.card-desc { font-size: 13px; color: var(--muted); flex: 1; }

.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--purple);
  background: rgba(179, 136, 255, 0.06);
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
}
.badge {
  font-size: 11px;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 2px;
  border: 1px solid;
}
.badge.completed, .badge.stable { color: var(--green); border-color: var(--green); background: rgba(0, 255, 157, 0.08); }
.badge.wip { color: var(--yellow); border-color: var(--yellow); background: rgba(255, 230, 0, 0.08); }
.badge.prototype, .badge.beta { color: var(--cyan); border-color: var(--cyan); background: rgba(0, 240, 255, 0.08); }

.play-link {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--yellow);
  border: 1px solid var(--yellow);
  padding: 4px 12px;
  border-radius: 2px;
  transition: all 0.15s;
  white-space: nowrap;
}
.play-link:hover { background: var(--yellow); color: #000; text-shadow: none; }

/* ---------- ABOUT ---------- */
.about-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 28px;
  font-size: 15px;
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.9;
  border-left: 3px solid var(--purple);
}

/* ---------- 社交 ---------- */
.social-row { display: flex; flex-wrap: wrap; gap: 14px; }
.social-chip {
  padding: 12px 22px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--text);
  letter-spacing: 1px;
  font-size: 14px;
  transition: all 0.15s;
  background: var(--panel);
}
.social-chip:hover {
  border-color: var(--magenta);
  color: var(--magenta);
  box-shadow: 0 0 16px rgba(255, 43, 214, 0.25);
  text-shadow: 0 0 6px rgba(255, 43, 214, 0.4);
}

/* ---------- FOOTER ---------- */
.footer {
  margin-top: 72px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  letter-spacing: 1px;
}
.footer .sys { color: var(--green); }

/* ---------- 响应式 ---------- */
@media (max-width: 600px) {
  .hero { padding: 48px 0 32px; }
  .nav { justify-content: center; }
  .grid { grid-template-columns: 1fr; }
}
