/**
 * FXPPAY 全站视觉重构
 * 保留功能、模块与文案，重做风格 / 布局 / 色调，确保对比度可读。
 */

/* ========== 设计系统：色彩与字体 ========== */
:root {
  --fxp-dark-bg: #050505;
  --fxp-dark-bg-2: #0b1020;
  --fxp-dark-card: rgba(255, 255, 255, 0.06);
  --fxp-light-bg: #ffffff;
  --fxp-light-bg-2: #f8fafc;
  --fxp-text-on-dark: #ffffff;
  --fxp-text-on-dark-muted: rgba(255, 255, 255, 0.88);
  --fxp-text-on-light: #1e293b;
  --fxp-text-on-light-muted: #475569;
  --fxp-accent: #0fae96;
  --fxp-accent-hover: #0d9a84;
  --fxp-border-dark: rgba(255, 255, 255, 0.12);
  --fxp-border-light: rgba(0, 0, 0, 0.08);
  --fxp-radius-lg: 24px;
  --fxp-radius-md: 14px;
  --fxp-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
}

html { min-height: 100%; }
body {
  font-family: var(--fxp-font);
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
  background: radial-gradient(circle at top left, #111827 0%, #020617 55%, #000 100%);
  color: var(--fxp-text-on-dark);
}

/* 背景光晕：iOS + Web3 极客风 */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(140px);
  -webkit-filter: blur(140px);
  opacity: 0.85;
  z-index: -1;
}
body::before {
  top: -30vmax;
  left: -20vmax;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.6) 0%, transparent 70%);
}
body::after {
  bottom: -30vmax;
  right: -10vmax;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.65) 0%, transparent 70%);
}

/* ========== 深色区：Header ========== */
.header {
  background: rgba(30, 27, 75, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--fxp-border-dark);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.8);
}
.logo-text,
.nav-item,
.language-text {
  color: var(--fxp-text-on-dark) !important;
}
.nav-item:hover {
  color: var(--fxp-accent) !important;
}
.login-btn {
  background: transparent !important;
  color: #fff !important;
  border: 1px solid var(--fxp-border-dark) !important;
}
.login-btn:hover {
  background: var(--fxp-dark-card) !important;
  border-color: rgba(255,255,255,0.2) !important;
}
.register-btn {
  background: var(--fxp-accent) !important;
  color: #fff !important;
  border: none !important;
}
.register-btn:hover {
  background: var(--fxp-accent-hover) !important;
  color: #fff !important;
}

/* ========== 深色区：Hero ========== */
.web-hero-section,
.mobile-hero-section {
  background: transparent;
  backdrop-filter: none;
  border: none;
  box-shadow: none;
}
.web-hero-gradient-bg,
.mobile-hero-gradient-bg {
  background: linear-gradient(180deg, var(--fxp-dark-bg) 0%, var(--fxp-dark-bg-2) 100%) !important;
}
.web-hero-brand,
.mobile-hero-brand {
  color: #a78bfa !important;
}
.web-hero-title,
.mobile-hero-title {
  color: #fff !important;
}
.web-hero-description,
.mobile-hero-description {
  color: var(--fxp-text-on-dark-muted) !important;
}
.web-hero-btn,
.mobile-hero-btn {
  background: linear-gradient(135deg, var(--fxp-accent) 0%, #0d9a84 100%) !important;
  color: #fff !important;
  border: none !important;
}

/* ========== 深色区：How it works ========== */
.how-it-works-section,
.mobile-how-it-works-section {
  background: var(--fxp-dark-bg-2) !important;
  border: none;
}
.how-it-works-title,
.mobile-section-title {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: none;
  background-clip: unset;
}
.step-title,
.mobile-step-title {
  color: #fff !important;
}
.step-description,
.mobile-step-description {
  color: var(--fxp-text-on-dark-muted) !important;
}
.market-card,
.mobile-market-card {
  background: radial-gradient(140% 140% at 50% 0%, rgba(129, 140, 248, 0.28) 0%, rgba(15, 23, 42, 0.9) 55%, rgba(15, 23, 42, 0.98) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.5) !important;
  box-shadow:
    0 26px 80px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(129, 140, 248, 0.3);
}
.market-card-header,
.mobile-market-card-header {
  color: #fff !important;
}
.tab:not(.active),
.mobile-tab:not(.active) {
  color: var(--fxp-text-on-dark-muted) !important;
}
.tab.active,
.mobile-tab.active {
  background: #fff !important;
  color: var(--fxp-dark-bg) !important;
}
.balance,
.mobile-balance,
.swap-box-header,
.mobile-swap-box-header {
  color: var(--fxp-text-on-dark-muted) !important;
}
.token-name,
.mobile-token-name,
.amount-main,
.mobile-amount-main {
  color: #fff !important;
}
.token-sub,
.amount-sub,
.mobile-token-sub,
.mobile-amount-sub {
  color: rgba(255, 255, 255, 0.75) !important;
}
.swap-box,
.mobile-swap-box {
  background: var(--fxp-dark-card) !important;
  border: 1px solid var(--fxp-border-dark) !important;
}
.info-list,
.mobile-info-list {
  background: var(--fxp-dark-card) !important;
  border: 1px solid var(--fxp-border-dark) !important;
}
.info-row,
.mobile-info-row {
  color: #fff !important;
}
.muted,
.mobile-muted {
  color: var(--fxp-text-on-dark-muted) !important;
}
.agree,
.mobile-agree {
  color: var(--fxp-text-on-dark-muted) !important;
}
.agree a,
.mobile-agree a {
  color: #93c5fd !important;
}
.exchange-btn,
.mobile-exchange-btn {
  background: var(--fxp-accent) !important;
  color: #fff !important;
}
.cta-button,
.mobile-cta-button {
  background: var(--fxp-accent) !important;
  color: #fff !important;
  border: none !important;
}

/* ========== 深色区：FAQ ========== */
.faq-section,
.mobile-faq-section {
  background: var(--fxp-dark-bg-2) !important;
  border: none;
  box-shadow: none;
}
.faq-title,
.mobile-faq-title {
  color: #fff !important;
}
.faq-item,
.mobile-faq-item {
  border-bottom-color: var(--fxp-border-dark) !important;
}
.faq-question,
.mobile-faq-question {
  color: #fff;
}
.faq-question:hover,
.mobile-faq-question:hover {
  background: var(--fxp-dark-card) !important;
}
.question-text,
.mobile-question-text {
  color: #fff !important;
}
.faq-icon,
.mobile-faq-icon {
  color: var(--fxp-text-on-dark-muted) !important;
}
.faq-answer p,
.mobile-faq-answer p {
  color: var(--fxp-text-on-dark-muted) !important;
}

/* ========== 深色区：Footer ========== */
.footer {
  background: var(--fxp-dark-bg) !important;
  border: none;
  box-shadow: none;
}
.footer-col-title {
  color: #fff !important;
}
.footer-link {
  color: var(--fxp-text-on-dark-muted) !important;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: #fff !important;
}
.footer-divider {
  background: var(--fxp-border-dark) !important;
}
.copyright-text {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ========== 浅色区：Value proposition ========== */
.value-proposition-section,
.mobile-value-proposition-section {
  background: var(--fxp-light-bg-2) !important;
}
.value-prop-title,
.mobile-value-proposition-section .mobile-section-title {
  color: var(--fxp-text-on-light) !important;
  background: linear-gradient(263.24deg, #0f766e 21.05%, #0fae96 77.63%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
.value-card,
.mobile-value-card {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.24) 0%, rgba(236, 72, 153, 0.24) 50%, rgba(45, 212, 191, 0.18) 100%) !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  color: var(--fxp-text-on-light) !important;
  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(15, 23, 42, 0.6);
}
.value-prop-card-title,
.mobile-card-title {
  color: var(--fxp-text-on-light) !important;
}
.value-prop-card-description,
.mobile-card-description {
  color: var(--fxp-text-on-light-muted) !important;
}

/* ========== 浅色区：Application scenarios ========== */
.application-scenarios-section,
.mobile-application-scenarios-section {
  background: var(--fxp-light-bg) !important;
}
.app-scenarios-title,
.mobile-app-scenarios-title {
  color: var(--fxp-text-on-light) !important;
  background: linear-gradient(263.24deg, #0f766e 21.05%, #0fae96 77.63%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}
.app-scenario-card,
.mobile-app-scenario-card {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(148, 163, 184, 0.45) !important;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.22) !important;
}
.app-card-title,
.mobile-app-card-title {
  color: var(--fxp-text-on-light) !important;
}
.app-card-description,
.mobile-app-card-description {
  color: var(--fxp-text-on-light-muted) !important;
}
.learn-more-btn,
.mobile-learn-more-btn {
  background: var(--fxp-accent) !important;
  color: #fff !important;
  border: none !important;
}

/* ========== 浅色区：Funds control ========== */
.funds-control-section,
.mobile-funds-control-section {
  background: var(--fxp-light-bg) !important;
}
.funds-control-title,
.mobile-funds-control-title {
  color: var(--fxp-text-on-light) !important;
  background: linear-gradient(263.24deg, #0f766e 21.05%, #0fae96 77.63%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
  text-shadow: none !important;
}
.explore-now-btn,
.mobile-explore-now-btn {
  background: var(--fxp-accent) !important;
  color: #fff !important;
  border: none !important;
}

/* ========== 布局与圆角 ========== */
.web-hero-container,
.mobile-hero-container,
.value-prop-container,
.how-it-works-container,
.faq-container,
.mobile-faq-container,
.footer-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}
@media (min-width: 768px) {
  .web-hero-container,
  .value-prop-container,
  .how-it-works-container,
  .faq-container,
  .footer-container {
    padding-left: 40px;
    padding-right: 40px;
  }
}
@media (min-width: 1024px) {
  .web-hero-container,
  .value-prop-container,
  .how-it-works-container,
  .faq-container,
  .footer-container {
    padding-left: 60px;
    padding-right: 60px;
  }
}

.value-card,
.mobile-value-card,
.market-card,
.mobile-market-card,
.app-scenario-card,
.mobile-app-scenario-card,
.faq-container,
.mobile-faq-container {
  border-radius: var(--fxp-radius-lg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.value-card:hover,
.mobile-value-card:hover,
.market-card:hover,
.mobile-market-card:hover,
.app-scenario-card:hover,
.mobile-app-scenario-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 26px 70px rgba(15, 23, 42, 0.95),
    0 0 0 1px rgba(148, 163, 184, 0.5);
}
.web-hero-btn,
.mobile-hero-btn,
.cta-button,
.mobile-cta-button,
.explore-now-btn,
.mobile-explore-now-btn,
.learn-more-btn,
.mobile-learn-more-btn,
.exchange-btn,
.mobile-exchange-btn,
.login-btn,
.register-btn,
.primary-btn {
  border-radius: var(--fxp-radius-md);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.web-hero-btn:active,
.mobile-hero-btn:active,
.cta-button:active,
.mobile-cta-button:active,
.explore-now-btn:active,
.mobile-explore-now-btn:active,
.learn-more-btn:active,
.mobile-learn-more-btn:active,
.exchange-btn:active,
.mobile-exchange-btn:active,
.login-btn:active,
.register-btn:active {
  transform: scale(0.98);
}

/* ========== Bank-grade Liquidity 标签 ========== */
.market-card-body::before,
.mobile-market-card-body::before {
  content: "Bank-grade Liquidity";
  display: block;
  font-size: 12px;
  color: var(--fxp-text-on-dark-muted);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

/* ========== 触摸目标与无障碍 ========== */
@media (max-width: 768px) {
  .nav-item,
  .login-btn,
  .register-btn {
    min-height: 44px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .mobile-tab,
  .tab {
    min-height: 44px;
    padding: 10px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .faq-question,
  .mobile-faq-question {
    min-height: 48px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}
.nav-item:focus-visible,
.login-btn:focus-visible,
.register-btn:focus-visible,
.faq-question:focus-visible,
.mobile-faq-question:focus-visible,
.footer-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}
.app-scenario-card .learn-more-btn:focus-visible,
.mobile-app-scenario-card .mobile-learn-more-btn:focus-visible {
  outline: 2px solid var(--fxp-accent);
  outline-offset: 2px;
}

/* ========== FAQ 展开与移动端底部抽屉 ========== */
.faq-answer.expanded,
.mobile-faq-answer.expanded {
  max-height: min(70vh, 400px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
  .mobile-faq-section,
  .faq-section {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1000;
    background: var(--fxp-dark-bg-2) !important;
  }
  .mobile-faq-section::before,
  .faq-section::before {
    content: "";
    display: block;
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 2px;
    margin: 12px auto 16px;
  }
}

/* ========== 负 margin 修正 ========== */
@media (max-width: 1024px) {
  .funds-control-title { margin-bottom: -40px; }
  .funds-control-content { margin-top: 24px; }
}
@media (max-width: 768px) {
  .funds-control-title { margin-bottom: -20px; }
  .funds-control-content { margin-top: 32px; }
}
@media (max-width: 480px) {
  .mobile-funds-control-title { margin-bottom: -24px; }
  .mobile-funds-control-content { margin-top: 24px; }
}

/* ========== 固定 X 按钮 ========== */
body a[href*="x.com"] {
  background: #1e293b !important;
  color: #fff !important;
  border-radius: var(--fxp-radius-md);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
@media (max-width: 480px) {
  body a[href*="x.com"] {
    bottom: 16px;
    right: 16px;
    padding: 12px 14px;
    font-size: 13px;
  }
}

/* ========== 合作伙伴区 ========== */
@media (max-width: 900px) {
  .partners-logos {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }
}
