html {
  scroll-behavior: smooth;
}

body.home-page {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: #0d1110;
  background-image:
    linear-gradient(160deg, #0d1110 0%, #15211f 52%, #101218 100%);
  color: #f3f7f2;
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.5;
  text-align: left;
  letter-spacing: 0;
}

body.home-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.024) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.55;
}

body.home-page a {
  color: inherit;
}

.site-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 32px 0 28px;
}

.hero {
  min-height: 520px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 34px 0 38px;
  border-bottom: 1px solid rgba(101, 208, 190, 0.18);
}

.hero-visual {
  display: flex;
  justify-content: center;
}

.logo {
  width: 236px;
  height: auto;
  margin: 0;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.38));
  animation: none;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #65d0be;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero h1 {
  margin: 0;
  color: #f8fbf6;
  font-size: 56px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 620px;
  margin: 22px 0 0;
  color: #d8d0c4;
  font-size: 18px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.primary-action,
.secondary-action,
.app-store-btn {
  min-height: 44px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.2;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.primary-action {
  padding: 0 20px;
  background: #d6a75c;
  color: #15110c;
  border: 1px solid #e6bf78;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: #e4bb73;
  color: #160f09;
  text-decoration: none;
}

.secondary-action {
  padding: 0 18px;
  color: #eef6f2;
  border: 1px solid rgba(238, 246, 242, 0.24);
  background: rgba(255, 255, 255, 0.045);
}

.secondary-action:hover,
.secondary-action:focus-visible {
  color: #fff8e9;
  border-color: rgba(101, 208, 190, 0.58);
  background: rgba(101, 208, 190, 0.1);
  text-decoration: none;
}

.visitor-counter {
  width: fit-content;
  margin: 24px 0 0;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c9d3ce;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  text-shadow: none;
  letter-spacing: 0;
}

.visitor-counter #visitor-number {
  color: #f0c76b !important;
}

.showcase {
  padding-top: 50px;
}

.section-copy {
  max-width: 430px;
  margin: 0;
  color: #c7d0cb;
  font-size: 14px;
}

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.showcase-card {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.065);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
}

.showcase-card-large {
  grid-column: span 3;
  min-height: 320px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
}

.showcase-media {
  min-height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background:
    linear-gradient(135deg, rgba(101, 208, 190, 0.12), rgba(214, 167, 92, 0.08)),
    rgba(255, 255, 255, 0.04);
}

.showcase-media-art {
  min-height: 100%;
}

.showcase-media img {
  max-width: 100%;
  max-height: 178px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.32));
}

.showcase-card-large .showcase-media img {
  max-height: 260px;
}

.showcase-content {
  min-width: 0;
  padding: 24px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.showcase-label {
  color: #65d0be;
  font-size: 12px;
  font-weight: 800;
}

.showcase-content h3 {
  margin: 10px 0 0;
  color: #f8fbf6;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
}

.showcase-card-large .showcase-content h3 {
  font-size: 34px;
}

.showcase-content p {
  margin: 12px 0 0;
  color: #c7d0cb;
  font-size: 15px;
}

.showcase-link {
  width: fit-content;
  min-height: 40px;
  margin-top: auto;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #15110c;
  background: #d6a75c;
  border: 1px solid #e6bf78;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}

.showcase-link:hover,
.showcase-link:focus-visible {
  color: #15110c;
  background: #e4bb73;
  text-decoration: none;
}

.app-download-section {
  max-width: none;
  margin: 34px 0 0;
  padding: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(101, 208, 190, 0.2);
  border-radius: 8px;
  overflow: hidden;
}

.app-download-section::before {
  content: none;
}

.download-copy {
  min-width: 0;
}

.app-download-title {
  margin: 0;
  color: #f8fbf6;
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: none;
}

.download-summary {
  max-width: 560px;
  margin: 12px 0 0;
  color: #c7d0cb;
  font-size: 15px;
}

.app-download-content {
  display: grid;
  grid-template-columns: 132px 270px;
  align-items: center;
  gap: 18px;
}

.qrcode-container {
  width: 132px;
  height: 132px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: none;
}

.qrcode-container img {
  width: 116px;
  height: 116px;
  display: block;
}

.download-buttons {
  width: 100%;
  display: grid;
  gap: 10px;
}

.app-store-btn {
  width: 100%;
  padding: 10px 14px;
  color: #f7f2e9;
  background: #151515;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.app-store-btn:hover,
.app-store-btn:focus-visible {
  color: #fff;
  background: #23201d;
  border-color: rgba(214, 167, 92, 0.48);
  box-shadow: none;
  transform: translateY(-1px);
  text-decoration: none;
}

.app-store-btn svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.app-store-btn-text {
  min-width: 0;
  text-align: left;
}

.app-store-btn-text span:first-child {
  display: block;
  color: #b9c4bf;
  font-size: 11px;
  opacity: 1;
}

.app-store-btn-text span:last-child {
  display: block;
  color: #f8fbf6;
  font-size: 15px;
  font-weight: 700;
}

.scan-hint {
  display: none;
}

.games-section {
  padding-top: 42px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  color: #f8fbf6;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0;
}

#games-container {
  width: 100%;
}

.game-section + .game-section {
  margin-top: 34px;
}

.section-title {
  margin: 0 0 14px;
  color: #65d0be;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: 0;
  text-shadow: none;
}

.game-grid {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.game-card {
  min-height: 92px;
  padding: 14px;
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  color: #f5eee1;
  background: rgba(255, 255, 255, 0.062);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.game-card::before {
  content: none;
}

.game-card:hover,
.game-card:focus-visible {
  color: #f8fbf6;
  background: rgba(101, 208, 190, 0.1);
  border-color: rgba(101, 208, 190, 0.44);
  box-shadow: none;
  transform: translateY(-2px);
  text-decoration: none;
}

.game-card-logo {
  width: 94px;
  max-height: 48px;
  padding: 5px;
  display: block;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  filter: none;
}

.game-card:hover .game-card-logo,
.game-card:focus-visible .game-card-logo {
  filter: none;
  border-color: rgba(255, 255, 255, 0.28);
}

.game-card-text {
  min-width: 0;
}

.game-card-label {
  display: block;
  color: inherit;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.game-card-meta {
  display: block;
  margin-top: 5px;
  color: #b9c4bf;
  font-size: 12px;
  font-weight: 600;
}

.site-footer {
  margin-top: 54px;
  padding: 26px 0 0;
  color: #b9c4bf;
  border-top: 1px solid rgba(101, 208, 190, 0.18);
  font-size: 13px;
}

.footer-main strong {
  display: block;
  color: #f8fbf6;
  font-size: 15px;
}

.footer-main p,
.legal-note,
.copyright {
  margin: 10px 0 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 14px;
}

.footer-links a {
  color: #65d0be;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: #96ecde;
  text-decoration: underline;
}

.legal-note {
  color: #9f9587;
  font-size: 12px;
}

.copyright {
  color: #8d8478;
  font-size: 12px;
}

.load-error {
  margin: 20px 0;
  padding: 14px 16px;
  color: #ffd7d0;
  background: rgba(182, 93, 74, 0.14);
  border: 1px solid rgba(182, 93, 74, 0.38);
  border-radius: 8px;
}

.server-fallback {
  margin-top: 22px;
  padding: 18px;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(101, 208, 190, 0.2);
  border-radius: 8px;
}

.server-fallback h3 {
  margin: 0;
  color: #f8fbf6;
  font-size: 18px;
}

.server-fallback a {
  color: #65d0be;
  text-decoration: none;
}

.server-fallback a:hover,
.server-fallback a:focus-visible {
  color: #96ecde;
  text-decoration: underline;
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 30px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .showcase-card-large {
    grid-column: span 2;
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .app-download-section,
  .app-download-content {
    grid-template-columns: 1fr;
  }

  .app-download-content {
    justify-items: start;
  }

  .download-buttons {
    max-width: 320px;
  }
}

@media (max-width: 640px) {
  .site-shell {
    width: min(100% - 28px, 480px);
    padding-top: 20px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 24px 0 28px;
    text-align: center;
  }

  .hero-visual {
    justify-content: center;
  }

  .logo {
    width: 154px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .hero-lede {
    margin-top: 16px;
    font-size: 16px;
  }

  .hero-actions {
    justify-content: center;
    margin-top: 22px;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .visitor-counter {
    margin-left: auto;
    margin-right: auto;
  }

  .app-download-section {
    margin-top: 26px;
    padding: 18px;
  }

  .app-download-title {
    font-size: 22px;
  }

  .app-download-content {
    justify-items: stretch;
  }

  .qrcode-container {
    display: none;
  }

  .download-buttons {
    max-width: none;
  }

  .games-section {
    padding-top: 34px;
  }

  .section-heading {
    display: block;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .section-copy {
    margin-top: 10px;
  }

  .showcase {
    padding-top: 36px;
  }

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

  .showcase-card,
  .showcase-card-large {
    grid-column: auto;
    min-height: 0;
    display: flex;
  }

  .showcase-media {
    min-height: 112px;
  }

  .showcase-card-large .showcase-media img {
    max-height: 190px;
  }

  .showcase-card-large .showcase-content h3,
  .showcase-content h3 {
    font-size: 22px;
  }

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

  .game-card {
    min-height: 82px;
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .game-card-logo {
    width: 82px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}
