:root {
  --bg: #07070d;
  --ink: #f5f5fa;
  --muted: #9a9ab0;
  --line: rgba(255, 255, 255, 0.09);
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.06);
  --a1: #7c5cff;
  --a2: #22d3ee;
  --ok: #2fbf71;
  --grad: linear-gradient(135deg, #7c5cff, #22d3ee);
  --radius: 22px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: -0.02em; }
a { color: inherit; }

/* ---------- background ---------- */
.bg-orbs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(100px); }
.bg-orbs span:nth-child(1) { width: 560px; height: 560px; background: #6d4aff; top: -200px; left: -160px; opacity: 0.32; }
.bg-orbs span:nth-child(2) { width: 460px; height: 460px; background: #1fc8e8; top: 140px; right: -180px; opacity: 0.2; }
.bg-orbs span:nth-child(3) { width: 380px; height: 380px; background: #b026ff; bottom: -180px; left: 40%; opacity: 0.14; }

/* ---------- topbar ---------- */
.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1100px; margin: 0 auto; padding: 20px 24px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 20px; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 10px; background: var(--grad);
  display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 14px;
  box-shadow: 0 6px 18px rgba(124, 92, 255, 0.4);
}
.brand > span { color: var(--a2); }
.topbar nav { display: flex; gap: 6px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; padding: 8px 14px; border-radius: 99px; transition: 0.15s; }
.topbar nav a:hover { color: var(--ink); background: var(--surface-2); }

/* ---------- layout ---------- */
.wrap { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; padding: 8px 24px 64px; }

/* ---------- hero ---------- */
.hero { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding: 56px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 2.5px; color: var(--a2); text-transform: uppercase; margin-bottom: 18px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--a2); box-shadow: 0 0 12px var(--a2); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(36px, 5.4vw, 62px); line-height: 1.03; margin: 0 0 18px; }
.hero h1 .grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 17px; line-height: 1.65; margin: 0 0 26px; max-width: 480px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 13px; padding: 14px 26px; font-size: 15px; font-weight: 700;
  text-decoration: none; border: 0; cursor: pointer; font-family: inherit; transition: 0.18s;
}
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(124, 92, 255, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 42px rgba(124, 92, 255, 0.5); }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--surface-2); border-color: rgba(255, 255, 255, 0.18); }
.btn-ghost.small { padding: 8px 14px; font-size: 13px; }

.stats-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 18px; min-width: 104px; backdrop-filter: blur(12px); }
.stat b { font-family: "Space Grotesk", sans-serif; font-size: 26px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat span { font-size: 11px; color: var(--muted); letter-spacing: 0.4px; }

.hero-art { position: relative; height: 340px; }
.hero-art .orb { position: absolute; border-radius: 50%; }
.hero-art .orb-a { width: 250px; height: 250px; top: 24px; right: 30px; background: conic-gradient(from 0deg, #7c5cff, #22d3ee, #7c5cff); opacity: 0.85; animation: spin 16s linear infinite; filter: blur(2px); }
.hero-art .orb-b { width: 150px; height: 150px; bottom: 6px; left: 16px; background: radial-gradient(circle at 30% 30%, #ffd36e, #ff6a3d); opacity: 0.7; animation: float 6s ease-in-out infinite; filter: blur(6px); }
.hero-art .grid-lines { position: absolute; inset: 0; border-radius: 30px; background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px); background-size: 40px 40px; -webkit-mask-image: radial-gradient(circle at 60% 40%, #000, transparent 70%); mask-image: radial-gradient(circle at 60% 40%, #000, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }

/* ---------- section ---------- */
.section { padding-top: 30px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-sub { color: var(--muted); font-size: 14px; }

/* ---------- game cards ---------- */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.game-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; text-decoration: none; transition: 0.2s; }
.game-card:hover { transform: translateY(-5px); border-color: rgba(124, 92, 255, 0.55); box-shadow: 0 24px 60px rgba(124, 92, 255, 0.22); }
.card-art { position: relative; aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center; font-size: 58px; overflow: hidden; }
.card-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.38), transparent 62%); }
.card-art .ph { position: relative; z-index: 1; filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.35)); transition: 0.25s; }
.game-card:hover .card-art .ph { transform: scale(1.08) rotate(-2deg); }
.thumb-wordle { background: linear-gradient(135deg, #6d4aff, #22d3ee); }
.thumb-2048 { background: linear-gradient(135deg, #ffb347, #ff6a3d); }
.thumb-guess-number { background: linear-gradient(135deg, #2fbf71, #14b8a6); }
.play-badge { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 10px); z-index: 2; background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(8px); color: #fff; font-weight: 800; font-size: 12px; padding: 7px 16px; border-radius: 99px; opacity: 0; transition: 0.2s; }
.game-card:hover .play-badge { opacity: 1; transform: translate(-50%, 0); }
.card-info { padding: 14px 16px 16px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-top h3 { margin: 0; font-size: 18px; }
.card-info p { margin: 6px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.pill { font-size: 10px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--a2); white-space: nowrap; }

/* ---------- game page ---------- */
.game-page { padding-top: 20px; }
.game-cover { position: relative; text-align: center; padding: 56px 24px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; margin-bottom: 22px; }
.cover-glow { position: absolute; inset: -40%; background: radial-gradient(circle at 50% 30%, rgba(124, 92, 255, 0.3), transparent 55%); pointer-events: none; }
.cover-icon { position: relative; font-size: 64px; margin-bottom: 10px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.4)); }
.game-cover h1 { position: relative; font-size: clamp(30px, 5vw, 44px); margin: 0 0 10px; }
.game-cover p { position: relative; color: var(--muted); max-width: 460px; margin: 0 auto 26px; line-height: 1.6; }
.game-cover .btn-primary { position: relative; }
.cover-meta { position: relative; margin-top: 16px; font-size: 11px; color: var(--muted); letter-spacing: 2px; text-transform: uppercase; }

.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0b0b12; }
.frame-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.frame-bar .dots { display: flex; gap: 6px; }
.frame-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #3a3a4a; }
.frame-bar .dots i:nth-child(1) { background: #ff5f57; }
.frame-bar .dots i:nth-child(2) { background: #febc2e; }
.frame-bar .dots i:nth-child(3) { background: #28c840; }
.frame-title { flex: 1; color: var(--muted); font-size: 13px; }
.frame iframe { display: block; width: 100%; height: 76vh; min-height: 480px; border: 0; background: #000; }

/* ---------- prose ---------- */
.prose { max-width: 720px; margin: 0 auto; line-height: 1.8; color: #d6d6e4; padding-top: 20px; }
.prose h1, .prose h2 { color: var(--ink); }
.prose h2 { margin-top: 30px; }
.prose a { color: var(--a2); }
.post-list { list-style: none; padding: 0; }
.post-list li { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; }
.post-list a { font-weight: 700; color: var(--ink); text-decoration: none; font-size: 17px; }
.post-list p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.sw { display: inline-block; width: 13px; height: 13px; border-radius: 4px; margin-right: 8px; vertical-align: middle; }
.sw-correct { background: #2fbf71; }
.sw-present { background: #d9a441; }
.sw-absent { background: #3a3a4a; }
.muted { color: var(--muted); }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; text-align: center; color: #3f3f52; font-size: 12px; padding: 40px 0 30px; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding: 34px 0 24px; }
  .hero-art { display: none; }
  .topbar { padding: 14px 18px; }
  .wrap { padding: 8px 18px 40px; }
  .game-cover { padding: 40px 18px; }
  .frame iframe { height: 70vh; min-height: 420px; }
}

[hidden] { display: none !important; }
