@import url("../fonts/inter.css");
@import url("./site-auth.css");
@import url("./deposit-drawer.css");

/* 亮色现代极简 · 视觉 tokens（.style/亮色现代极简-style.md） */
:root {
  /* 统一主色：绿色（对齐理财页）。主按钮、强调色、选中态、焦点环均基于此 */
  --brand: #14b8a6;
  --brand-hover: #0d9488;
  --brand-on: #ffffff;
  --accent: #14b8a6;
  --accent-strong: #0d9488;
  --accent-soft: rgba(20, 184, 166, 0.12);

  --bg-base: #f9fafb;
  --bg-page-gradient: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  --bg-card: #ffffff;
  --bg-muted: #f4f4f5;
  --bg-header: rgba(255, 255, 255, 0.88);

  --text-primary: #101112;
  --text-strong: #18181b;
  --text-secondary: #71717a;
  --text-muted: #9f9fa9;
  --text-placeholder: #a1a1aa;

  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: #e4e4e7;
  --border-soft: rgba(228, 228, 231, 0.55);

  --focus-ring: #14b8a6;
  --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 4px rgba(0, 0, 0, 0.05), 0 12px 24px rgba(0, 0, 0, 0.05);
  --shadow-button: 0 20px 60px -30px rgba(0, 0, 0, 0.12);

  --radius-sm: 0.65rem;
  --radius-md: 0.85rem;
  --radius-card: 16px;
  --radius-pill: 9999px;

  --font-family-base: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Serif SC", "Helvetica Neue", Arial, sans-serif;
  --container-max: 1440px;
  --header-height: 80px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-base);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  background: var(--bg-page-gradient);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 0% -20%, rgba(99, 102, 241, 0.06), transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(139, 92, 246, 0.04), transparent 45%),
    radial-gradient(ellipse 50% 30% at 100% 100%, rgba(244, 63, 94, 0.03), transparent 50%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.05) 1px, transparent 0);
  background-size: 18px 18px;
}

.page-wrap {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.page-main {
  flex: 1;
  padding-top: var(--header-height);
  min-height: 100vh;
}

@media (max-width: 767px) {
  .page-main {
    padding-top: 64px;
  }
}

@media (min-width: 640px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }
}

/* ========== Site Header ========== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;            /* 全屏：去掉 left:50% + translateX */
  z-index: 50;
  width: 100%;
  height: var(--header-height);
  display: none;
  align-items: center;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0;         /* 内边距交给 __inner 统一控制 */
}

@media (min-width: 768px) {
  .site-header {
    display: flex;
  }
}

/* 移动端顶栏（全站共用，桌面端隐藏） */
.mobile-header {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: 100%;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .mobile-header {
    display: none;
  }
}

.mobile-header .site-logo img {
  height: 28px;
}

.mobile-header__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-header__actions .btn-login {
  padding: 6px 12px;
  font-size: 13px;
}

.mobile-header__actions .btn-signup {
  padding: 6px 14px;
  font-size: 13px;
  box-shadow: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  /* 全屏铺满，不再居中限宽 */
  max-width: none;
  padding: 0 32px;
}

.site-header__left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-logo img {
  height: 32px;
  width: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__item {
  position: relative;
}

.site-nav__trigger,
.site-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 8px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-strong);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.site-nav__link:hover,
.site-nav__trigger:hover,
.site-nav__trigger.is-open {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.site-nav__link.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.site-nav__trigger .chevron {
  margin-left: 4px;
  width: 12px;
  height: 12px;
  transition: transform 0.3s;
}

.site-nav__trigger.is-open .chevron {
  transform: rotate(180deg);
}

.site-nav__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  padding: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 60;
}

.site-nav__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__dropdown a {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}

.site-nav__dropdown a:hover {
  color: var(--text-strong);
  background: var(--bg-muted);
}

.site-nav__dropdown a.is-active {
  color: var(--accent);
  font-weight: 600;
  background: rgba(20, 184, 166, 0.08);
}

.site-header__right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.site-header__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 16px;
  color: var(--text-strong);
  transition: color 0.2s;
}

.site-header__link:hover {
  color: var(--text-primary);
}

.site-header__link svg {
  width: 16px;
  height: 16px;
}

.site-header__lang {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-strong);
  transition: color 0.2s, background 0.2s;
  border-radius: var(--radius-pill);
}

.site-header__lang:hover,
.site-lang.is-open .site-lang__trigger {
  color: var(--text-primary);
  background: var(--bg-muted);
}

.site-lang {
  position: relative;
}

.site-lang__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 148px;
  padding: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 100;
}

.site-lang.is-open .site-lang__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-lang__option {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-strong);
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.site-lang__option:hover {
  background: var(--bg-muted);
}

.site-lang__option.is-active {
  color: var(--accent);
}

.site-header__auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: var(--text-strong);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.btn-login:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: rgba(20, 184, 166, 0.45);
}

.btn-login:focus-visible,
.btn-signup:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--focus-ring);
}

.btn-signup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  color: var(--brand-on);
  background: var(--brand);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-button);
  transition: background 0.2s, transform 0.15s;
}

.btn-signup:hover {
  background: var(--brand-hover);
}

.btn-signup:active {
  transform: scale(0.98);
}

/* ========== 页面返回按钮（账户子页 / 预测详情等共用） ========== */
.account-subhead__back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  color: var(--text-strong);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.02),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 6px 16px rgba(0, 0, 0, 0.05);
  transition:
    color 0.2s,
    background 0.2s,
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.account-subhead__back i {
  font-size: 15px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.account-subhead__back:hover {
  color: var(--accent);
  background: rgba(20, 184, 166, 0.08);
  border-color: rgba(20, 184, 166, 0.28);
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.08),
    0 4px 14px rgba(20, 184, 166, 0.14);
}

.account-subhead__back:hover i {
  transform: translateX(-2px);
}

.account-subhead__back:active {
  transform: scale(0.96);
}

.account-subhead__back:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px var(--accent);
}

/* ========== 复制 Toast ========== */
.site-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-strong);
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}

.site-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.site-toast i {
  color: var(--accent);
  font-size: 15px;
}

/* ========== Site Footer ========== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  padding: 32px 16px;
}

@media (min-width: 640px) {
  .site-footer {
    padding: 48px 24px;
  }
}

.site-footer__mobile {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

@media (min-width: 1024px) {
  .site-footer__mobile {
    display: none;
  }
}

.site-footer__desktop {
  display: none;
}

@media (min-width: 1024px) {
  .site-footer__desktop {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 80px;
  }
}

.site-footer__brand img {
  height: 36px;
  width: auto;
  margin-bottom: 16px;
}

.site-footer__tagline {
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.site-footer__social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-strong);
  background: var(--bg-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.site-footer__social a:hover {
  background: var(--bg-card);
  border-color: var(--border-default);
  color: var(--text-primary);
}

.site-footer__social svg {
  width: 18px;
  height: 18px;
}

.site-footer__col h3 {
  margin-bottom: 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-strong);
}

.site-footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.site-footer__links a:hover {
  color: var(--text-strong);
}

.site-footer__market-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 32px;
}

.site-footer__market-grid a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.site-footer__market-grid a:hover {
  color: var(--text-strong);
}

.site-footer__copyright {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-default);
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .site-footer__copyright {
    margin-top: 80px;
    padding-top: 32px;
    font-size: 14px;
  }
}

/* 全站统一 FAQ */
.site-faq__list {
  counter-reset: site-faq;
}

.site-faq__item {
  border-bottom: 1px solid var(--border-default);
}

.site-faq__item:last-child {
  border-bottom: none;
}

.site-faq__q {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 22px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-strong);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
}

.site-faq__q::before {
  counter-increment: site-faq;
  content: counter(site-faq, decimal-leading-zero);
  flex-shrink: 0;
  min-width: 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.site-faq__title {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}

.site-faq__toggle {
  flex-shrink: 0;
  width: 24px;
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  color: var(--text-muted);
  text-align: center;
}

.site-faq__toggle::before {
  content: "+";
}

.site-faq__item.is-open .site-faq__toggle::before {
  content: "−";
}

.site-faq__a {
  display: none;
  padding: 0 0 22px 40px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.site-faq__item.is-open .site-faq__a {
  display: block;
}
