:root {
  --page-bg: #121e36;
  --muted: #abacfd;
  --card: #35414d;
  --gap: 16px;
}

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

html {
  line-height: 1.15;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  color: #fff;
  background-color: var(--page-bg);
  background-image: url("assets/background.png");
  background-position: center top;
  background-size: cover;
  background-repeat: no-repeat;
  font-family: Montserrat, "Open Sans", "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  color: inherit;
  font: inherit;
}

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

ul {
  list-style: none;
}

.ticker {
  position: relative;
  width: 100%;
  height: 60px;
  overflow: hidden;
}

.ticker-track {
  position: absolute;
  top: 24px;
  left: 0;
  width: max-content;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
  white-space: nowrap;
  animation: ticker-scroll 24s linear -2s infinite;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.china-flag {
  position: relative;
  display: inline-block;
  width: 1.28em;
  height: 0.86em;
  overflow: hidden;
  border-radius: 1px;
  background: #de2910;
  vertical-align: -0.05em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.china-flag::before {
  content: "★";
  position: absolute;
  top: 0.01em;
  left: 0.12em;
  color: #ffde00;
  font-family: Arial, sans-serif;
  font-size: 0.46em;
  line-height: 1;
  text-shadow: none;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(100vw);
  }
  to {
    transform: translateX(-100%);
  }
}

.page {
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
}

.home-top-entry {
  max-width: 1430px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: content-box;
}

.game-grid {
  display: grid;
  grid-template-columns: 950px 1fr;
  gap: var(--gap);
  margin-top: 64px;
}

.game-grid > article,
.route-card {
  border-radius: 16px;
}

.interactive-card {
  cursor: pointer;
  outline: 0;
}

.interactive-card:focus-visible {
  box-shadow: 0 0 0 2px #ffb01b;
}

.hero-card {
  position: relative;
  grid-row: span 2;
  width: 100%;
  height: 328px;
  overflow: hidden;
  padding: 32px;
  border-radius: 16px 42px 16px 16px !important;
  background:
    url("assets/hero-base.png") right center / contain no-repeat,
    url("assets/hero-foreground.png") center top / cover no-repeat,
    linear-gradient(129.67deg, #181d23 0%, #384d6d 51%, #090933 100%);
}

.hero-features,
.hero-features ul {
  display: flex;
}

.hero-features {
  color: #f9f5f3;
  line-height: 28px;
}

.hero-features li {
  margin-right: 12px;
  white-space: nowrap;
}

.hero-features i {
  margin-right: 8px;
  font-style: normal;
  font-weight: 900;
}

.hero-copy {
  margin-top: 72px;
}

.hero-copy h1 {
  font-family: system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.5;
}

.hero-copy p {
  margin-top: 8px;
  color: #cbd6ff;
  font-size: 14px;
  line-height: 18px;
}

.enter-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 0 24px;
  border-radius: 4px;
  color: #324466;
  background: #fff;
  font-size: 16px;
  line-height: 40px;
  cursor: pointer;
  transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease,
    box-shadow 0.25s ease;
}

.enter-button span {
  margin-left: 8px;
  font-size: 13px;
}

.enter-button:hover,
.enter-button.is-animated {
  color: #071e5e;
  background: #ffb01b;
  box-shadow: 0 2px 16px #ffb01b;
}

.enter-button:active {
  transform: scale(0.92);
}

.mini-card {
  position: relative;
  display: flex;
  height: 156px;
  overflow: hidden;
  padding: 16px 0 16px 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: background-color 0.15s ease-in-out;
}

.mini-card:hover {
  background-color: #1f2634;
}

.brand-panel {
  position: relative;
  flex: 0 0 164px;
  width: 164px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 16px;
  background-color: rgba(255, 255, 255, 0.05);
}

.brand-logo {
  display: block;
  max-width: none;
  height: auto;
  transform: translateY(8px);
}

.brand-logo-yb {
  width: 90%;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 38% 62%, 38% 100%, 0 100%);
}

.brand-logo-mk {
  width: 84%;
  clip-path: polygon(0 0, 100% 0, 100% 62%, 35% 62%, 35% 100%, 0 100%);
}

.mini-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  padding-left: 16px;
  padding-right: 32px;
}

.mini-content h2 {
  font-family: system-ui, sans-serif;
  font-size: 24px;
  line-height: 32px;
  white-space: nowrap;
}

.mini-content ul {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}

.mini-content p {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-badge {
  position: absolute;
  top: -3px;
  left: -6px;
  width: 62px;
}

.card-arrow {
  position: absolute;
  top: 0;
  right: 0;
  width: 32px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7b7b9d;
  background: rgba(255, 255, 255, 0.04);
  font-size: 36px;
  font-family: Arial, sans-serif;
  transition: background-color 0.15s ease-in-out;
}

.mini-card:hover .card-arrow {
  background-color: #35414d;
}

.download-card {
  position: relative;
  display: flex;
  height: 156px;
  overflow: hidden;
  padding: 16px 0 16px 16px;
  background-color: var(--card);
  background-position: right center;
  background-size: auto 100%;
  background-repeat: no-repeat;
  transition: background-color 0.15s ease-in-out, background-size 0.25s ease;
}

.download-card:hover {
  background-color: #5f6f79;
  background-size: auto 112%;
}

.mk-download {
  background-image: url("assets/kaiyun-download.png");
}

.yb-download {
  background-image: url("assets/jiuyou-download.png");
}

.download-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  min-width: 0;
  padding-left: 16px;
  padding-right: 180px;
}

.download-copy h2 {
  font-family: system-ui, sans-serif;
  font-size: 24px;
  line-height: 32px;
  white-space: nowrap;
}

.download-lead {
  line-height: 21px;
}

.download-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.routes {
  max-width: 1424px;
  margin: 64px auto 0;
  padding: 0 16px;
  box-sizing: content-box;
}

.route-list {
  display: flex;
  gap: var(--gap);
}

.route-card {
  position: relative;
  flex: 1;
  height: 200px;
  overflow: hidden;
  margin-bottom: 16px;
  background-position: right center;
  background-size: auto 100%;
  background-repeat: no-repeat;
  transition: flex 0.15s linear, filter 0.15s linear;
}

.route-card:hover {
  filter: brightness(1.08);
}

.route-left {
  background-image:
    url("assets/route-texture.png"),
    linear-gradient(90deg, #0e0909 0%, #450000 100%);
}

.route-right {
  background-image:
    url("assets/route-texture.png"),
    linear-gradient(90deg, #140b0b 0%, #433700 100%);
}

.route-card.route-active {
  flex: 1.97;
}

.route-card > img {
  position: absolute;
  right: 0;
  bottom: 0;
  display: none;
  width: auto;
  max-width: none;
  height: 100%;
  animation: fade-in 0.25s linear;
}

.route-card.route-active > img {
  display: block;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.route-copy {
  position: absolute;
  top: 50%;
  left: 7%;
  z-index: 1;
  max-width: 55%;
  transform: translateY(-50%);
}

.route-copy h2 {
  font-family: Montserrat, "Microsoft YaHei", sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.route-copy p {
  max-width: 250px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  line-height: 1.5;
  white-space: nowrap;
}

.route-copy .route-note {
  color: var(--muted);
}

.service-button {
  position: fixed;
  top: 35%;
  right: 0;
  z-index: 20;
  width: 30px;
  padding: 10px 3px;
  border-radius: 10px 0 0 10px;
  color: #fff;
  background: #3b5975;
  text-align: center;
  cursor: pointer;
}

.service-button img {
  width: 24px;
  margin-bottom: 4px;
}

.service-button span {
  display: block;
  font-size: 14px;
  line-height: 22px;
  word-break: break-all;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 30;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 4px;
  color: #fff;
  background: rgba(5, 8, 18, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media screen and (max-width: 1300px) {
  .game-grid {
    grid-template-columns: 9.5fr 3.5fr;
  }
}

@media screen and (max-width: 960px) {
  .game-grid {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .hero-card {
    grid-row: auto;
    height: 329px;
  }

  .mini-card,
  .download-card {
    height: 130px;
    padding: 25px 0 25px 16px;
  }

  .routes {
    margin-top: 24px;
  }

  .route-card {
    height: 159.6px;
  }

  .route-copy h2 {
    font-size: 18px;
    padding-left: 16px;
  }

  .route-copy p {
    padding-left: 16px;
    font-size: 12px;
  }
}

@media screen and (max-width: 768px) {
  body {
    background-color: #05061a;
  }

  .ticker-track {
    font-size: 19px;
  }

  .hero-card {
    height: 246px;
    display: grid;
    justify-items: start;
    align-content: start;
    padding: 16px 16px 32px;
    background:
      url("assets/hero-base.png") right center / contain no-repeat,
      linear-gradient(129.67deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.05) 51%, rgba(0, 0, 0, 0) 100%);
  }

  .hero-copy {
    grid-row: 1;
    margin-top: 0;
    padding-left: 16px;
  }

  .hero-copy h1 {
    font-size: 18px;
  }

  .hero-copy p {
    padding-left: 0;
    font-size: 12px;
    white-space: pre-wrap;
  }

  .hero-features {
    grid-row: 2;
    margin-top: 8px;
    padding-left: 16px;
  }

  .hero-features ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .hero-features li {
    margin-right: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    line-height: 28px;
  }

  .hero-features i {
    margin: 0 8px;
  }

  .enter-button {
    grid-row: 3;
    margin-top: 41px;
  }

  .route-list {
    display: block;
  }

  .route-card,
  .route-card.route-active {
    height: 130px;
  }

  .route-card > img {
    display: block;
  }

  .route-copy {
    top: 24px;
    left: 16px;
    max-width: 68%;
    transform: none;
  }

  .route-copy h2,
  .route-copy p {
    padding-left: 0;
  }
}

@media screen and (max-width: 468px) {
  .brand-panel {
    flex-basis: 106px;
    width: 106px;
  }

  .mini-content h2,
  .download-copy h2 {
    font-size: 18px;
    line-height: 26px;
  }

  .mini-content ul,
  .mini-content p,
  .download-copy p {
    font-size: 12px;
  }

  .download-copy {
    padding-right: 118px;
  }

  .new-badge {
    width: 48px;
  }

  .service-button {
    top: 38%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation-duration: 80s;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
