/* ============================================================
   玻璃拟态主题（渐变 mesh 背景 + 毛玻璃浮卡）
   说明：JS 会在验证码/画廊/滑块上写内联 left/width/transform，
   这些元素的 position 上下文（relative/absolute）必须保留，不要动。
   ============================================================ */

:root {
  --ink: #1d2342;
  --muted: #6b7298;
  --line: rgba(124, 92, 255, 0.16);

  /* 品牌渐变：紫 → 蓝；强调：粉 */
  --brand: #7c5cff;
  --brand-2: #4ca7ff;
  --accent: #ff5fa2;
  --grad-brand: linear-gradient(135deg, #7c5cff 0%, #4ca7ff 100%);
  --grad-accent: linear-gradient(135deg, #ff7eb3 0%, #ff5fa2 60%, #b95cff 100%);

  /* 毛玻璃 */
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.74);
  --glass-border: rgba(255, 255, 255, 0.65);
  --blur: 18px;

  --shadow: 0 18px 48px rgba(76, 62, 140, 0.18);
  --shadow-sm: 0 8px 22px rgba(76, 62, 140, 0.12);
  --glow-brand: 0 14px 30px rgba(124, 92, 255, 0.35);
  --glow-accent: 0 14px 30px rgba(255, 95, 162, 0.32);

  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --gap: 14px;
  --footer-height: 76px;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  min-height: 100%;
  /* mesh 渐变铺满整个视口，浮卡之间透出此背景 */
  background:
    radial-gradient(at 18% 8%, rgba(167, 139, 250, 0.55), transparent 50%),
    radial-gradient(at 84% 2%, rgba(96, 165, 250, 0.5), transparent 46%),
    radial-gradient(at 50% 96%, rgba(244, 114, 182, 0.45), transparent 52%),
    linear-gradient(160deg, #eef1ff 0%, #f6eefe 45%, #fde9f3 100%);
  background-attachment: fixed;
}

body {
  margin: 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }

.container {
  width: min(100%, 600px);
  margin: 0 auto;
}

.page-shell {
  min-height: 100vh;
  max-width: 600px;
  margin: 0 auto;
  padding: 12px 12px calc(var(--footer-height) + 18px);
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.page-shell.is-ready { opacity: 1; }

/* ── 玻璃浮卡通用底 ── */
.hero,
.game-info,
.panel,
.official_activity,
.modal__dialog,
.browser-tip__card,
.sticky-footer {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(1.4);
  backdrop-filter: blur(var(--blur)) saturate(1.4);
  box-shadow: var(--shadow);
}

/* ============================================================
   HERO（横幅 + 游戏信息合并为一张浮卡）
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: 0;
}
.hero__backdrop { display: none; }
.hero__content { position: relative; z-index: 1; padding: 0; }

.hero__banner-frame {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.hero__banner-image {
  width: 100%;
  min-height: 180px;
  object-fit: cover;
  filter: saturate(1.08);
}
/* 横幅底部柔和过渡到玻璃信息区 */
.hero__banner-frame::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 56px;
  background: linear-gradient(to top, var(--glass-strong), transparent);
  pointer-events: none;
}

.game-info {
  position: relative;
  background: var(--glass-strong);
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 16px 16px 18px;
  width: 100%;
}

.game-info .game-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.game-info .app-icon {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  flex: none;
  box-shadow: var(--shadow-sm), 0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}
.game-info .game-details {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.game-info .game-info__title {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 22px;
  letter-spacing: -0.01em;
  word-break: break-word;
}
.game-info .hero__subtitle { display: none; }

.game-info .player-count {
  display: flex;
  align-items: center;
  gap: 4px;
}
.game-info .player-count .icon { width: 13px; height: 13px; margin-right: 4px; }
.game-info .player-count .stat { font-size: 11.5px; color: var(--muted); line-height: 1; }
.game-info .player-count .count {
  font-size: 11.5px;
  line-height: 1;
  font-weight: 700;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-info .game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 16px;
}
.game-info .tag {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 8px;
  color: var(--brand);
  font-size: 9.8px;
  font-weight: 600;
  border-radius: 999px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.2);
}

/* 下载按钮：渐变发光胶囊 */
.game-info .download-section {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}
.game-info .download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 15px;
  border-radius: 16px;
  flex: 1 1 0;
  min-width: 0;
  border: none;
  text-decoration: none;
  color: #fff;
  background: var(--grad-brand);
  box-shadow: var(--glow-brand);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}
.game-info .download-btn:nth-child(2) {
  background: var(--grad-accent);
  box-shadow: var(--glow-accent);
}
.game-info .download-btn:active { transform: translateY(1px) scale(0.99); opacity: 0.92; }
.game-info .download-btn .lf-icon {
  width: 18px; height: 18px; margin-right: 7px; flex: none;
  filter: brightness(0) invert(1);
}
.game-info .download-btn .label {
  color: #fff;
  font-size: 14px;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}
.game-info .download-btn.is-disabled {
  background: rgba(120, 124, 150, 0.45);
  box-shadow: none;
  opacity: 1;
}
.game-info .download-btn.is-disabled .label,
.game-info .download-btn.is-disabled .lf-icon { color: #fff; opacity: 0.9; }

/* ── 文字标题通用 ── */
.section-heading h2,
.modal__dialog h3 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ============================================================
   通用按钮
   ============================================================ */
.ghost-btn {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  padding: 9px 16px;
  border-radius: 999px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.cta-btn:hover { transform: translateY(-1px); }
.cta-btn:active { transform: translateY(1px) scale(0.99); }
.cta-btn:disabled,
.is-disabled { opacity: 0.45; pointer-events: none; }

.cta-btn--primary {
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow-brand);
}
.cta-btn--secondary {
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.cta-btn--dark {
  background: rgba(29, 35, 66, 0.9);
  color: #fff;
  border: 1px solid rgba(29, 35, 66, 0.9);
}
.cta-btn--ghost-light {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================================
   主内容 —— 每个 section 独立浮卡
   ============================================================ */
.main-content {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  margin: 0;
  background: transparent;
}

.panel {
  border-radius: var(--radius-lg);
  padding: 16px 16px 18px;
  background: var(--glass);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0;
}
.section-heading h2 {
  position: relative;
  padding-left: 12px;
  font-size: 17px;
  color: var(--ink);
  line-height: 24px;
  font-weight: 800;
}
/* 标题左侧渐变竖条 */
.section-heading h2::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: var(--grad-brand);
}
.section-heading p { display: none; }

.game_jianjie,
.banner { padding-top: 16px; }
.game_jianjie .section-heading p,
.official_activity .section-heading p,
.banner .section-heading p { display: none; }

/* ── 简介 ── */
.intro-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 0;
}
.intro-copy { position: relative; display: grid; gap: 4px; }
.intro-copy__body {
  max-height: none;
  overflow: visible;
  transition: max-height 0.3s ease;
}
.intro-copy__body.is-collapsed {
  max-height: 130px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 58%, transparent 100%);
}
.intro-copy__body.is-expanded { max-height: none; }
.intro-expand-btn {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  gap: 2px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 0 0;
  cursor: pointer;
}
#introText {
  margin: 0;
  line-height: 22px;
  font-size: 13px;
  color: #2b3052;
  text-indent: 1.6em;
  white-space: pre-line;
}
.intro-art img {
  width: 100%;
  border-radius: var(--radius-md);
  min-height: 220px;
  object-fit: cover;
  display: none;
}

/* ============================================================
   截图画廊
   ============================================================ */
.gallery-shell {
  display: block;
  padding: 0;
  position: relative;
}
.gallery-track-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border-radius: var(--radius-md);
  padding: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: transparent;
}
.gallery-track-wrap::-webkit-scrollbar { display: none; }
.gallery-track { display: flex; gap: 10px; transition: none; }
.gallery-slide {
  width: 46%;
  min-width: 46%;
  flex: 0 0 46%;
  box-sizing: border-box;
}
.gallery-slide img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.gallery-preview {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 14, 40, 0.78);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.gallery-preview img {
  max-width: 92%;
  max-height: 88vh;
  border-radius: var(--radius-md);
  object-fit: contain;
  box-shadow: var(--shadow);
}
.gallery-preview__bar { display: none; }
.gallery-preview__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 31;
  transition: background 0.15s;
}
.gallery-preview__nav:hover { background: rgba(255, 255, 255, 0.3); }
.gallery-preview__prev { left: 10px; }
.gallery-preview__next { right: 10px; }

.gallery-nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  border: none;
  background: var(--glass-strong);
  color: var(--brand);
  box-shadow: var(--shadow-sm);
}

.gallery-dots { display: none; justify-content: center; margin-top: 10px; gap: 6px; }
.gallery-dots--inline { display: flex; }
.gallery-dots button {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  padding: 0;
  border: none;
  opacity: 0.5;
  background: rgba(124, 92, 255, 0.4);
  transition: width 0.2s ease, opacity 0.2s ease;
}
.gallery-dots button.is-active {
  width: 18px;
  opacity: 1;
  background: var(--grad-brand);
}

.gallery-thumbs {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.gallery-thumb {
  padding: 3px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid transparent;
  opacity: 0.72;
}
.gallery-thumb.is-active { border-color: var(--brand); opacity: 1; }
.gallery-thumb img {
  width: 100%;
  aspect-ratio: 10 / 17;
  object-fit: cover;
  border-radius: 10px;
}

/* ============================================================
   下载卡 / 主下载按钮（保留，玻璃化）
   ============================================================ */
.download-grid {
  display: flex;
  gap: 10px;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.download-grid::-webkit-scrollbar { display: none; }
.download-grid-wrap { padding: 0; }
.download-row-label { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.download-actions-bar { display: none; }

.download-main-btn {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px 16px 16px 58px;
  border-radius: var(--radius-md);
  min-height: 76px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
}
.download-main-btn::before {
  content: attr(data-icon);
  position: absolute;
  left: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  background: var(--grad-brand);
}
.download-main-btn strong { font-size: 16px; color: var(--ink); }
.download-main-btn span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.download-main-btn.is-primary {
  background: var(--grad-brand);
  border-color: transparent;
  box-shadow: var(--glow-brand);
}
.download-main-btn.is-primary strong,
.download-main-btn.is-primary span { color: #fff; }
.download-main-btn.is-primary::before { background: rgba(255, 255, 255, 0.22); }

.download-card {
  min-width: 142px;
  border-radius: var(--radius-md);
  padding: 10px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.download-card::after { display: none; }
.download-card strong { color: var(--ink); font-size: 12px; display: block; margin-bottom: 6px; }
.download-card p { color: var(--muted); font-size: 11px; margin: 0 0 10px; line-height: 1.6; }
.download-card .cta-btn {
  min-height: 32px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  box-shadow: none;
}
.cta-btn--h5-chip { background: var(--grad-brand); color: #fff; }
.cta-btn--download-chip { background: var(--grad-accent); color: #fff; }

.download-note {
  margin: 0;
  padding: 6px 0 0;
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 11px;
}

/* ── 通知 / 官方活动 ── */
.notice-list { display: grid; gap: 8px; }
.text-link-btn {
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 13px;
  line-height: 22px;
  padding: 0;
}
.notice-item { padding: 10px 0; border: 0; background: transparent; }
.official_activity {
  border-radius: var(--radius-lg);
  padding: 16px;
}
.official_activity .section-heading { padding: 0; margin-bottom: 12px; }
.notice-list--activities { padding: 0; gap: 10px; }
.notice-item--official {
  display: block;
  padding: 14px;
  background: var(--glass-strong);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.notice-item--official::before { display: none; }
.notice-item--official strong { position: relative; padding-left: 18px; margin-bottom: 7px; }
.notice-item--official strong::before {
  content: "";
  position: absolute;
  left: 0; top: 4px;
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--grad-brand);
}
.notice-item strong { color: var(--ink); font-size: 13px; line-height: 18px; display: block; margin-bottom: 6px; }
.notice-item p { color: var(--muted); font-size: 12px; line-height: 18px; margin: 0; }

/* ── 引导卡 ── */
.guide-notice-box {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.16);
}
.guide-notice-box__icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--grad-brand);
}
.guide-notice-box__icon img { width: 22px; height: 22px; filter: brightness(0) invert(1); }
.guide-notice-box strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 20px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.guide-notice-box p { margin: 0; color: var(--brand); line-height: 16px; font-size: 12px; }

.guide-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 0; }
.guide-card {
  display: grid;
  grid-template-columns: 166px 1fr;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
}
.guide-card:nth-child(even) { grid-template-columns: 1fr 166px; }
.guide-card:nth-child(even) img { order: 2; }
.guide-card:nth-child(even) .guide-card__body { order: 1; }
.guide-card img {
  width: 156px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.guide-card h3 { color: var(--ink); font-size: 15px; line-height: 20px; margin: 0 0 4px; }
.guide-card p { color: var(--muted); font-size: 13px; line-height: 17px; margin: 0; }

/* ============================================================
   底部固定栏（玻璃浮条）
   ============================================================ */
.sticky-footer,
.footer_fix {
  position: fixed;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: min(calc(100% - 24px), 576px);
  min-height: 60px;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  box-shadow: var(--shadow);
  z-index: 12;
}
.sticky-footer__meta {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  min-width: 0;
  flex: 1;
}
.game_name { min-width: 0; }
.sticky-footer__actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.sticky-footer__actions .cta-btn {
  min-height: auto;
  height: 44px;
  min-width: 110px;
  padding: 0 28px;
  border-radius: 22px;
  background: var(--grad-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: var(--glow-accent);
  border: 0;
  white-space: nowrap;
}
.sticky-footer__actions #footerIosButton { display: none; }
.sticky-footer__icon {
  width: 44px; height: 44px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
}
.sticky-footer__title {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 800;
  line-height: 18px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sticky-footer__desc {
  margin: 0;
  line-height: 15px;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ============================================================
   弹窗
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(18, 14, 40, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  padding: 16px;
}
.modal__dialog {
  position: relative;
  width: min(100%, 520px);
  border-radius: var(--radius-xl);
  padding: 24px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--glass-strong);
}
.register-view,
.login-view,
.cf-gate-view {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cf-gate-view { width: min(100%, 420px); align-items: center; text-align: center; }
.cf-gate__body { min-height: 76px; display: flex; justify-content: center; align-items: center; }
.modal__close {
  position: absolute;
  right: 16px; top: 16px;
  width: 30px; height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.1);
  padding: 0;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.modal__close:hover { background: rgba(124, 92, 255, 0.2); }

.game-header { padding: 1px; border-radius: var(--radius-md); }
.game-title {
  padding: 4px 20px 0;
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.step-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.step-tag {
  border: 1px solid var(--brand);
  color: var(--brand);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 20px;
  white-space: nowrap;
}
.step-title { color: var(--ink); font-size: 16px; font-weight: 700; line-height: 24px; margin: 0; }

.card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
}
.form-grid { display: grid; gap: 14px; margin-top: 0; }
.form-grid label { display: grid; gap: 5px; font-size: 12px; color: #3a4067; }
.form-grid input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, 0.22);
  background: rgba(255, 255, 255, 0.7);
  padding: 8px 14px;
  color: var(--ink);
  font-size: 13px;
  line-height: 20px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.form-grid input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}

/* ── auth 引导 ── */
.auth-download-panel,
.auth-guide-panel { padding: 0; border: 0; background: transparent; }
.auth-mini-downloads { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mini-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  min-height: 42px;
  border-radius: 14px;
  border: 0;
  background: var(--grad-brand);
  color: #fff;
  box-shadow: var(--glow-brand);
}
.mini-download-btn__icon { width: 15px; height: 15px; flex: none; filter: brightness(0) invert(1); }
.mini-download-btn strong { font-size: 12px; line-height: 20px; }
.mini-download-btn span { display: none; }

.mini-guide-list { display: grid; gap: 16px; }
.mini-guide-item {
  display: grid;
  grid-template-columns: 166px 1fr;
  gap: 12px;
  align-items: center;
  padding: 0;
  background: transparent;
  border: 0;
}
.mini-guide-item img { width: 166px; height: auto; object-fit: cover; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
.mini-guide-item strong { display: block; margin-bottom: 8px; font-size: 16px; color: var(--ink); }
.mini-guide-item p { margin: 0; color: var(--muted); line-height: 17px; font-size: 14px; }

.mini-guide-notice {
  background: rgba(124, 92, 255, 0.08);
  border: 1px solid rgba(124, 92, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.mini-guide-notice__icon {
  background: var(--grad-brand);
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}
.mini-guide-notice__icon img { width: 20px; height: 20px; filter: brightness(0) invert(1); }
.mini-guide-notice__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.mini-guide-notice__desc { margin: 0; font-size: 12px; line-height: 16px; color: var(--brand); }

.register-download-card,
.register-guide-showcase,
.register-guide-steps-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.5);
}
.register-guide-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 12px;
  align-items: center;
  min-height: 330px;
}
.register-guide-showcase__copy { align-self: center; padding-left: 14px; }
.register-guide-showcase__copy h5 { margin: 0 0 10px; color: var(--ink); font-size: 15px; line-height: 20px; font-weight: 700; }
.register-guide-showcase__copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 18px; }
.register-guide-showcase__visual { display: flex; justify-content: center; align-items: center; }
.register-guide-showcase__visual img { width: 160px; max-width: 100%; height: auto; object-fit: contain; }
.register-guide-steps-card { margin-top: 12px; }
.mini-guide-list--register { gap: 22px; }
.mini-guide-list--register .mini-guide-item {
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 18px;
  align-items: center;
  min-height: 220px;
}
.mini-guide-list--register .mini-guide-item:nth-child(even) { grid-template-columns: 180px minmax(0, 1fr); }
.mini-guide-list--register .mini-guide-item:nth-child(even) img { order: 1; }
.mini-guide-list--register .mini-guide-item:nth-child(even) div { order: 2; }
.mini-guide-list--register .mini-guide-item img { width: 180px; margin: 0 auto; }
.mini-guide-list--register .mini-guide-item strong { margin-bottom: 10px; font-size: 15px; line-height: 22px; color: var(--ink); }
.mini-guide-list--register .mini-guide-item p { color: var(--muted); font-size: 11px; line-height: 18px; }
.register-guide-footer-note { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 18px; }

/* ============================================================
   toast / 提示遮罩
   ============================================================ */
.toast {
  position: fixed;
  left: 50%; top: 18px;
  transform: translateX(-50%);
  z-index: 25;
  min-width: 220px;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(29, 35, 66, 0.88);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
  text-align: center;
  font-size: 13px;
  box-shadow: var(--shadow);
}

.browser-tip {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: rgba(18, 14, 40, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start center;
  padding: 32px 16px;
}
.browser-tip__card {
  width: min(100%, 420px);
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--glass-strong);
  color: var(--ink);
}
.browser-tip__card p { margin: 0 0 14px; line-height: 1.8; }

.share-overlay {
  position: fixed;
  inset: 0;
  z-index: 16;
  background: rgba(18, 14, 40, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: start end;
  padding: 18px;
}
.share-overlay__content { max-width: 320px; color: #fff; text-align: right; }
.share-overlay__arrow { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.share-overlay__text strong { display: block; font-size: 22px; margin-bottom: 8px; }
.share-overlay__text p { margin: 0 0 14px; color: rgba(255, 255, 255, 0.85); line-height: 1.7; }

/* ============================================================
   语言切换
   ============================================================ */
.lang-switch { position: fixed; top: 14px; right: 14px; z-index: 200; }
.lang-switch__btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.3);
  color: var(--ink);
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  line-height: 1;
  box-shadow: var(--shadow-sm);
}
.lang-switch__icon { width: 14px; height: 14px; flex-shrink: 0; }
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: var(--glass-strong);
  border-radius: 14px;
  min-width: 100%;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.lang-switch__menu li { padding: 8px 16px; color: var(--ink); font-size: 12px; cursor: pointer; white-space: nowrap; }
.lang-switch__menu li:hover { background: rgba(124, 92, 255, 0.1); }
.lang-switch__menu li.is-active { color: var(--brand); font-weight: 700; }

.server-status-bar {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: var(--grad-brand);
  margin-top: 8px;
}

/* ============================================================
   验证码（功能尺寸保留，仅换色）
   ============================================================ */
.slider-captcha { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 4px 0; user-select: none; }
.slider-captcha__image {
  position: relative;
  width: 280px;
  height: 155px;
  border-radius: 12px;
  overflow: hidden;
  background: #221b3a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.slider-captcha__bg { width: 100%; height: 100%; display: block; pointer-events: none; }
.slider-captcha__piece { position: absolute; left: -9px; top: 0; pointer-events: none; opacity: 0; transition: opacity 0.15s ease; }
.slider-captcha__refresh {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 14px;
  line-height: 26px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
.slider-captcha__refresh:hover { background: rgba(0, 0, 0, 0.7); }
.slider-captcha__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ddd;
  font-size: 12px;
  background: rgba(0, 0, 0, 0.45);
}
.slider-captcha__track {
  position: relative;
  width: 280px;
  height: 40px;
  background: rgba(124, 92, 255, 0.1);
  border: 1px solid rgba(124, 92, 255, 0.18);
  border-radius: 20px;
  overflow: hidden;
}
.slider-captcha__fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: rgba(124, 92, 255, 0.28); pointer-events: none; }
.slider-captcha__tip {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.slider-captcha__tip.is-success { color: #2e9e63; }
.slider-captcha__tip.is-error { color: #e0455e; }
.slider-captcha__handle {
  position: absolute;
  left: 0; top: 0;
  width: 44px; height: 40px;
  background: #fff;
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  line-height: 38px;
  color: var(--brand);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.slider-captcha__handle:active { cursor: grabbing; background: #f5f3ff; }

.captcha-block { margin-top: 8px; }

.cf-turnstile { min-height: 65px; display: flex; justify-content: center; align-items: center; }
.cf-turnstile[hidden] { display: none; }

.rotate-captcha__image { position: relative; display: inline-block; margin-bottom: 8px; }
.rotate-captcha__image img { display: block; transition: transform 0.05s linear; }

.text-click-captcha__prompt { font-size: 14px; margin-bottom: 6px; color: var(--ink); }
.text-click-captcha__image {
  position: relative;
  display: inline-block;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}
.text-click-captcha__image img { display: block; pointer-events: none; }
.text-click-captcha__marks { position: absolute; inset: 0; pointer-events: none; }
.text-click-captcha__dot {
  position: absolute;
  width: 22px; height: 22px;
  margin-left: -11px; margin-top: -11px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.9);
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
}
.text-click-captcha__reset {
  margin-top: 6px;
  padding: 4px 12px;
  font-size: 12px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  cursor: pointer;
}

.image-code-captcha__image {
  position: relative;
  display: block;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
}
.image-code-captcha__image img { display: block; max-width: 100%; height: auto; }
.image-code-captcha__input {
  margin-top: 10px;
  width: 100%;
  height: 46px;
  border: 1px solid rgba(124, 92, 255, 0.22);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.7);
  box-sizing: border-box;
}
.image-code-captcha__input:focus {
  border-color: var(--brand);
  outline: none;
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.15);
}
.form-grid .image-code-captcha { margin-top: 4px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 860px) {
  .section-heading { display: flex; }
  .sticky-footer__meta { grid-template-columns: 40px 1fr; gap: 8px; }
  .sticky-footer__icon { width: 40px; height: 40px; }
  .sticky-footer__title { font-size: 13px; }
  .sticky-footer__desc { font-size: 10px; }
  .sticky-footer__actions .cta-btn { height: 40px; min-width: 90px; padding: 0 18px; font-size: 14px; }
  .gallery-nav { display: none; }
  .auth-mini-downloads,
  .guide-notice-box { grid-template-columns: 1fr; }
}

/* ============================================================
   阿拉伯语 RTL 镜像（html[dir="rtl"] 时生效）
   交互组件（验证码 / 滑块 / 画廊）强制保持 LTR：
   JS 会在这些元素上写内联 left/width/transform 坐标，
   一旦翻转方向坐标会错乱，故只镜像文字与静态布局。
   ============================================================ */
[dir="rtl"] body { text-align: right; }

/* 语言切换器移到左上角 */
[dir="rtl"] .lang-switch { right: auto; left: 14px; }
[dir="rtl"] .lang-switch__menu { right: auto; left: 0; }

/* 图标与文字间距镜像 */
[dir="rtl"] .game-info .player-count .icon { margin-right: 0; margin-left: 4px; }
[dir="rtl"] .game-info .download-btn .lf-icon { margin-right: 0; margin-left: 7px; }

/* 标题左侧渐变竖条移到右侧 */
[dir="rtl"] .section-heading h2 { padding-left: 0; padding-right: 12px; }
[dir="rtl"] .section-heading h2::before { left: auto; right: 0; }

/* 官方活动条目项目符号镜像 */
[dir="rtl"] .notice-item--official strong { padding-left: 0; padding-right: 18px; }
[dir="rtl"] .notice-item--official strong::before { left: auto; right: 0; }

/* 弹窗关闭按钮移到左上 */
[dir="rtl"] .modal__close { right: auto; left: 16px; }

/* 注册引导文案内边距镜像 */
[dir="rtl"] .register-guide-showcase__copy { padding-left: 0; padding-right: 14px; }

/* 交互组件强制 LTR，保护 JS 内联坐标（验证码 / 滑块 / 画廊） */
[dir="rtl"] .gallery-track-wrap,
[dir="rtl"] .gallery-track,
[dir="rtl"] .gallery-preview,
[dir="rtl"] .slider-captcha,
[dir="rtl"] .rotate-captcha,
[dir="rtl"] .text-click-captcha,
[dir="rtl"] .image-code-captcha { direction: ltr; }

@media (max-width: 640px) {
  :root { --footer-height: 150px; }
  .hero__banner-frame,
  .hero__banner-image { min-height: 180px; }
  .modal__dialog { padding: 18px; }
  .sticky-footer__actions { width: auto; }
  .game-info .download-btn { min-height: 44px; padding: 0 10px; }
  .game-info .download-btn .lf-icon { width: 16px; height: 16px; margin-right: 6px; }
  .sticky-footer__actions .cta-btn { min-width: 120px; height: 44px; font-size: 15px; }
  .mini-guide-item,
  .guide-card,
  .guide-card:nth-child(even) { grid-template-columns: 1fr; }
  .mini-guide-item img,
  .guide-card img { width: 100%; max-width: 166px; }
  .register-download-card,
  .register-guide-showcase,
  .register-guide-steps-card { padding: 16px; }
  .register-guide-showcase { grid-template-columns: 1fr; min-height: 0; }
  .register-guide-showcase__copy { padding-left: 0; }
  .register-guide-showcase__visual img { width: 156px; }
  .mini-guide-list--register .mini-guide-item,
  .mini-guide-list--register .mini-guide-item:nth-child(even) { grid-template-columns: 1fr; min-height: 0; }
  .mini-guide-list--register .mini-guide-item img,
  .mini-guide-list--register .mini-guide-item:nth-child(even) img { order: 0; width: 156px; }
  .mini-guide-list--register .mini-guide-item div,
  .mini-guide-list--register .mini-guide-item:nth-child(even) div { order: 0; }
}
