:root {
  --bg: #031624;
  --bg-soft: #08293b;
  --card: #0a2b3d;
  --text: #f7fbff;
  --muted: #98bed1;
  --line: #1d4f67;
  --cta-from: #22a7e6;
  --cta-to: #0f7fca;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background:
    url("./assets/top_bg.png") top center / 100% auto no-repeat,
    url("./assets/bg-hero-gradient@2x.png") top center / 100% auto no-repeat,
    radial-gradient(circle at 50% -20%, #114a71, rgba(3, 22, 36, 0.8) 45%),
    linear-gradient(180deg, #06273a, #031624 56%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.page {
  min-height: 100vh;
}

.mode-badge {
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 30;
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.6);
  color: #8df0ff;
  border: 1px solid rgba(141, 240, 255, 0.45);
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(5px);
  background: linear-gradient(180deg, rgba(8, 43, 60, 0.93), rgba(5, 30, 45, 0.9));
  border-bottom: 1px solid rgba(45, 103, 132, 0.28);
}

.top-nav-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  width: 104px;
  height: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn,
.nav-balance,
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(49, 116, 146, 0.64);
  background: linear-gradient(180deg, #0a4868, #083a55);
  color: #d9f2fd;
  border-radius: 8px;
  padding: 4px 9px;
  height: 28px;
  font-size: 11px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(137, 227, 255, 0.18);
}

.nav-btn img,
.nav-balance img {
  width: 17px;
  height: 17px;
  object-fit: contain;
}

.nav-btn span,
.nav-balance span {
  font-size: 10px;
  color: #e5f7ff;
  font-weight: 500;
}

.nav-login-btn {
  font-size: 11px;
  color: #e5f7ff;
  font-weight: 600;
  padding-inline: 14px;
}

.nav-balance {
  padding-right: 7px;
  gap: 5px;
}

.nav-balance-amount {
  color: #f5e3b0;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.nav-caret {
  width: 11px !important;
  height: 11px !important;
  opacity: 0.78;
}

.lang-select-wrap {
  position: relative;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(49, 116, 146, 0.64);
  background: linear-gradient(180deg, #0a4868, #083a55);
  color: #e5f7ff;
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 11px;
  min-width: 88px;
  height: 28px;
  justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(137, 227, 255, 0.18);
}

.lang-toggle img {
  width: 12px;
  height: 12px;
  object-fit: contain;
  opacity: 0.78;
}

.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  border: 1px solid rgba(49, 116, 146, 0.64);
  background: #0a3047;
  border-radius: 9px;
  min-width: 88px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.lang-option {
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  background: transparent;
  color: #d8f2fd;
  font-size: 10px;
}

.lang-option:hover {
  background: #0d425e;
}

.lang-option.active {
  background: #105472;
}

.hidden {
  display: none;
}

.modal-open {
  overflow: hidden;
  height: 100vh;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
}

.auth-mask {
  position: absolute;
  inset: 0;
  background: rgba(3, 15, 24, 0.72);
  z-index: 1;
}

.auth-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(66, 151, 186, 0.68);
  border-radius: 12px;
  padding: 18px 16px 14px;
  background: linear-gradient(180deg, rgba(9, 52, 76, 0.98), rgba(6, 34, 51, 0.98));
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.4);
  z-index: 2;
}

.auth-close {
  position: absolute;
  right: 0;
  top: -2px;
  border: 0;
  background: transparent;
  color: #8fd6f3;
  font-size: 22px;
}

/* ── iOS 添加桌面快捷方式弹窗 ── */
.ios-shortcut-dialog {
  text-align: center;
  padding: 24px 20px 20px;
}
.ios-shortcut-title {
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 18px;
}
.ios-shortcut-steps {
  text-align: left;
  margin-bottom: 20px;
}
.ios-step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.ios-step:last-child {
  margin-bottom: 0;
}
.ios-step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1ca0e3, #0d7cb5);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ios-step p {
  margin: 0;
  color: #c3dde8;
  font-size: 14px;
  line-height: 1.5;
}
.ios-step p strong {
  color: #fff;
}
.ios-share-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin: 0 2px;
}
.ios-shortcut-btn {
  width: 100%;
  margin-top: 4px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.auth-tab {
  flex: 1;
  border: 1px solid rgba(65, 149, 184, 0.54);
  border-radius: 8px;
  background: rgba(9, 66, 95, 0.5);
  color: #a9deef;
  font-size: 12px;
  height: 34px;
}

.auth-tab.active {
  background: linear-gradient(180deg, #0d6daa, #0a5486);
  color: #eefbff;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form.hidden {
  display: none;
}

.auth-label {
  font-size: 11px;
  color: #9ad6ea;
}

.auth-input {
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(64, 144, 177, 0.54);
  background: rgba(7, 40, 58, 0.86);
  color: #effbff;
  padding: 0 10px;
  font-size: 12px;
}

.auth-submit,
.auth-telegram-btn {
  border: 1px solid rgba(102, 209, 255, 0.48);
  border-radius: 8px;
  height: 36px;
  color: #eefbff;
  background: linear-gradient(180deg, #0f7fca, #0b5c98);
  font-size: 12px;
  font-weight: 600;
}

.auth-telegram-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-telegram-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.auth-tip {
  margin: 2px 0 0;
  font-size: 10px;
  color: #7fb7cb;
}

.auth-divider {
  margin: 12px 0 10px;
  text-align: center;
  color: #7eb8cc;
  font-size: 11px;
}

.auth-message {
  margin: 10px 0 0;
  min-height: 18px;
  text-align: center;
  color: #9fe9ff;
  font-size: 11px;
}

.recaptcha-box {
  min-height: 78px;
}

.hero {
  padding: 68px 24px 18px;
}

.hero-content,
.main {
  width: min(1200px, 100%);
  margin: 0 auto;
}

.hero-content {
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: #5fc8ff;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  margin: 0;
  font-size: 58px;
  line-height: 1.06;
  max-width: 780px;
  margin-inline: auto;
  text-wrap: balance;
}

.subtitle {
  margin: 14px 0 0;
  color: #7fdcff;
  letter-spacing: 0.16em;
  font-size: 12px;
  text-transform: uppercase;
}

.download-actions {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 18px;
  align-items: center;
  justify-content: center;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  min-width: 152px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(123, 232, 255, 0.55);
  background:
    linear-gradient(90deg, #0f8dff 0%, #13adff 48%, #19d4ff 100%);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(10, 133, 205, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.download-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 16px rgba(10, 133, 205, 0.34);
}

.download-icon {
  width: 42px;
  height: 42px;
  object-fit: contain;
  margin-right: 8px;
}

.download-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.download-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.download-subtitle {
  margin-top: 1px;
  font-size: 11px;
  color: #d8f4ff;
  opacity: 0.96;
}

.main {
  padding: 18px 24px 56px;
}

.section + .section {
  margin-top: 40px;
}

.games-strip-section {
  margin-top: 40px;
}

.section-head {
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.12;
  color: #f2fbff;
  font-weight: 700;
  letter-spacing: 0;
}

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

.tutorial-panel {
  border: 1px dashed rgba(83, 161, 196, 0.55);
  border-radius: 12px;
  padding: 16px 18px 20px;
  background: linear-gradient(180deg, rgba(6, 38, 56, 0.65), rgba(4, 24, 35, 0.35));
}

.step-card {
  position: relative;
  padding: 12px 12px 10px;
  border: 1px solid rgba(36, 108, 141, 0.72);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(149, 228, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 52, 76, 0.96), rgba(8, 40, 60, 0.96));
}

.step-index {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.step-badge {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(180deg, #28d8ff, #00aef0);
  color: #eaffff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(29, 201, 255, 0.45);
}

.step-label {
  font-size: 12px;
  line-height: 1;
  color: #f2fbff;
  letter-spacing: 0;
  text-transform: lowercase;
}

.tutorial-image-wrap {
  border: 1px solid rgba(108, 190, 227, 0.58);
  border-radius: 7px;
  padding: 2px;
  background: rgba(7, 37, 55, 0.92);
}

.step-text {
  margin: 12px 0 0;
  color: #f1fbff;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  letter-spacing: 0;
}

.game-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  overflow-x: auto;
  overflow-y: visible;
  padding: 28px 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.game-list::-webkit-scrollbar {
  display: none;
}

.game-card {
  width: 172px;
  min-width: 172px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card-inner {
  width: 100%;
  border: 1px solid rgba(53, 125, 157, 0.66);
  border-radius: 6px;
  padding: 6px;
  background: linear-gradient(180deg, #093650, #072b40);
  box-shadow: inset 0 1px 0 rgba(143, 231, 255, 0.12);
  transform: scale(0.9);
  transform-origin: center center;
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform;
}

.game-top {
  height: 18px;
  display: flex;
  align-items: center;
  padding-left: 2px;
}

.game-top-logo {
  width: 34px;
  height: auto;
  opacity: 0.92;
}

.tutorial-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  border: 0;
  object-fit: cover;
  background: radial-gradient(circle at 50% 35%, #0f6a95 0%, #093f5d 62%, #082f48 100%);
}

.step-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -16px;
  top: 50%;
  transform: translateY(-50%);
  color: #2dbff3;
  font-size: 20px;
  line-height: 1;
  opacity: 0.9;
}

.game-icon {
  width: 100%;
  aspect-ratio: 160 / 190;
  object-fit: cover;
  border-radius: 4px;
  background: #0f1324;
}

.game-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.game-name {
  margin: 0;
  font-size: 10px;
  color: #d7eef8;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-view-btn {
  border: 0;
  border-radius: 4px;
  background: linear-gradient(180deg, #0d6daa, #0a5486);
  color: #d8f2ff;
  font-size: 10px;
  line-height: 1;
  padding: 4px 8px;
}

.footer {
  padding: 6px 24px 24px;
}

.footer-inner {
  width: min(1200px, 100%);
  margin: 0 auto;
  border-top: 1px solid #17475f;
  padding-top: 12px;
}

.footer-block + .footer-block {
  margin-top: 18px;
}

.footer-title-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.footer-title-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.footer-block h3 {
  margin: 0;
  font-size: 12px;
  color: #d0ecf7;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.partner-grid {
  gap: 10px 12px;
}

.partner-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 60px;
  border-radius: 8px;
  border: 1px solid rgba(57, 124, 155, 0.38);
  background: linear-gradient(180deg, #0a3850, #082e45);
  overflow: hidden;
  padding: 4px;
}

.partner-item img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.partner-name-fallback {
  color: #d2edf9;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  word-break: break-word;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(57, 124, 155, 0.38);
  background: linear-gradient(180deg, #0a3850, #082e45);
  color: #d2edf9;
  font-size: 11px;
  min-height: 30px;
}

.badge.muted {
  opacity: 0.72;
}

.badge-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d8f1fc;
  text-decoration: none;
}

.partner-grid .badge {
  min-width: 78px;
  padding-inline: 9px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.social-grid {
  gap: 9px;
}

.social-card {
  width: 84px;
  height: 84px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0a3750, #082d42);
  border: 1px solid rgba(56, 124, 156, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #d9f1fc;
  text-decoration: none;
}

.social-card img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.crypto-strip {
  width: fit-content;
  max-width: 100%;
  border-radius: 10px;
  padding: 8px 12px;
  background: linear-gradient(180deg, #0a3850, #082d42);
  border: 1px solid rgba(64, 134, 166, 0.32);
}

.crypto-row img {
  height: 38px;
  width: auto;
  border-radius: 6px;
  border: 0;
}

.copyright {
  margin: 12px 0 0;
  color: #6fa7bf;
  font-size: 10px;
  display: none;
}

.disclaimer {
  margin: 4px 0 0;
  color: #5f97af;
  font-size: 9px;
  display: none;
}

.empty,
.loading {
  color: var(--muted);
  padding: 16px 0;
}

@media (max-width: 1100px) {
  h1 {
    font-size: 48px;
  }
  .game-card {
    width: 160px;
    min-width: 160px;
  }
  .tutorial-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-card:not(:last-child)::after {
    display: none;
  }

  .section-head h2 {
    font-size: 18px;
  }

  .step-label {
    font-size: 11px;
  }

  .step-text {
    font-size: 12px;
  }
}

@media (max-width: 760px) {
  .top-nav-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .brand-logo {
    width: 92px;
  }

  .nav-actions {
    gap: 5px;
  }

  .nav-btn,
  .nav-balance,
  .nav-login-btn {
    padding: 4px 7px;
    height: 26px;
  }

  .nav-btn span {
    display: none;
  }

  .nav-balance-amount {
    display: inline !important;
    font-size: 10px !important;
  }

  .lang-toggle {
    min-width: 84px;
    padding: 4px 7px;
    height: 26px;
  }

  .hero {
    padding-top: 46px;
  }
  .hero-content,
  .main,
  .footer-inner {
    width: 100%;
  }
  h1 {
    font-size: 42px;
    max-width: none;
  }

  .subtitle {
    font-size: 11px;
  }

  .download-btn {
    flex: 0 1 146px;
    min-width: 146px;
    justify-content: center;
  }

  .game-card {
    width: 44vw;
    min-width: 44vw;
    max-width: 162px;
  }

  .crypto-row img {
    height: 34px;
  }

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

  .tutorial-panel {
    padding: 10px;
  }

  .section-head {
    justify-content: flex-start;
  }

  .section-head h2 {
    font-size: 17px;
  }

  .step-card:not(:last-child)::after {
    display: none;
  }

  .step-label {
    font-size: 11px;
  }

  .step-text {
    font-size: 12px;
  }

  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }

  .badge {
    font-size: 10px;
  }

  .social-card {
    width: 72px;
    height: 72px;
  }

  .social-card img {
    width: 54px;
    height: 54px;
  }

}
