/* ===== NEON·PLAY — 暗色霓虹游戏聚合站 ===== */
:root {
  --bg: #0b0d15;
  --bg-2: #11141f;
  --card: #151a29;
  --line: rgba(255, 255, 255, .08);
  --text: #eef1f7;
  --muted: #8a92a6;
  --neon: #22d3ee;
  --neon-2: #a78bfa;
  --accent: #f472b6;
  --gold: #fbbf24;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
img { display: block; width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }

/* --- 背景 --- */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(120, 140, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, .05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}
.glow {
  position: fixed; z-index: -1; border-radius: 50%;
  filter: blur(90px); opacity: .35; pointer-events: none;
}
.glow-a { width: 480px; height: 480px; top: -140px; right: -80px;
  background: radial-gradient(circle, var(--neon), transparent 70%); }
.glow-b { width: 420px; height: 420px; top: 20vh; left: -120px;
  background: radial-gradient(circle, var(--neon-2), transparent 70%); }

/* --- 顶栏 --- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 6vw;
  background: rgba(11, 13, 21, .72);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.logo {
  font-weight: 800; letter-spacing: .12em; font-size: 17px;
  text-shadow: 0 0 18px rgba(34, 211, 238, .5);
}
.logo .dot { color: var(--neon); }
.links { display: flex; gap: 22px; font-size: 14px; color: var(--muted); }
.links a { transition: color .2s; }
.links a:hover { color: var(--neon); }
.search {
  margin-left: auto; display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--muted); transition: border-color .2s, box-shadow .2s;
}
.search:focus-within { border-color: var(--neon); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.search input {
  background: none; border: 0; outline: 0; color: var(--text);
  font-size: 14px; width: 140px;
}
.search input::placeholder { color: var(--muted); }

/* --- Hero --- */
.hero { padding: 90px 6vw 70px; max-width: 1180px; margin: 0 auto; }
.kicker {
  color: var(--neon); font-size: 13px; letter-spacing: .28em;
  text-transform: uppercase; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(42px, 7.5vw, 84px); line-height: 1.06;
  font-weight: 800; letter-spacing: -.02em;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--neon), var(--neon-2), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 24px rgba(34, 211, 238, .35));
}
.intro { margin-top: 20px; color: var(--muted); max-width: 520px; font-size: 16px; }
.cta { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 26px; border-radius: 12px; font-weight: 600; font-size: 15px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.btn.primary {
  color: #061018;
  background: linear-gradient(100deg, var(--neon), var(--neon-2));
  box-shadow: 0 8px 28px rgba(34, 211, 238, .3);
}
.btn.primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(34, 211, 238, .45); }
.btn.ghost { border: 1px solid var(--line); color: var(--text); background: var(--bg-2); }
.btn.ghost:hover { border-color: var(--neon); transform: translateY(-2px); }
.btn.wide { width: 100%; margin-top: 14px; }
.stats { display: flex; gap: 48px; margin-top: 56px; flex-wrap: wrap; }
.stats strong { display: block; font-size: 34px; font-weight: 800; color: var(--neon); }
.stats span { font-size: 13px; color: var(--muted); letter-spacing: .1em; }

/* --- 游戏库 --- */
.lib { max-width: 1180px; margin: 0 auto; padding: 20px 6vw 80px; }
.lib-head { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.sec-title { font-size: 26px; font-weight: 800; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  padding: 7px 16px; border-radius: 999px; font-size: 13px;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--muted);
  transition: all .18s;
}
.chip:hover { border-color: var(--neon); color: var(--text); }
.chip.active {
  background: linear-gradient(100deg, var(--neon), var(--neon-2));
  color: #061018; border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 16px rgba(34, 211, 238, .35);
}
.lib-body { display: grid; grid-template-columns: 1fr 280px; gap: 28px; align-items: start; }

/* 游戏卡片 */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gcard {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .22s, border-color .22s, box-shadow .22s;
  cursor: pointer;
}
.gcard:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, .5);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5), 0 0 24px rgba(34, 211, 238, .12);
}
.gcard .cover { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.gcard .cover img { height: 100%; object-fit: cover; transition: transform .5s ease; }
.gcard:hover .cover img { transform: scale(1.07); }
.gcard .badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 700;
  background: rgba(11, 13, 21, .75); backdrop-filter: blur(6px);
  color: var(--neon); letter-spacing: .08em;
}
.gcard .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(11, 13, 21, .45); opacity: 0; transition: opacity .22s;
  font-size: 13px; font-weight: 700; letter-spacing: .12em;
}
.gcard .play span {
  padding: 10px 20px; border-radius: 999px;
  background: linear-gradient(100deg, var(--neon), var(--neon-2)); color: #061018;
}
.gcard:hover .play { opacity: 1; }
.gcard .meta { padding: 14px 16px 16px; }
.gcard h3 { font-size: 15.5px; font-weight: 700; }
.gcard .row { display: flex; align-items: center; gap: 10px; margin-top: 7px; font-size: 12.5px; color: var(--muted); }
.gcard .score { color: var(--gold); font-weight: 700; }
.gcard .players { margin-left: auto; }

/* 侧栏 */
.side { position: sticky; top: 84px; display: grid; gap: 18px; }
.side-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; letter-spacing: .06em; }
.rank, .news-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
}
.rank { list-style: none; }
.rank li {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 0; font-size: 13.5px;
  border-bottom: 1px solid var(--line);
}
.rank li:last-child { border-bottom: 0; }
.rank .no {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: var(--muted); background: var(--bg-2);
}
.rank li:nth-child(1) .no { background: var(--gold); color: #1a1200; }
.rank li:nth-child(2) .no { background: #cbd5e1; color: #1a1200; }
.rank li:nth-child(3) .no { background: #b45309; color: #fff; }
.rank .r-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .r-hot { margin-left: auto; color: var(--accent); font-size: 12px; font-weight: 700; }
.news-card ul { list-style: none; }
.news-card li {
  font-size: 12.5px; color: var(--muted); padding: 7px 0;
  border-bottom: 1px dashed var(--line);
}
.news-card li:last-child { border: 0; }
.news-card time { color: var(--neon); margin-right: 8px; font-size: 11.5px; }
.empty { text-align: center; color: var(--muted); padding: 60px 0; font-size: 15px; }

/* --- 页脚 --- */
.foot {
  text-align: center; padding: 56px 6vw 44px;
  border-top: 1px solid var(--line);
}
.foot p:first-child { font-size: 18px; font-weight: 600; }
.foot .copy { margin-top: 12px; font-size: 12.5px; color: var(--muted); }

/* --- 弹窗小游戏 --- */
.modal {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 20px;
  background: rgba(6, 8, 14, .78); backdrop-filter: blur(10px);
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.modal.open { opacity: 1; pointer-events: auto; }
.panel {
  width: min(680px, 100%); background: var(--bg-2);
  border: 1px solid rgba(34, 211, 238, .35); border-radius: 22px;
  padding: 28px; position: relative;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 40px rgba(34, 211, 238, .12);
  transform: translateY(14px); transition: transform .25s;
}
.modal.open .panel { transform: none; }
.m-close {
  position: absolute; top: 14px; right: 16px;
  font-size: 22px; color: var(--muted); width: 34px; height: 34px;
  border-radius: 8px; transition: all .15s;
}
.m-close:hover { color: var(--text); background: var(--card); }
.panel h3 { font-size: 20px; font-weight: 800; }
.m-sub { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }
.m-hud { display: flex; gap: 28px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.m-hud b { color: var(--neon); font-size: 16px; margin-left: 4px; }
#m-canvas {
  width: 100%; border-radius: 14px; display: block;
  background: #0a0c13; border: 1px solid var(--line); cursor: crosshair;
}

/* --- 滚动显现 --- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* --- 响应式 --- */
@media (max-width: 960px) {
  .lib-body { grid-template-columns: 1fr; }
  .side { position: static; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .links { display: none; }
  .search input { width: 100px; }
  .grid { grid-template-columns: 1fr; }
  .stats { gap: 28px; }
  .hero { padding-top: 60px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
