:root {
  --bg-main: #1A1A2E;
  --bg-alt: #16213E;
  --bg-panel: rgba(255,255,255,0.05);
  --line: #3A3A5C;
  --text-main: #F5F5F5;
  --text-dim: #B0B0C0;
  --green: #0FFF50;
  --orange: #FF6B35;
  --pink: #FF3E6B;
  --danger: #FF4D6D;
  --header-h: 72px;
  --container-w: 1280px;
  --gutter: clamp(16px, 3vw, 40px);
  --font-head: "Rajdhani", "Orbitron", "Noto Sans SC", "PingFang SC", sans-serif;
  --font-body: "Noto Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --shadow-deep: 0 8px 30px rgba(0,0,0,.35);
}

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

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 100%,
    radial-gradient(ellipse at 20% -10%, rgba(15,255,80,.07), transparent 55%),
    radial-gradient(ellipse at 100% 110%, rgba(255,62,107,.10), transparent 60%);
}

#main-content {
  position: relative;
  z-index: 1;
  min-height: 60vh;
}

::selection {
  background: rgba(15,255,80,.3);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 750;
  line-height: 1.2;
  color: var(--text-main);
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: -40px;
  left: 8px;
  z-index: 200;
  padding: 8px 16px;
  background: var(--green);
  color: #0A0A1A;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 8px;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,26,46,.92);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-deep);
}

@media (min-width: 1025px) {
  .site-header {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(15,255,80,.6), rgba(255,59,107,.6), transparent);
  opacity: .7;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, rgba(15,255,80,.15), rgba(255,62,107,.15));
  border: 1px solid rgba(15,255,80,.4);
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 900;
  color: var(--green);
  letter-spacing: 1px;
  transform: skewX(-6deg);
}

.brand-text {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .04em;
}

.brand-cn {
  color: var(--green);
  font-weight: 800;
  margin-left: .1em;
}

.brand-rail {
  writing-mode: vertical-rl;
  font-family: var(--font-head);
  font-size: .62rem;
  letter-spacing: .4em;
  color: var(--text-dim);
  border-left: 1px solid var(--line);
  padding-left: 8px;
  height: 38px;
  text-transform: uppercase;
  opacity: .8;
  user-select: none;
}

.site-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-item {
  flex-shrink: 0;
}

.nav-link {
  position: relative;
  display: block;
  padding: .5rem .8rem;
  color: var(--text-dim);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--green), var(--pink));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.nav-link:hover {
  color: var(--text-main);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-link[aria-current="page"] {
  color: var(--green);
}

.search-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-dim);
  transition: border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 12px rgba(15,255,80,.3);
}

.search-toggle-icon {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}

.search-toggle-icon::after {
  content: "";
  position: absolute;
  width: 2px;
  height: 6px;
  background: currentColor;
  bottom: -5px;
  right: -3px;
  transform: rotate(45deg);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-dim);
  transition: transform .25s ease, opacity .25s ease, background .25s ease;
}

.nav-toggle:hover .nav-toggle-bar {
  background: var(--green);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  z-index: 102;
  background: linear-gradient(90deg, var(--green), var(--orange), var(--pink));
  transform: scaleX(0);
  transform-origin: left top;
}

.search-layer {
  max-height: 0;
  overflow: hidden;
  background: rgba(22,33,62,.97);
  border-bottom: 1px solid transparent;
  transition: max-height .35s ease, border-color .2s ease;
}

.search-layer[data-open] {
  max-height: 140px;
  border-bottom-color: rgba(15,255,80,.5);
}

.search-layer-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 0;
  transition: padding .3s ease;
}

.search-layer[data-open] .search-layer-inner {
  padding-block: 16px;
}

.search-layer-prefix {
  font-family: var(--font-head);
  font-size: .7rem;
  letter-spacing: .3em;
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

.search-input {
  flex: 1;
  padding: .6rem .9rem;
  background: rgba(0,0,0,.35);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-main);
  font-size: 1rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.search-input::placeholder {
  color: rgba(176,176,192,.7);
}

.search-input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15,255,80,.12);
}

.search-close {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
  transition: color .2s ease, border-color .2s ease;
}

.search-close:hover {
  color: var(--pink);
  border-color: var(--pink);
}

.site-footer {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, var(--bg-main), var(--bg-alt));
  border-top: 1px solid var(--line);
  margin-top: clamp(60px, 8vw, 120px);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green) 20%, var(--orange), var(--pink) 80%, transparent);
  opacity: .7;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1.4fr;
  gap: 40px;
  max-width: var(--container-w);
  margin-inline: auto;
  padding: 60px var(--gutter) 40px;
}

.footer-brand {
  margin-right: 0;
  margin-bottom: 8px;
}

.footer-brand-desc {
  color: var(--text-dim);
  font-size: .875rem;
  margin-top: 12px;
  max-width: 38ch;
}

.footer-trust {
  margin-top: 14px;
  padding: 12px;
  border-left: 2px solid rgba(15,255,80,.5);
  background: rgba(15,255,80,.04);
  font-size: .8rem;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 46ch;
}

.footer-heading {
  font-family: var(--font-head);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
  position: relative;
  padding-left: 14px;
}

.footer-heading::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  bottom: .3em;
  width: 4px;
  background: linear-gradient(var(--green), var(--pink));
}

.footer-link-list {
  display: grid;
  gap: 10px;
}

.footer-link-list a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .9rem;
  transition: color .2s ease, padding-left .2s ease;
}

.footer-link-list a:hover {
  color: var(--green);
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 8px;
  font-size: .875rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  align-items: baseline;
  word-break: break-all;
}

.footer-contact-label {
  color: var(--text-main);
  font-weight: 600;
  min-width: 2.2em;
  flex-shrink: 0;
}

.footer-contact-value {
  color: var(--text-dim);
}

.footer-contact-note {
  font-size: .8rem;
  color: rgba(176,176,192,.75);
  border-left: 2px solid rgba(15,255,80,.4);
  padding-left: 10px;
  margin-top: 12px;
}

.footer-icp {
  color: var(--text-dim);
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.8;
}

.footer-icp-meta {
  color: var(--text-dim);
  font-size: .8rem;
  line-height: 1.8;
}

.footer-bottom {
  border-top: 1px solid rgba(58,58,92,.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-block: 18px;
  font-size: .8rem;
  color: var(--text-dim);
}

.footer-copyright {
  margin: 0;
  font-size: .8rem;
  color: var(--text-dim);
}

.back-to-top {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  padding: .35rem .8rem;
  border-radius: 4px;
  font-size: .75rem;
  cursor: pointer;
  letter-spacing: .08em;
  transition: color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.back-to-top:hover {
  color: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 10px rgba(15,255,80,.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.5rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: .9rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text-main);
  font-family: var(--font-body);
  transition: all .25s ease;
}

.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #0A0A1A;
  box-shadow: 0 0 18px rgba(15,255,80,.25);
}

.btn-primary:hover {
  background: #22ff62;
  box-shadow: 0 0 28px rgba(15,255,80,.45);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(15,255,80,.5);
  color: var(--green);
}

.btn-ghost:hover {
  background: rgba(15,255,80,.1);
  box-shadow: 0 0 14px rgba(15,255,80,.2);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-head);
  font-size: .7rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
}

.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--green), transparent);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 14px 0;
  font-size: .8rem;
  color: var(--text-dim);
  list-style: none;
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color .2s ease;
}

.breadcrumb a:hover {
  color: var(--green);
}

.breadcrumb li:not(:last-child)::after {
  content: "///";
  margin-left: 6px;
  color: var(--green);
  opacity: .5;
  font-size: .7rem;
}

.breadcrumb li[aria-current="page"] {
  color: var(--text-main);
  font-weight: 600;
}

.grid-bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.grid-bento > * {
  grid-column: span 4;
}

.bento-tile {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
}

.bento-tile:hover {
  border-color: rgba(15,255,80,.4);
  box-shadow: 0 0 0 1px rgba(15,255,80,.15), 0 8px 30px rgba(0,0,0,.3);
  transform: translateY(-2px);
}

.bento-tile::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle at top right, rgba(255,62,107,.12), transparent 70%);
}

.tile-label {
  font-family: var(--font-head);
  font-size: .65rem;
  letter-spacing: .3em;
  color: var(--green);
  text-transform: uppercase;
}

.tile-stat {
  font-family: var(--font-head);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.15;
  margin-top: 8px;
}

.tile-stat small {
  font-size: .9rem;
  color: var(--text-dim);
  font-weight: 400;
}

.tile-heading {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tile-meta {
  font-size: .8rem;
  color: var(--text-dim);
}

.glass-card {
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
}

.gradient-text {
  background: linear-gradient(90deg, var(--orange), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-glow {
  color: var(--green);
  text-shadow: 0 0 12px rgba(15,255,80,.5);
}

.tilt-line {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--green), transparent);
  transform: skewX(-20deg);
  opacity: .6;
}

.img-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(15,255,80,.06), rgba(255,62,107,.06)),
    linear-gradient(transparent 50%, rgba(0,0,0,.2) 50%) 0 0 / 100% 4px,
    #0e0e1a;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color .3s ease;
}

.img-frame::after {
  content: "IMG//FRAME // GRID DECO";
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-family: var(--font-head);
  font-size: .6rem;
  letter-spacing: .25em;
  color: rgba(176,176,192,.7);
}

.img-frame:hover {
  border-color: rgba(15,255,80,.35);
}

.img-frame--wide {
  aspect-ratio: 21 / 9;
}

.img-frame--portrait {
  aspect-ratio: 3 / 4;
}

.content-page {
  max-width: var(--container-w);
  margin-inline: auto;
  padding: clamp(24px, 5vw, 64px) var(--gutter);
}

.page-intro {
  padding: 48px 0 24px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.page-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.1;
  margin-bottom: .4rem;
}

.page-subtitle {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-bottom: 0;
}

@media (max-width: 1024px) {
  .brand-rail {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }

  .brand {
    margin-right: auto;
  }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    width: min(340px, 88vw);
    z-index: 90;
    margin-left: 0;
    background: rgba(22,33,62,.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 1px solid var(--line);
    padding: 28px 24px 32px;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
  }

  .site-nav[data-open] {
    transform: translateX(0);
  }

  .site-nav::after {
    content: "BAISHENG GAMES // CN";
    display: block;
    margin-top: 32px;
    font-family: var(--font-head);
    font-size: .6rem;
    letter-spacing: .3em;
    color: rgba(176,176,192,.4);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 1rem;
    border-left: 2px solid transparent;
    white-space: normal;
  }

  .nav-link::after {
    display: none;
  }

  .nav-link:hover,
  .nav-link[aria-current="page"] {
    border-left-color: var(--green);
    background: rgba(15,255,80,.06);
  }

  .header-inner {
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand-col {
    grid-column: 1 / -1;
  }

  .grid-bento > * {
    grid-column: span 6;
  }
}

@media (max-width: 600px) {
  :root {
    --header-h: 64px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 40px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .grid-bento {
    grid-template-columns: 1fr;
  }

  .grid-bento > * {
    grid-column: span 1;
  }

  .search-toggle {
    width: 34px;
    height: 34px;
  }

  .nav-toggle {
    width: 34px;
    height: 34px;
  }

  .brand-text {
    font-size: 1.15rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    font-size: .7rem;
  }
}

body.nav-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
