:root {
  --ink: #12151a;
  --paper: #e8ecef;
  --paper-2: #d7dee5;
  --mist: #f4f7fa;
  --cobalt: #2563eb;
  --lime: #c8f000;
  --teal: #0f766e;
  --muted: #5b6570;
  --line: rgba(18, 21, 26, 0.12);
  --radius: 0;
  --font-display: "Syne", "Segoe UI", sans-serif;
  --font-body: "DM Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-soft: 0 24px 60px rgba(18, 21, 26, 0.14);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.site-nav {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3.5rem);
  color: #f4f7fa;
}

.brand-mark {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.92rem;
  opacity: 0.92;
}

.nav-links a:hover {
  color: var(--lime);
}

/* ===== Hero: 压矮，露出下方入口，避免误以为整页只有这段 ===== */
.hero {
  position: relative;
  min-height: 0;
  height: clamp(320px, 52vh, 520px);
  display: grid;
  align-items: end;
  overflow: clip;
  color: #f4f7fa;
  background: #12151a;
}

.hero-visual {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(200, 240, 0, 0.18), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.35), transparent 36%),
    linear-gradient(135deg, #0d1117 0%, #1a2230 48%, #0f766e 140%);
  transform: scale(1.04);
  animation: heroDrift 18s ease-in-out infinite alternate;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 247, 250, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 247, 250, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 35%, transparent 95%);
}

.hero-visual.has-cover {
  background-size: cover;
  background-position: center;
  animation: none;
  transform: none;
}

.hero-visual.has-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 21, 26, 0.35) 0%, rgba(18, 21, 26, 0.78) 55%, rgba(18, 21, 26, 0.94) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  max-width: 100%;
  padding: 4.25rem clamp(1.25rem, 4vw, 3.5rem) 1.75rem;
  box-sizing: border-box;
  container-type: inline-size;
  container-name: hero;
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.55rem, 6.8cqi, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
  max-width: 100%;
  white-space: nowrap;
  animation: riseIn 0.9s ease both;
}

.hero-title {
  margin: 0 0 0.55rem;
  max-width: min(22em, 100%);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 3.4cqi + 0.55rem, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  animation: riseIn 1s ease 0.1s both;
}

.hero-desc {
  margin: 0 0 1.1rem;
  max-width: min(38em, 100%);
  color: rgba(244, 247, 250, 0.82);
  font-size: clamp(0.9rem, 2.2cqi + 0.5rem, 1rem);
  animation: riseIn 1s ease 0.18s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: riseIn 1s ease 0.26s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.6rem 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--lime);
  color: var(--ink);
}

.btn-ghost {
  border: 1.5px solid rgba(244, 247, 250, 0.55);
  color: #f4f7fa;
}

.btn-ghost:hover {
  background: rgba(244, 247, 250, 0.08);
}

.btn-dark {
  background: var(--ink);
  color: #f4f7fa;
}

.btn-outline {
  border: 1.5px solid var(--ink);
}

.section {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: clamp(2.4rem, 5vw, 3.75rem) clamp(1.25rem, 4vw, 3.5rem);
}

.portals .section {
  padding-top: clamp(1.75rem, 3.5vw, 2.5rem);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.section-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 700;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.6vw + 0.6rem, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  max-width: 100%;
  overflow-wrap: break-word;
}

.section-note {
  margin: 0;
  color: var(--muted);
  max-width: 28ch;
  font-size: 0.95rem;
}

/* Portal entries */
.portals {
  background: var(--mist);
}

.portal-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1rem;
}

.portal {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  padding: 1.35rem;
  border: 1.5px solid var(--line);
  background: #fff;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.portal:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
}

.portal-main {
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.08), transparent 48%),
    #fff;
}

.portal-ai {
  background:
    linear-gradient(160deg, rgba(15, 118, 110, 0.12), transparent 50%),
    #fff;
}

.portal-tag {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cobalt);
}

.portal-ai .portal-tag {
  color: var(--teal);
}

.portal h3 {
  margin: 0 0 0.6rem;
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}

.portal p {
  margin: 0;
  color: var(--muted);
  max-width: 34ch;
}

.portal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2rem;
  font-weight: 700;
}

.portal-status {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.portal-status.ok {
  color: var(--teal);
}

.portal-status.warn {
  color: #b45309;
}

/* Featured games */
.games-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}

.game-tile {
  display: block;
  border: 1.5px solid var(--line);
  background: #fff;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.game-tile:hover {
  transform: translateY(-3px);
}

.game-tile img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--paper-2);
}

.game-tile span {
  display: block;
  padding: 0.75rem 0.85rem 0.95rem;
  font-weight: 700;
  font-size: 0.95rem;
}

/* Solutions */
.solutions {
  background: #12151a;
  color: #f4f7fa;
}

.solutions .section-kicker {
  color: var(--lime);
}

.solutions .section-note {
  color: rgba(244, 247, 250, 0.65);
}

.sol-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.sol-item {
  display: flex;
  flex-direction: column;
  border: 1.5px solid rgba(244, 247, 250, 0.14);
  background: rgba(244, 247, 250, 0.03);
  min-height: 100%;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.sol-item:hover {
  border-color: var(--lime);
  transform: translateY(-3px);
}

.sol-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.sol-body {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.1rem 1.15rem 1.25rem;
  flex: 1;
}

.sol-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sol-tags span {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(244, 247, 250, 0.7);
  border: 1px solid rgba(244, 247, 250, 0.2);
  padding: 0.15rem 0.45rem;
}

.sol-item h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
}

.sol-item p {
  margin: 0;
  color: rgba(244, 247, 250, 0.7);
  font-size: 0.92rem;
  flex: 1;
}

.sol-price {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
}

.sol-price strong {
  font-size: 1.35rem;
  color: var(--lime);
}

.sol-price s {
  color: rgba(244, 247, 250, 0.4);
  font-size: 0.9rem;
}

.sol-actions {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.35rem;
}

.sol-actions .btn {
  min-height: 2.55rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  flex: 1;
}

.sol-actions .btn-primary {
  background: var(--lime);
  color: var(--ink);
}

.sol-actions .btn-ghost {
  border-color: rgba(244, 247, 250, 0.35);
}

/* Contact / ad */
.contact-panel {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 1.25rem;
  align-items: stretch;
}

.contact-copy {
  padding: 1.8rem;
  background: #fff;
  border: 1.5px solid var(--line);
}

.contact-copy h3 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  white-space: pre-line;
  line-height: 1.35;
}

.contact-copy p {
  margin: 0 0 0.7rem;
  color: var(--muted);
  white-space: pre-line;
}

.contact-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.4rem;
  background: var(--ink);
  color: #f4f7fa;
  text-align: center;
}

.contact-qr img {
  width: min(220px, 70%);
  background: #fff;
  padding: 0.55rem;
}

.contact-qr strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

/* Fun strip */
.fun-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.fun-box {
  padding: 1.25rem 1.3rem;
  border: 1.5px solid var(--line);
  background: #fff;
}

.fun-box h4 {
  margin: 0 0 0.55rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.fun-box p,
.fun-box pre {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.fun-box pre {
  font-family: "IBM Plex Mono", Consolas, monospace;
  white-space: pre-wrap;
  line-height: 1.45;
}

.ticker {
  overflow: hidden;
  border-block: 1.5px solid var(--line);
  background: var(--lime);
  color: var(--ink);
}

.ticker-track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  padding: 0.7rem 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  animation: marquee 22s linear infinite;
}

.site-footer {
  padding: 2rem clamp(1.25rem, 4vw, 3.5rem) 2.5rem;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer .site-icp {
  color: var(--muted);
  text-decoration: none;
  width: 100%;
  text-align: center;
  margin-top: 0.25rem;
}

.site-footer .site-icp:hover {
  color: var(--ink);
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.08) translate3d(-1.5%, 1%, 0);
  }
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@supports not (font-size: 1cqi) {
  .hero-brand {
    font-size: clamp(1.6rem, 6.2vw, 4.6rem);
  }
  .hero-title {
    font-size: clamp(1.25rem, 3.2vw + 0.5rem, 2.15rem);
  }
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .portal-grid,
  .sol-grid,
  .games-strip,
  .contact-panel,
  .fun-strip {
    grid-template-columns: 1fr;
  }

  .games-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero {
    height: clamp(280px, 48vh, 420px);
  }

  .hero-brand {
    font-size: clamp(1.5rem, 7.5vw, 2.8rem);
  }

  .contact-copy h3 {
    font-size: clamp(1.25rem, 4.5vw, 1.7rem);
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual,
  .ticker-track,
  .cta-row,
  .hero-brand,
  .hero-title,
  .hero-desc {
    animation: none !important;
  }
}
