:root {
  --bg: #0e1116;
  --bg-alt: #141921;
  --surface: #1a2029;
  --surface-2: #222b36;
  --border: #2b3542;
  --text: #e6edf3;
  --text-dim: #9aa7b4;
  --accent: #4ea1ff;
  --accent-2: #7c5cff;
  --radius: 14px;
  --maxw: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: rgba(14, 17, 22, 0.72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav__brand { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.nav__brand:hover { text-decoration: none; }
.nav__links { display: flex; gap: 20px; }
.nav__links a { color: var(--text-dim); font-size: 0.92rem; }
.nav__links a:hover { color: var(--text); text-decoration: none; }

/* HERO */
.hero {
  position: relative; min-height: 92vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 110px 24px 120px;
  background:
    radial-gradient(circle at 20% 20%, rgba(124, 92, 255, 0.25), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(78, 161, 255, 0.22), transparent 45%),
    linear-gradient(160deg, #0e1116 0%, #131a24 100%);
  background-color: var(--bg);
}
.hero__overlay {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black, transparent 75%);
}
.hero__inner { position: relative; max-width: 860px; }
.hero__eyebrow { letter-spacing: 0.32em; font-size: 0.72rem; color: var(--accent); margin-bottom: 18px; }
.hero__title { font-size: clamp(2.1rem, 6vw, 4rem); line-height: 1.1; font-weight: 800; }
.hero__about { margin-top: 28px; text-align: left; }
.hero__about p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 14px; }
.hero__about strong { color: var(--text); }
.hero__sub { margin-top: 20px; color: var(--text-dim); font-size: clamp(0.95rem, 2.4vw, 1.15rem); }
.hero__cta { margin-top: 34px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__scroll { position: absolute; bottom: 26px; font-size: 0.8rem; color: var(--text-dim); animation: bob 2s infinite; }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* BUTTONS */
.btn {
  display: inline-block; padding: 11px 24px; border-radius: 999px;
  font-weight: 600; font-size: 0.95rem; transition: transform .15s ease, background .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #07121f; }
.btn--ghost { border: 1px solid var(--border); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); }

/* SECTIONS */
.section { max-width: var(--maxw); margin: 0 auto; padding: 90px 24px; }
.section--alt { background: var(--bg-alt); max-width: none; }
.section--alt > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.section__head { margin-bottom: 34px; }
.section__title { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; }
.section__title::after { content: ""; display: block; width: 54px; height: 4px; margin-top: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.section__desc { margin-top: 14px; color: var(--text-dim); max-width: 640px; }

/* FILTERS */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter {
  background: var(--surface); color: var(--text-dim); border: 1px solid var(--border);
  padding: 8px 18px; border-radius: 999px; cursor: pointer; font-size: 0.9rem; transition: all .18s ease;
}
.filter:hover { color: var(--text); border-color: var(--accent); }
.filter.is-active { background: var(--accent); color: #07121f; border-color: var(--accent); font-weight: 600; }

/* GALLERY (masonry via CSS columns) */
.gallery { column-count: 3; column-gap: 16px; }
@media (max-width: 920px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }

.card {
  position: relative; break-inside: avoid; margin-bottom: 16px;
  border-radius: var(--radius); overflow: hidden; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  transform: translateY(0); transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,0.45); }
.card img { display: block; width: 100%; height: auto; background: var(--surface-2); }
.card__meta {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 16px;
  background: linear-gradient(transparent, rgba(7,10,15,0.85));
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
}
.card:hover .card__meta { opacity: 1; transform: translateY(0); }
.card__title { font-weight: 600; font-size: 0.95rem; }
.card__cat { font-size: 0.72rem; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; }
.card.is-hidden { display: none; }

/* GAMES */
.games { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.game {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s ease, border-color .2s ease;
}
.game:hover { transform: translateY(-4px); border-color: var(--accent); }
.game__thumb { height: 150px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.game__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform .35s ease, opacity .25s ease; }
.game:hover .game__shot { transform: scale(1.06); opacity: 1; }
.game__thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(7,10,15,.15) 0%, rgba(7,10,15,.72) 100%);
}
.game__thumb--a { background: linear-gradient(135deg, #1f2a3a, #2c3e57); }
.game__thumb--b { background: linear-gradient(135deg, #3a1f2a, #572c3e); }
.game__thumb--c { background: linear-gradient(135deg, #1f3a2f, #2c5743); }
.game__thumb--d { background: linear-gradient(135deg, #2a2140, #3e2c57); }
.game__thumb--e { background: radial-gradient(circle at 32% 34%, #2f5d7c, #16222e 62%), linear-gradient(135deg, #12303f, #1d4a5e); }
.game__thumb--f { background: linear-gradient(135deg, #3d3418, #6b5a24); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); }
.game__thumb h3 { font-size: 1.4rem; font-weight: 800; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.6); position: relative; z-index: 2; }
.game__badge { position: absolute; top: 12px; right: 12px; z-index: 2; font-size: 0.68rem; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,0.55); color: var(--text-dim); border: 1px solid var(--border); backdrop-filter: blur(4px); }
.game__body { padding: 16px 18px 20px; }
.game__name { font-weight: 700; font-size: 1.05rem; }
.game__tag { color: var(--accent); font-size: 0.8rem; margin: 4px 0 10px; }
.game__desc { color: var(--text-dim); font-size: 0.88rem; flex: 1; }
.game__link { margin-top: 14px; display: inline-block; font-weight: 600; font-size: 0.9rem; }

/* ABOUT（已并入首屏，保留 .about__stack 供 hero 使用） */
.about__stack { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; justify-content: center; }
.about__stack li { background: var(--surface); border: 1px solid var(--border); padding: 7px 14px; border-radius: 8px; font-size: 0.85rem; color: var(--text); }

/* FOOTER */
.footer { text-align: center; padding: 36px 24px; border-top: 1px solid var(--border); color: var(--text-dim); font-size: 0.85rem; }
.footer__note { margin-top: 6px; font-size: 0.75rem; opacity: 0.7; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center;
  background: rgba(5, 8, 12, 0.92); backdrop-filter: blur(4px);
}
.lightbox.is-open { display: flex; }
.lightbox__fig { max-width: 92vw; max-height: 88vh; display: flex; flex-direction: column; align-items: center; }
.lightbox__fig img { max-width: 92vw; max-height: 80vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }
.lightbox__fig figcaption { margin-top: 12px; color: var(--text-dim); font-size: 0.9rem; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,0.08); color: #fff; border: none;
  cursor: pointer; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background .15s ease;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.2); }
.lightbox__close { top: 22px; right: 22px; width: 44px; height: 44px; font-size: 1.2rem; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; transition: none !important; }
}
