/* ============================================================
   JieMoo.dev — 暗色科技感 设计令牌
   ============================================================ */
:root {
  --bg: #06080f;
  --surface: #0b1120;
  --surface-2: #101731;
  --line: rgba(130, 150, 210, 0.14);
  --line-strong: rgba(130, 150, 210, 0.28);
  --text: #e6ebf6;
  --muted: #8b93ac;
  --accent: #63f2d3;
  --accent-dim: rgba(99, 242, 211, 0.12);
  --accent-2: #9a8cff;
  --warn: #ffb547;

  --font-display: 'Chakra Petch', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;

  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
  --nav-h: 64px;
}

/* ============ 基础 ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul {
  margin: 0;
}

ul {
  padding: 0;
  list-style: none;
}

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

button {
  font: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
}

img, canvas {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--accent);
  color: #04120f;
}

/* ============ 布局容器 ============ */
.nav-inner,
.hero-inner,
.section,
.footer-inner,
.footer-bottom {
  width: min(var(--maxw), 100% - 40px);
  margin-inline: auto;
}

/* ============ 导航 ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-logo-mark {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a:not(.nav-cta) {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  color: var(--muted);
  transition: color 0.18s ease, background 0.18s ease;
}

.nav-links a:not(.nav-cta):hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-cta {
  margin-left: 10px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.nav-cta:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.nav-burger span {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.is-open span:nth-child(2) { opacity: 0; }
.nav-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  z-index: 0;
  width: 640px;
  height: 640px;
  top: -180px;
  right: -120px;
  background: radial-gradient(circle at center,
    rgba(99, 242, 211, 0.13) 0%,
    rgba(154, 140, 255, 0.07) 42%,
    transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: 72px;
}

.terminal {
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.terminal-prompt {
  color: var(--accent);
  margin-right: 8px;
}

.terminal-cmd {
  color: #c6cfe2;
}

.terminal-line {
  min-height: 21px;
  margin-bottom: 28px;
}

.cursor {
  display: inline-block;
  width: 9px;
  height: 16px;
  margin-left: 3px;
  vertical-align: -3px;
  background: var(--accent);
}

.cursor.blink {
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 22px;
}

.hero-accent {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(99, 242, 211, 0.35);
}

.hero-sub {
  max-width: 46ch;
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-arrow {
  transition: transform 0.18s ease;
  display: inline-block;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

.btn-primary {
  background: var(--accent);
  color: #04120f;
  box-shadow: 0 8px 30px rgba(99, 242, 211, 0.22);
}

.btn-primary:hover {
  background: #7df7dd;
}

.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-2);
  color: var(--accent-2);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-chips li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 13px;
}

.hero-chips li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 1px;
}

/* Hero 入场动画 */
.hero-inner > * {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-in 0.7s ease forwards;
}

.hero-inner > :nth-child(1) { animation-delay: 0.05s; }
.hero-inner > :nth-child(2) { animation-delay: 0.45s; }
.hero-inner > :nth-child(3) { animation-delay: 0.65s; }
.hero-inner > :nth-child(4) { animation-delay: 0.85s; }
.hero-inner > :nth-child(5) { animation-delay: 1.05s; }
.hero-inner > :nth-child(6) { animation-delay: 1.2s; }

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

/* ============ 通用区块 ============ */
.section {
  padding-block: 96px;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 52px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 14px;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--accent);
  vertical-align: 4px;
  margin-right: 10px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.section-desc {
  color: var(--muted);
  font-size: 15.5px;
}

/* ============ 游戏板块 ============ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface) 0%, rgba(11, 17, 32, 0.5) 100%);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
  overflow: hidden;
}

.game-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 160px at 50% 0%,
    rgba(99, 242, 211, 0.07), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}

.game-card:hover::after {
  opacity: 1;
}

.game-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.game-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--accent-dim);
  font-size: 24px;
  color: var(--accent);
}

.game-icon-code {
  position: absolute;
  bottom: 4px;
  right: 6px;
  font-family: var(--font-mono);
  font-size: 9px;
  color: var(--muted);
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
}

.badge-playable { color: var(--accent); border-color: rgba(99, 242, 211, 0.4); background: var(--accent-dim); }
.badge-building { color: var(--warn); border-color: rgba(255, 181, 71, 0.4); background: rgba(255, 181, 71, 0.1); }
.badge-soon { color: var(--accent-2); border-color: rgba(154, 140, 255, 0.4); background: rgba(154, 140, 255, 0.1); }

.game-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.01em;
}

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

.game-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-tags li {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
}

.game-enter {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* 空位占位(等确定要放的游戏后替换成 .game-card) */
.slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.015);
  color: var(--muted);
  text-align: center;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.slot:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.slot-plus {
  font-size: 28px;
  line-height: 1;
  color: var(--line-strong);
  transition: color 0.22s ease, transform 0.22s ease;
}

.slot:hover .slot-plus {
  color: var(--accent);
  transform: rotate(90deg);
}

.slot-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.slot-desc {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* ============ 博客 ============ */
.blog-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.post-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-2);
}

.post-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.post-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.35;
}

.post-excerpt {
  font-size: 14px;
  color: var(--muted);
  flex: 1;
}

.post-more {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

/* ============ 页脚 ============ */
.footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(99, 242, 211, 0.03));
}

.footer-inner {
  padding-block: 72px 48px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
}

.footer-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 14px;
}

.footer-bio {
  color: var(--muted);
  max-width: 46ch;
}

.footer-socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color 0.18s ease, background 0.18s ease;
}

.social:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.social-label {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--accent);
  min-width: 64px;
}

.social-handle {
  font-size: 14.5px;
  color: var(--text);
  flex: 1;
}

.social .btn-arrow {
  color: var(--muted);
}

.social:hover .btn-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

/* 「保密」状态:仿"机密文件"效果 —— 模糊不可读 + 周期扫描线,悬停显影 */
.social.is-secret {
  position: relative;
  overflow: hidden;
}

.social.is-secret:hover {
  border-color: var(--line);
  background: transparent;
  cursor: default;
}

.social.is-secret .social-handle {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--muted);
  filter: blur(5px);
  opacity: 0.9;
  transition: filter 0.35s ease, color 0.35s ease, text-shadow 0.35s ease, letter-spacing 0.35s ease;
}

.social.is-secret:hover .social-handle {
  filter: blur(0);
  color: var(--accent);
  text-shadow: 0 0 14px rgba(99, 242, 211, 0.55);
}

.social.is-secret::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -40%;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(99, 242, 211, 0.13), transparent);
  animation: secret-scan 3.6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes secret-scan {
  0% { top: -40%; opacity: 0; }
  12% { opacity: 1; }
  50% { top: 110%; }
  72% { opacity: 0; }
  100% { top: 110%; opacity: 0; }
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(99, 242, 211, 0.8);
  animation: pulse 2.4s ease-in-out infinite;
}

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

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .games-grid,
  .blog-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .nav-burger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 20px 20px;
    background: rgba(6, 8, 15, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }

  .nav-links.is-open {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .section {
    padding-block: 72px;
  }
}

@media (max-width: 620px) {
  .games-grid,
  .blog-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    padding-block: 56px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* ============ 减弱动态效果 ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-inner > * {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .cursor.blink,
  .dot,
  .social.is-secret::after {
    animation: none;
  }

  .social.is-secret .social-handle {
    filter: none;
  }

  .game-card,
  .post-card,
  .btn,
  .btn-arrow {
    transition: none;
  }
}
