/* ========================================================================
   游界前台交互主题
   说明：该文件会在页面内联样式之后加载，用于低侵入式统一前台视觉与交互。
   ======================================================================== */

:root {
  color-scheme: light;

  /* 说明：--color-* 通用色板统一由 main.css 单一定义（单一 token 源），
     本文件不再重复定义，避免两处值漂移（历史上 secondary 曾漂为青色）。
     这里只保留 interaction 主题专用变量。 */

  /* 主题专用变量 */
  --yx-bg: #f8fafc;
  --yx-bg-soft: #ffffff;
  --yx-card: rgba(255, 255, 255, 0.88);
  --yx-card-strong: #ffffff;
  --yx-border: rgba(148, 163, 184, 0.30);
  --yx-border-strong: rgba(14, 165, 233, 0.55);
  --yx-glow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 36px rgba(15, 23, 42, 0.08);
  --yx-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
  --yx-primary-gradient: #0284c7;
  --yx-radius: 18px;
  --yx-radius-sm: 12px;
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  color: var(--color-text-primary);
  background: #f5f7fa;
  letter-spacing: 0;
}

::selection {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.75);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #e8eef6;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #e8eef6;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.38);
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(14, 165, 233, 0.62);
}

a {
  transition: color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
}

:focus-visible {
  outline: 2px solid rgba(14, 165, 233, 0.9);
  outline-offset: 3px;
}

/* ================================ 导航 ================================ */
.navbar {
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.07);
}

.navbar__container {
  gap: 20px;
}

.navbar__logo {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: transparent !important;
  background: linear-gradient(120deg, #0369a1 10%, #0ea5e9 55%, #06b6d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 25px;
  letter-spacing: 0.04em;
}

.navbar__menu {
  gap: 8px;
}

.navbar__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 7px 13px;
  border-radius: 999px;
  color: rgba(51, 65, 85, 0.88) !important;
}

.navbar__link::after {
  display: none;
}

.navbar__link:hover,
.navbar__link--active {
  color: #0369a1 !important;
  background: rgba(14, 165, 233, 0.13);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.24);
}

.navbar__actions {
  gap: 10px;
  align-items: center;
}

.navbar__toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.30);
  color: #1e293b;
  background: rgba(255, 255, 255, 0.85);
}

.navbar__mobile-menu {
  overflow: hidden;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: #ffffff;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.10);
}

.navbar__mobile-menu-inner {
  padding: 18px 4px 22px;
}

.navbar__mobile-nav {
  gap: 4px;
}

.navbar__mobile-nav .navbar__link {
  width: 100%;
  justify-content: center;
}

.navbar__mobile-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.navbar__mobile-user {
  grid-column: 1 / -1;
  color: #64748b !important;
}

/* ================================ 按钮 ================================ */
.btn,
.login-submit,
#haipay-submit-btn,
.payment-result-actions a {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease,
    border-color 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.btn:active,
.login-submit:active,
#haipay-submit-btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  color: rgba(100, 116, 139, 0.45) !important;
  background: rgba(148, 163, 184, 0.12) !important;
  border-color: rgba(148, 163, 184, 0.25);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
}

.btn--primary,
.payment-result-actions .btn-primary,
.login-submit,
#haipay-submit-btn {
  border: 0;
  color: #ffffff !important;
  background: var(--yx-primary-gradient);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(8, 145, 178, 0.16);
}

.btn--primary:hover:not(:disabled),
.payment-result-actions .btn-primary:hover,
.login-submit:hover:not(:disabled),
#haipay-submit-btn:hover:not(:disabled) {
  background: #0369a1;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(8, 145, 178, 0.22);
}

.btn--secondary,
.payment-result-actions .btn-secondary {
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(241, 245, 249, 0.95);
}

.btn--secondary:hover,
.payment-result-actions .btn-secondary:hover {
  color: #0369a1;
  border-color: rgba(14, 165, 233, 0.52);
  background: rgba(14, 165, 233, 0.16);
}

.btn--outline {
  color: #1e293b !important;
  border: 1px solid rgba(14, 165, 233, 0.45);
  background: rgba(255, 255, 255, 0.75);
}

.btn--outline:hover {
  color: #0369a1 !important;
  border-color: rgba(14, 165, 233, 0.68);
  background: rgba(14, 165, 233, 0.14);
}

/* ================================ 版式 ================================ */
.main-content {
  position: relative;
  z-index: 1;
}

.section {
  padding: 72px 0;
}

.section__header {
  margin-bottom: 44px;
}

.section__title {
  color: #0f172a;
  letter-spacing: 0;
}

.section__subtitle {
  color: var(--color-text-secondary);
}

.bg-neutral {
  background: linear-gradient(180deg, rgba(241, 245, 249, 0) 0%, rgba(226, 232, 240, 0.85) 28%, rgba(241, 245, 249, 0) 100%);
}

/* Hero 保持原有图片层次，增强底部融入感 */
.hero {
  background: #f8fafc;
}

.hero::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 190px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), #f8fafc);
  z-index: 1;
  pointer-events: none;
}

.hero__title {
  color: #0f172a;
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.7);
}

.hero__actions .btn--outline {
  color: #0f172a !important;
}

/* ================================ 通用卡片 ================================ */
.card,
.feature-card,
.stats__item,
.game-meta-card,
.recharge-card {
  position: relative;
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  background: var(--yx-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--yx-glow);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.card:hover,
.feature-card:hover,
.game-meta-card:hover {
  transform: translateY(-3px);
  border-color: var(--yx-border-strong);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.14), 0 12px 30px rgba(15, 23, 42, 0.10);
}

.card__image {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 55%, #0369a1 100%);
}

.card__image img {
  filter: saturate(108%) contrast(104%);
}

.card__content,
.feature-card {
  color: var(--color-text-primary);
}

.card__meta,
.game-info__category,
.game-card__category {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  color: #0369a1 !important;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.card__title,
.feature-card__title {
  color: #0f172a;
  letter-spacing: 0;
}

.card__desc,
.feature-card__text {
  color: var(--color-text-secondary);
}

.card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card__footer {
  border-color: rgba(148, 163, 184, 0.25);
  color: var(--color-text-secondary);
}

.feature-card {
  padding: 24px;
}

.feature-card__icon {
  color: #0284c7;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.2);
}

/* ================================ 首页数据 ================================ */
.stats {
  position: relative;
  z-index: 1;
  margin-top: -18px;
  padding: 36px 0;
}

.stats__item {
  padding: 24px 18px;
  text-align: center;
}

.stats__item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.08), transparent 48%);
  pointer-events: none;
}

.stats__number {
  color: transparent;
  background: linear-gradient(120deg, #0369a1, #0284c7);
  -webkit-background-clip: text;
  background-clip: text;
  font-size: 34px;
  font-weight: 800;
}

.stats__label {
  color: var(--color-text-secondary);
}

/* ================================ 游戏库 ================================ */
.stats-bar {
  padding: 22px 0 34px;
}

.stats-bar__item {
  min-height: 122px;
  padding: 20px;
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  background: var(--yx-card);
  box-shadow: var(--yx-glow);
}

.stats-bar__item:hover {
  transform: translateY(-2px);
  border-color: var(--yx-border-strong);
}

.stats-bar__icon {
  color: #0284c7;
  background: rgba(14, 165, 233, 0.11);
}

.stats-bar__number {
  color: #0f172a;
}

.stats-bar__label,
.game-card__players {
  color: var(--color-text-secondary);
}

.games-list {
  padding-bottom: 68px;
}

.game-card {
  border: 1px solid var(--yx-border);
  border-radius: var(--yx-radius);
  background: var(--yx-card);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--yx-glow);
}

.game-card:hover {
  transform: translateY(-3px);
  border-color: var(--yx-border-strong);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.14), 0 12px 30px rgba(15, 23, 42, 0.10);
}

.game-card__image {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 55%, #0369a1 100%);
}

.game-card__overlay {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05), rgba(15, 23, 42, 0.55));
}

.game-card__title {
  color: #0f172a;
}

.game-card__desc {
  color: var(--color-text-secondary);
}

.game-card__footer {
  border-color: rgba(148, 163, 184, 0.25);
}

.game-card__play-btn,
.game-card__test-pay-btn {
  color: #ffffff;
  border: 0;
  background: var(--yx-primary-gradient);
  box-shadow: 0 12px 28px rgba(8, 145, 178, 0.24);
}

.game-card__test-pay-btn {
  background: linear-gradient(135deg, #f59e0b, #f97316);
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.22);
}

.game-card__status--active {
  color: #16a34a;
  background: rgba(16, 185, 129, 0.12);
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.40);
  border-radius: var(--yx-radius);
  color: var(--color-text-secondary);
  background: rgba(248, 250, 252, 0.85);
}

/* ================================ 登录注册 ================================ */
.login-section {
  min-height: calc(100vh - 68px);
  padding: 56px 0;
}

.login-container {
  max-width: 470px;
}

.login-card {
  padding: 32px;
  border: 1px solid var(--yx-border);
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-title {
  color: #0f172a;
}

.login-tabs {
  position: relative;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 999px;
  background: rgba(241, 245, 249, 0.92);
}

.login-tab {
  color: var(--color-text-secondary);
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.login-tab:hover:not(.active) {
  color: #1e293b;
  background: rgba(148, 163, 184, 0.12);
}

.login-tab.active {
  color: #ffffff;
  background: var(--yx-primary-gradient);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.18);
}

.login-tab svg {
  color: currentColor;
}

.form-label {
  color: #475569;
}

/* ================================ 认证页分屏布局（登录/注册） ================================ */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(400px, 5fr) 7fr;
  min-height: calc(100vh - 65px);
  background: #ffffff;
}

.auth-aside {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  color: #ffffff;
  background: linear-gradient(155deg, #075985 0%, #0284c7 55%, #06b6d4 100%);
}

.auth-aside::before,
.auth-aside::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.10);
}

.auth-aside::before {
  width: 340px;
  height: 340px;
  top: -120px;
  right: -100px;
}

.auth-aside::after {
  width: 260px;
  height: 260px;
  bottom: -100px;
  left: -80px;
  background: rgba(255, 255, 255, 0.07);
}

.auth-aside__inner {
  position: relative;
  z-index: 1;
  max-width: 400px;
}

.auth-aside__logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  color: var(--color-primary);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(2, 32, 71, 0.25);
  margin-bottom: 28px;
}

.auth-aside__name {
  font-size: 30px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}

.auth-aside__slogan {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 36px;
}

.auth-aside__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-aside__points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.92);
}

.auth-aside__points svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #ffffff;
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

/* 认证页大号填充式输入框 */
.auth-main .form-input {
  height: 52px;
  padding: 0 16px;
  background: #f5f5f7 !important;
  border-color: transparent !important;
  box-shadow: none;
}

.auth-main .form-input:hover {
  background: #eef0f4 !important;
}

.auth-main .form-input:focus {
  background: #ffffff !important;
  border-color: rgba(14, 165, 233, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.auth-main .captcha-wrapper {
  height: 52px;
  border-radius: 12px;
  background: #f5f5f7 !important;
  border-color: transparent !important;
}

.auth-main .login-submit {
  height: 52px;
  border-radius: 14px;
  font-size: 16px;
}

.auth-main .login-title {
  font-size: 26px;
}

/* 手机横屏（矮视口）：认证卡片紧凑化，减少滚动 */
@media (orientation: landscape) and (max-height: 500px) {
  .auth-main {
    padding: 16px;
    align-items: flex-start;
  }
  .auth-card {
    max-width: 480px;
    padding: 20px 24px;
  }
  .auth-card .login-brand,
  .auth-card .login-subtitle {
    display: none;
  }
  .auth-card .login-title {
    font-size: 20px;
    margin-bottom: 16px;
  }
  .auth-card .form-group {
    margin-bottom: 12px;
  }
  .auth-card .form-input,
  .auth-card .captcha-wrapper,
  .auth-card .login-submit {
    height: 44px;
  }
  .auth-card .login-footer {
    margin-top: 14px;
  }
}

@media (max-width: 380px) {
  .auth-main .captcha-group {
    gap: 8px;
  }
  .auth-main .captcha-wrapper {
    min-width: 84px !important;
  }
  .auth-main .captcha-group .form-input {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    background: #f5f5f7;
  }
  .auth-aside {
    display: none;
  }
  .auth-main {
    padding: 32px 16px 56px;
    background: transparent;
  }
  .auth-card {
    max-width: 440px;
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 24px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.08);
  }
}

/* 认证页共用结构（登录/注册） */
.login-section {
  min-height: calc(100vh - 200px);
  display: flex;
  align-items: center;
  padding: 20px 16px;
}

.login-container {
  width: 100%;
  margin: 0 auto;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 14px;
}

.form-input {
  width: 100%;
  font-size: 16px;
  -webkit-appearance: none;
  appearance: none;
}

.captcha-group {
  display: flex;
  gap: 12px;
  align-items: center;
}

.captcha-group .form-input {
  flex: 1;
}

.captcha-wrapper {
  position: relative;
  min-width: 100px;
  height: 48px;
  flex-shrink: 0;
}

.login-submit {
  width: 100%;
  padding: 14px 24px;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #64748b;
}

.login-footer a {
  color: var(--color-primary);
  font-weight: 500;
  text-decoration: none;
}

/* 登录/注册品牌标识 */
.login-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}


/* 图片版 logo（img 标签复用同名 class）：覆盖文字 logo 的 flex/字体样式 */
img.auth-aside__logo,
img.login-brand__logo {
  display: block;
  object-fit: cover;
  font-size: 0;
  color: transparent;
  background: none;
}

.login-brand__logo {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 700;
  color: #ffffff;
  background: var(--yx-primary-gradient);
  box-shadow: 0 8px 20px rgba(8, 145, 178, 0.25);
}

.login-subtitle {
  margin: -12px 0 24px;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* 验证码换题：轻量文字按钮 */
.captcha-refresh {
  padding: 0 6px;
  border: none;
  background: none;
  color: var(--color-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.captcha-refresh:hover {
  color: var(--color-primary-dark);
}

.form-input,
.recharge-select,
#haipay-form input,
.game-pay-option input,
.profile input,
.profile select {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  color: var(--color-text-primary) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.form-input::placeholder,
.recharge-select::placeholder,
#haipay-form input::placeholder {
  color: rgba(100, 116, 139, 0.55) !important;
}

.form-input:focus,
.recharge-select:focus,
#haipay-form input:focus {
  border-color: rgba(14, 165, 233, 0.72) !important;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.12);
}

.phone-prefix {
  color: #475569;
  border-color: rgba(148, 163, 184, 0.35);
  background: rgba(241, 245, 249, 0.92);
}

.captcha-group .form-input {
  background: rgba(255, 255, 255, 0.96) !important;
}

.captcha-wrapper,
.login-card .captcha-wrapper[style] {
  border-color: var(--yx-border) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

.captcha-wrapper .captcha-image {
  mix-blend-mode: normal;
}

.captcha-hint,
.captcha-input-hint,
.login-footer {
  color: var(--color-text-secondary);
}

.login-footer a,
.captcha-hint a {
  color: #0284c7;
}

.login-footer a:hover,
.captcha-hint a:hover {
  color: #0f172a;
}

.sms-btn {
  color: #ffffff;
  border: 0;
  background: var(--yx-primary-gradient);
}

.sms-btn:disabled {
  color: rgba(100, 116, 139, 0.45) !important;
  background: rgba(148, 163, 184, 0.15) !important;
}

.alert,
#haipay-form-error {
  border: 1px solid rgba(248, 113, 113, 0.28);
  color: #b91c1c !important;
  background: rgba(254, 226, 226, 0.9) !important;
  border-radius: 12px;
}

.alert--success {
  border-color: rgba(16, 185, 129, 0.35);
  color: #15803d !important;
  background: rgba(220, 252, 231, 0.9) !important;
}

.form-input.captcha-input-error,
.captcha-input-error {
  border-color: rgba(248, 113, 113, 0.75) !important;
}

/* ================================ 充值流程 ================================ */
.recharge-page {
  min-height: calc(100vh - 68px);
  padding: 52px 0 72px;
  background: transparent;
}

.recharge-card {
  padding: 24px;
  border-radius: 20px;
}

.recharge-card h2[style] {
  color: #0f172a !important;
}

.recharge-select {
  min-height: 48px;
  padding: 12px 14px;
  appearance: none;
}

.recharge-select:disabled {
  color: rgba(100, 116, 139, 0.45) !important;
  background: rgba(148, 163, 184, 0.10) !important;
}

.recharge-tabs {
  gap: 2px;
  border-color: rgba(148, 163, 184, 0.26);
}

.recharge-tab {
  color: var(--color-text-secondary);
}

.recharge-tab::after {
  background: var(--yx-primary-gradient);
}

.recharge-tab:hover,
.recharge-tab.active {
  color: #0284c7;
}

.recharge-product-card {
  border: 1px solid var(--yx-border);
  border-radius: 16px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--yx-glow);
}

.recharge-product-card::before {
  background: var(--yx-primary-gradient);
}

.recharge-product-card:hover {
  transform: translateY(-3px);
  border-color: var(--yx-border-strong);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
}

.recharge-product-card.selected {
  border-color: rgba(14, 165, 233, 0.78);
  background: linear-gradient(160deg, rgba(14, 165, 233, 0.12), #ffffff);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.24), 0 22px 60px rgba(8, 145, 178, 0.2);
}

.recharge-payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid var(--yx-border);
  border-radius: 16px;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.94);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.recharge-payment-option:hover {
  transform: translateY(-3px);
  border-color: var(--yx-border-strong);
}

.recharge-payment-option.selected {
  border-color: rgba(14, 165, 233, 0.78);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.12), #ffffff);
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.24), 0 18px 46px rgba(8, 145, 178, 0.18);
}

/* 订单摘要内联颜色统一为暗色可读文本 */
.recharge-card label[style],
.recharge-page p[style],
.recharge-page span[style],
.recharge-page div[style] {
  color: inherit;
}

.recharge-card label[style] {
  color: #475569 !important;
}

.recharge-card span[style],
.recharge-card div[style] {
  color: var(--color-text-secondary);
}

.recharge-card span[style][id],
.recharge-card div[style][id],
.recharge-card div[style] > div[style] {
  color: #0f172a;
}

#payment-info,
.recharge-card div[style*="border-top"] {
  border-color: rgba(148, 163, 184, 0.26) !important;
}

#discount {
  color: #059669 !important;
}

#total {
  color: #0284c7 !important;
}

.recharge-page a[style] {
  color: #0284c7 !important;
}

/* HaiPay 弹窗 */
.recharge-modal-overlay {
  background: rgba(15, 23, 42, 0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.recharge-modal-content {
  max-height: min(88vh, 860px);
  border: 1px solid rgba(148, 163, 184, 0.30);
  border-radius: 22px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 38px 100px rgba(15, 23, 42, 0.22);
}

.recharge-modal-content > div:first-child {
  border-color: rgba(148, 163, 184, 0.26) !important;
}

.recharge-modal-content > div[style*="background"] {
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #0f172a;
  background: rgba(241, 245, 249, 0.92) !important;
}

.recharge-modal-content label[style] {
  color: #475569 !important;
}

.recharge-modal-content span[style],
.recharge-modal-content div[style] {
  color: var(--color-text-secondary);
}

.recharge-modal-content span[style][id],
.recharge-modal-content div[style][id] {
  color: #0f172a;
}

#haipay-amount {
  color: #059669 !important;
}

.haipay-method-option {
  border-radius: 12px;
}

.haipay-method-option,
.haipay-method-option[style*="#fff"],
.haipay-method-option[style*="rgb(255, 255, 255)"] {
  border-color: rgba(148, 163, 184, 0.30) !important;
  background: rgba(241, 245, 249, 0.92) !important;
  box-shadow: var(--yx-glow);
}

.haipay-method-option:hover {
  border-color: rgba(14, 165, 233, 0.58) !important;
  background: rgba(14, 165, 233, 0.12) !important;
}

.haipay-method-option[style*="rgba(16, 185, 129"],
.haipay-method-option[style*="10b981"] {
  border-color: rgba(14, 165, 233, 0.78) !important;
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.12), #ffffff) !important;
  box-shadow: 0 0 0 1px rgba(14, 165, 233, 0.24), 0 16px 38px rgba(8, 145, 178, 0.18);
}

.haipay-method-option div[style] {
  color: #0f172a;
}

.haipay-method-option div[style]:last-child {
  color: var(--color-text-secondary);
}

#haipay-status {
  color: #0f172a;
}

#haipay-status div[style] {
  color: var(--color-text-secondary);
}

#haipay-status div[style*="#fef2f2"],
#haipay-status div[style*="#fef3c7"] {
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #b91c1c !important;
  background: rgba(254, 226, 226, 0.9) !important;
}

/* ================================ 游戏内充值弹层 ================================ */
.game-pay-option,
.game-recharge-modal {
  border-color: var(--yx-border);
  color: #0f172a;
  background: rgba(241, 245, 249, 0.92);
}

.game-pay-option.selected {
  border-color: var(--yx-border-strong);
  background: rgba(14, 165, 233, 0.14);
}

/* ================================ 个人中心 ================================ */
.profile .card,
.section.bg-neutral > .container > .card {
  color: var(--color-text-primary);
}

.section.bg-neutral > .container > .card.mb-lg,
.card.mb-lg[style] {
  border-color: rgba(14, 165, 233, 0.22) !important;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.10), rgba(8, 145, 178, 0.05)) !important;
}

.profile .btn--primary {
  color: #ffffff;
}

.profile .btn--secondary {
  color: #334155;
}

/* ================================ 支付结果 ================================ */
.payment-result-wrap {
  min-height: calc(100vh - 68px);
  padding: 56px 0;
}

.payment-result-card {
  max-width: 520px;
  margin: 0 auto;
  padding: 40px 32px;
  border: 1px solid var(--yx-border);
  border-radius: 24px;
  color: #0f172a;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.14);
  text-align: center;
}

.payment-result-title {
  color: #0f172a;
}

.payment-result-desc {
  color: var(--color-text-secondary);
}

.payment-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================ 页脚 ================================ */
.footer {
  position: relative;
  color: var(--color-text-secondary);
  background: rgba(241, 245, 249, 0.96);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  right: 8%;
  width: min(520px, 70vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.55), transparent);
}

.footer__brand h3,
.footer__title {
  color: #0f172a;
}

.footer__bottom {
  border-color: rgba(148, 163, 184, 0.15);
}

.footer__link:hover {
  color: #0284c7;
}

/* ================================ 响应式 ================================ */
@media (max-width: 900px) {
  .section {
    padding: 56px 0;
  }

  .card.mb-lg[style] .card__content {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 28px !important;
  }
}

@media (max-width: 768px) {
  body {
    background-attachment: fixed;
  }

  .section {
    padding: 46px 0;
  }

  .navbar {
    min-height: 62px;
  }

  .navbar__mobile-actions {
    margin-top: 12px;
  }

  .login-card {
    padding: 24px 18px;
    border-radius: 18px;
  }

  .recharge-card {
    padding: 18px;
    border-radius: 16px;
  }

  .recharge-modal-content {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .payment-result-card {
    padding: 32px 20px;
  }
}

@media (max-width: 520px) {
  .login-tab {
    min-height: 46px;
  }

  .login-submit,
  .btn,
  #haipay-submit-btn {
    width: 100%;
  }

  .navbar__mobile-actions {
    grid-template-columns: 1fr;
  }

  .payment-result-actions {
    flex-direction: column;
  }

  .payment-result-actions a {
    width: 100%;
  }
}

@media (hover: none) {
  .card:hover,
  .feature-card:hover,
  .game-card:hover,
  .stats-bar__item:hover,
  .recharge-product-card:hover,
  .recharge-payment-option:hover {
    transform: none;
  }
}

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