/* ============================================================
   AI × FINANCE — Global Styles
   纯静态页面：字体 / 玻璃质感 / 网格 / 动效 / Ticker / 语言滑块
   ============================================================ */

/* 字体（中国大陆访问使用官方 .cn 域） */
@import url("https://fonts.googleapis.cn/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;700;900&display=swap");

:root {
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --neon: #38bdf8;
  --gold: #e8c47a;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #0b0e14;
  color: #c9d1d9;
  font-family: Inter, "Noto Sans SC", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 暗色暗角，统一氛围 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(ellipse 120% 90% at 50% 0%, transparent 55%, rgba(0, 0, 0, 0.55) 100%);
}

::selection {
  background: rgba(56, 189, 248, 0.28);
  color: #f8fafc;
}

::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: #0b0e14;
}
::-webkit-scrollbar-thumb {
  background: #1e2735;
  border-radius: 8px;
  border: 2px solid #0b0e14;
}
::-webkit-scrollbar-thumb:hover {
  background: #2b384d;
}

/* ---------- 字体工具 ---------- */
.font-display {
  font-family: "Space Grotesk", "Noto Sans SC", sans-serif;
}
.tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- 玻璃容器 ---------- */
.glass {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* ---------- 金属金文字 ---------- */
.gold-text {
  background: linear-gradient(105deg, #f4e0a0 0%, #e8c47a 38%, #b8860b 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.blue-glow {
  text-shadow: 0 0 26px rgba(56, 189, 248, 0.45);
}

/* ---------- 数据网格 ---------- */
.grid-overlay {
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, black 25%, transparent 78%);
}

/* ---------- 卡片悬停 ---------- */
.card-lift {
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s var(--ease),
    box-shadow 0.3s var(--ease),
    background 0.3s var(--ease);
}
.card-lift:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 196, 122, 0.32);
  box-shadow:
    0 24px 60px -24px rgba(0, 0, 0, 0.85),
    inset 0 0 34px rgba(56, 189, 248, 0.06);
}

/* 顶部金色光线 */
.hairline-top {
  position: relative;
}
.hairline-top::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 196, 122, 0.75), transparent);
}

/* ---------- 入场动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.85s var(--ease),
    transform 0.85s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Header 滚动状态 ---------- */
.site-header {
  transition:
    background 0.4s var(--ease),
    border-color 0.4s var(--ease),
    backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(11, 14, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

/* ---------- 语言下拉菜单 ---------- */
.lang-menu {
  position: relative;
}
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: #cbd5e1;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    box-shadow 0.25s var(--ease);
}
.lang-trigger:hover {
  color: #f8fafc;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.16);
}
.lang-caret {
  transition: transform 0.3s var(--ease);
}
.lang-menu.open .lang-caret {
  transform: rotate(180deg);
}
.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 188px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(13, 17, 25, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(56, 189, 248, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
    visibility 0.22s;
  z-index: 60;
}
.lang-menu.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}
.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 11px;
  font-size: 13px;
  color: #cbd5e1;
  border-radius: 9px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.lang-option:hover {
  background: rgba(56, 189, 248, 0.1);
  color: #f8fafc;
}
.lang-option.selected {
  color: #38bdf8;
}
.lang-check {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
}
.lang-option.selected .lang-check {
  opacity: 1;
  transform: scale(1);
}
.lang-option.selected .lang-check::before {
  content: "";
  display: block;
  width: 8px;
  height: 4px;
  margin: 4px 0 0 3px;
  border-left: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(-45deg);
}

/* ---------- 行情 Ticker ---------- */
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}
@keyframes ticker {
  to {
    transform: translateX(-50%);
  }
}

/* ---------- 光晕漂浮 ---------- */
.animate-drift {
  animation: drift 16s ease-in-out infinite;
}
@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(34px, -22px, 0);
  }
}

/* 呼吸光点 */
.pulse-dot {
  animation: pulseDot 2.6s ease-in-out infinite;
}
@keyframes pulseDot {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

/* ---------- 尊重减弱动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .ticker-track,
  .animate-drift,
  .pulse-dot {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .card-lift {
    transition: none;
  }
}
