:root {
  --bg: #07080f;
  --bg-elevated: #0e1119;
  --surface: rgba(18, 22, 34, 0.72);
  --surface-solid: #121622;
  --text: #f2f4f8;
  --muted: #8b95a8;
  --muted-soft: #5c667a;
  --accent: #ff6b4a;
  --accent-soft: rgba(255, 107, 74, 0.15);
  --accent-glow: rgba(255, 107, 74, 0.35);
  --cyan: #4dd4c4;
  --cyan-soft: rgba(77, 212, 196, 0.12);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --max: 1120px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", sans-serif;
  --font-display: "Outfit", var(--font);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.page-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 107, 74, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(77, 212, 196, 0.1), transparent 50%),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(100, 80, 255, 0.08), transparent 45%),
    var(--bg);
}

.page-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #7ee8dc;
}

img {
  max-width: 100%;
  height: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  background: rgba(7, 8, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.3;
  max-width: 220px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-mark:hover {
  color: var(--text);
  opacity: 0.92;
}

.brand-mark__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  object-fit: contain;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.navlinks {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.navlinks a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}

.navlinks a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.navlinks a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

.lang-picker {
  display: inline-flex;
  gap: 2px;
  margin-left: 4px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
}

.lang-picker__btn {
  background: transparent;
  border: none;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 10px;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  transition: color 0.2s, background 0.2s;
}

.lang-picker__btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.lang-picker__btn.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

/* —— Layout —— */
main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px 80px;
}

.section {
  margin-top: 56px;
}

.section-head {
  margin-bottom: 20px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  max-width: 560px;
}

/* —— Hero —— */
.hero {
  padding: 56px 0 32px;
  display: grid;
  gap: 40px;
  align-items: center;
}

.hero--home {
  grid-template-columns: 1fr;
  padding-top: 48px;
  padding-bottom: 16px;
}

@media (min-width: 900px) {
  .hero--home {
    grid-template-columns: 1.1fr 0.9fr;
    min-height: 420px;
    padding-top: 64px;
  }

  .hero--home .hero__visual {
    margin: 0 0 0 auto;
  }
}

/* Chinese hero title: avoid awkward mid-word wrap; prefer one line on desktop */
@media (min-width: 900px) {
  html[lang="zh-CN"] .hero--home {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
  }

  html[lang="zh-CN"] .hero--home h1 {
    font-size: clamp(1.85rem, 2.45vw, 2.35rem);
    line-height: 1.12;
    text-wrap: balance;
  }
}

@media (min-width: 1100px) {
  html[lang="zh-CN"] .hero--home h1 {
    white-space: nowrap;
    font-size: clamp(1.9rem, 2.1vw, 2.25rem);
  }
}

.hero--compact {
  padding: 48px 0 24px;
}

.hero--compact h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  padding: 6px 14px 6px 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-soft);
  border: 1px solid rgba(77, 212, 196, 0.25);
  border-radius: 999px;
}

.hero__eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 20px;
  background: linear-gradient(180deg, #fff 0%, rgba(242, 244, 248, 0.85) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero--game h1 {
  background: linear-gradient(135deg, #fff 0%, var(--accent) 120%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero--game .hero__content {
  max-width: 960px;
}

.hero--game .hero__content > p {
  max-width: none;
}

html[lang="zh-CN"] .hero--game .hero__content > p {
  word-break: keep-all;
  line-break: strict;
  text-wrap: pretty;
}

.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 0 28px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero__visual {
  position: relative;
  aspect-ratio: 1;
  max-width: 320px;
  max-height: 320px;
  margin: 0 auto;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid rgba(255, 196, 80, 0.35);
  background: #0a0c12;
  box-shadow:
    var(--shadow),
    0 0 60px rgba(255, 140, 60, 0.12);
}

.hero__visual--game {
  display: grid;
  place-items: center;
  padding: 12px;
}

.hero__game-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  color: #0a0a0a;
  background: linear-gradient(135deg, #ff8a70, var(--accent));
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-primary:hover {
  color: #0a0a0a;
  box-shadow: 0 12px 40px var(--accent-glow);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
}

.btn-ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
}

/* —— Cards —— */
.card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 32px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  border-color: var(--border-strong);
}

.card h2,
.card h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.card h2 {
  margin: 0 0 14px;
  font-size: 1.35rem;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: var(--text);
}

.card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.card p:last-child {
  margin-bottom: 0;
}

.card--highlight {
  border-color: rgba(255, 107, 74, 0.25);
  background: linear-gradient(
    145deg,
    rgba(255, 107, 74, 0.08) 0%,
    var(--surface) 45%
  );
}

.card-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 640px) {
  .card-grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* —— Homepage game list —— */
.games-showcase {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .games-showcase {
    grid-template-columns: repeat(2, 1fr);
    align-items: stretch;
  }
}

/* —— Featured game block —— */
.game-spotlight {
  display: grid;
  gap: 28px;
  align-items: start;
}

@media (min-width: 768px) {
  .game-spotlight {
    grid-template-columns: auto 1fr;
    gap: 32px;
  }
}

.game-spotlight__art {
  width: 100%;
  max-width: 200px;
  aspect-ratio: 1;
  border-radius: 22px;
  overflow: hidden;
  border: 2px solid rgba(255, 196, 80, 0.3);
  background: #0a0c12;
  box-shadow: var(--shadow);
}

.game-spotlight__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.game-title-banner {
  margin: 0 0 16px;
  max-width: 960px;
}

.game-title-banner img {
  display: block;
  width: min(100%, 960px);
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  margin-top: 8px;
}

.link-arrow:hover {
  gap: 10px;
}

/* —— Badges & features —— */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.badge:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.feature-list li {
  position: relative;
  padding: 14px 16px 14px 44px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* —— Contact —— */
.contact-grid {
  display: grid;
  gap: 16px;
}

@media (min-width: 560px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-item {
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.contact-item strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 6px;
}

.contact-item span,
.contact-item a {
  font-size: 15px;
  color: var(--text);
  word-break: break-word;
}

/* —— Legal / prose —— */
.prose-card p {
  margin-bottom: 1.1em;
}

.prose-card p:last-child {
  margin-bottom: 0;
}

.hero__meta {
  font-size: 15px;
  color: var(--muted-soft);
}

.prose-card h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 2rem 0 0.75rem;
}

.prose-card h2:first-child {
  margin-top: 0;
}

.prose-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.25rem 0 0.5rem;
}

.prose-card ul,
.prose-card ol {
  margin: 0 0 1.1em;
  padding-left: 1.35em;
  color: var(--muted);
}

.prose-card li {
  margin-bottom: 0.45em;
}

.prose-card li strong {
  color: var(--text);
}

.lang-block[hidden] {
  display: none !important;
}

.callout-warning {
  margin: 1.25rem 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 107, 74, 0.45);
  background: rgba(255, 107, 74, 0.12);
  color: var(--text);
  font-size: 15px;
}

.callout-warning strong {
  color: #ff9a85;
}

.legal-form {
  display: grid;
  gap: 18px;
  margin-top: 8px;
}

.form-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.form-field label .req {
  color: var(--accent);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit;
  font-size: 15px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--cyan);
}

.form-field textarea {
  min-height: 100px;
  resize: vertical;
}

.form-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
}

.form-check input {
  margin-top: 4px;
  flex-shrink: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.form-status {
  font-size: 14px;
  color: var(--cyan);
}

.form-status.is-error {
  color: #ff9a85;
}

/* —— Footer —— */
.site-footer {
  margin-top: 64px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

.footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 32px 24px 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 14px;
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.footer__links a {
  color: var(--muted);
  font-weight: 500;
}

.footer__links a:hover {
  color: var(--text);
}

.small {
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

/* —— Responsive nav —— */
@media (max-width: 720px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
    padding: 16px 20px;
  }

  .brand {
    max-width: none;
  }

  .navlinks {
    justify-content: flex-start;
  }

  .hero p {
    font-size: 16px;
  }

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