/* ============================================================
   LP 移动端 UI - 全局样式
   设计风格：OKX 浅色（白底黑字 + 品牌黄点缀）
   ============================================================ */

:root {
  /* 主色 - 黑色 + 品牌黄（OKX 风格） */
  --color-primary: #1A1A1A;
  --color-primary-light: #2D2D2D;
  --color-primary-dark: #000000;
  --color-primary-bg: #F4F4F5;

  /* 品牌色 - 黄（OKX 标识色） */
  --color-brand: #F0B90B;
  --color-brand-light: #FCD535;
  --color-brand-bg: #FEF7DA;

  /* 辅助色 */
  --color-accent: #FF6B9D;
  --color-success: #02C076;
  --color-warning: #F0B90B;
  --color-danger: #F6465D;

  /* 中性色 */
  --color-bg: #FAFAFA;
  --color-card: #FFFFFF;
  --color-text: #1E2026;
  --color-text-sub: #707A8A;
  --color-text-muted: #B7BDC6;
  --color-border: #EAECEF;

  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 100%);
  --gradient-bg: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
  --gradient-brand: linear-gradient(135deg, #FCD535 0%, #F0B90B 100%);
  --gradient-pink: linear-gradient(135deg, #FF9CC8 0%, #FF6BA0 100%);
  --gradient-card: linear-gradient(135deg, #FFFFFF 0%, #F4F4F5 100%);
  --gradient-blue: linear-gradient(135deg, #74B5FF 0%, #5B8DEF 100%);
  --gradient-success: linear-gradient(135deg, #02C076 0%, #0BD49B 100%);
  --gradient-danger: linear-gradient(135deg, #F6465D 0%, #FF7187 100%);

  /* 阴影 - OKX 风偏轻 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

/* Dark 主题（OKX 浅色为主，可选深色） */
[data-theme="dark"] {
  --color-bg: #0B0E11;
  --color-card: #1E2026;
  --color-text: #EAECEF;
  --color-text-sub: #B7BDC6;
  --color-text-muted: #707A8A;
  --color-border: #2B3139;
  --color-primary-bg: #2B3139;
  --gradient-bg: linear-gradient(180deg, #0B0E11 0%, #0B0E11 100%);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.6);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  height: 100%;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

/* ============================================================
   手机外框（开发预览用）
   ============================================================ */
.phone-stage {
  min-height: 100vh;
  background: linear-gradient(135deg, #1A1A1A 0%, #2D2D2D 50%, #000000 100%);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 16px 48px;
  gap: 24px;
  flex-wrap: wrap;
}

.phone-frame {
  width: 375px;
  height: 812px;
  background: var(--color-bg);
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
    inset 0 0 0 8px #0A0A0A,
    inset 0 0 0 9px #1A1A1A;
  position: relative;
  flex-shrink: 0;
}

.phone-screen {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  background: var(--color-bg);
  scrollbar-width: none;
}

.phone-screen::-webkit-scrollbar {
  display: none;
}

/* 状态栏 */
.status-bar {
  height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
  position: sticky;
  top: 0;
  z-index: 100;
}

.status-bar.transparent {
  color: #fff;
}

.status-bar .right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.status-bar .right svg {
  width: 16px;
  height: 16px;
}

/* ============================================================
   通用页面容器
   ============================================================ */
.page {
  min-height: 100%;
  padding-bottom: 100px;
  position: relative;
}

/* ============================================================
   底部导航 - OKX 风格：白底 + 黑色图标，激活变黄
   ============================================================ */
.tab-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: var(--color-card);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding-top: 10px;
  z-index: 50;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--color-text-sub);
  font-size: 11px;
  padding: 4px 12px;
  transition: color 0.2s;
}

.tab-item .icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.tab-item .icon-wrap svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-item.active {
  color: var(--color-primary);
  font-weight: 600;
}

.tab-item.active .icon-wrap svg {
  fill: var(--color-brand);
  stroke: var(--color-primary);
  stroke-width: 1.8;
}

/* ============================================================
   通用组件
   ============================================================ */
.card {
  background: var(--color-card);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-primary);
  color: #fff;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
  font-size: 14px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  font-weight: 600;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
}

.row {
  display: flex;
  align-items: center;
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.text-sub {
  color: var(--color-text-sub);
}

.text-muted {
  color: var(--color-text-muted);
}

.text-primary {
  color: var(--color-primary);
}

/* 头部区域 */
.page-header {
  padding: 8px 20px 0;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}

.section {
  margin: 0 16px 16px;
}

/* 标签徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: 600;
}

.badge-purple {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.badge-pink {
  background: #FFE6F2;
  color: #E0457E;
}

.badge-green {
  background: #E2FAF0;
  color: #1B9968;
}

/* 涨跌色（OKX 行情风格） */
.up { color: var(--color-success); }
.down { color: var(--color-danger); }

/* 数字字体（表格对齐用） */
.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* 滚动隐藏 */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.no-scrollbar {
  scrollbar-width: none;
}

/* ============================================================
   扩展组件：按钮 / 输入 / 头像 / 徽章 / 进度条 / 空状态
   ============================================================ */

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s, box-shadow 0.2s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.96);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.btn-brand {
  background: var(--gradient-brand);
  color: #1A1A1A;
  font-weight: 700;
}

.btn-ghost {
  background: transparent;
  color: var(--color-primary);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 15px;
}

/* ---------- 输入框 ---------- */
.input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-card);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-bg);
}

.input input,
.input textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  min-width: 0;
}

.input input::placeholder,
.input textarea::placeholder {
  color: var(--color-text-muted);
}

.input .prefix,
.input .suffix {
  display: flex;
  align-items: center;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.input .prefix svg,
.input .suffix svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.input .suffix {
  cursor: pointer;
}

/* ---------- 头像 ---------- */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-pink);
  color: #fff;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 18px;
  position: relative;
}

.avatar-sm { width: 32px; height: 32px; font-size: 14px; }
.avatar-md { width: 40px; height: 40px; font-size: 16px; }
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.avatar-xl { width: 72px; height: 72px; font-size: 30px; }

.avatar-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: var(--color-success);
  border: 2px solid var(--color-card);
  border-radius: 50%;
}

/* ---------- 徽章 / Tag ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  background: var(--color-primary-bg);
  color: var(--color-primary);
}

.tag-pink { background: #FFE6F2; color: #E0457E; }
.tag-green { background: #E2FAF0; color: #1B9968; }
.tag-yellow { background: #FFF1D6; color: #B36B00; }
.tag-gray { background: #EFEAF7; color: var(--color-text-sub); }

.tag .close {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: 2px;
}

[data-theme="dark"] .tag-pink { background: #4A1F38; color: #FF9CC8; }
[data-theme="dark"] .tag-green { background: #143E2E; color: #4CD0A0; }
[data-theme="dark"] .tag-yellow { background: #4A3614; color: #FFB547; }
[data-theme="dark"] .tag-gray { background: #2A2350; color: var(--color-text-sub); }

/* ---------- 进度条 ---------- */
.progress {
  width: 100%;
  height: 8px;
  background: var(--color-primary-bg);
  border-radius: var(--radius-pill);
  overflow: hidden;
  position: relative;
}

.progress .bar {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}

.progress .bar.bar-pink { background: var(--gradient-pink); }
.progress .bar.bar-green { background: linear-gradient(135deg, #4CD0A0, #2BAE7E); }
.progress .bar.bar-yellow { background: linear-gradient(135deg, #FFB547, #FF8C42); }
.progress .bar.bar-danger { background: linear-gradient(135deg, #FF6B7A, #E0457E); }

.progress-lg { height: 12px; }
.progress-sm { height: 6px; }

/* ---------- 空状态 ---------- */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  gap: 12px;
}

.empty .empty-illust {
  font-size: 64px;
  line-height: 1;
  filter: grayscale(0.1);
}

.empty .empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text);
}

.empty .empty-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 240px;
}

.empty .empty-action {
  margin-top: 8px;
}

/* 紧凑空状态（用于 inline 列表里） */
.empty-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 12px;
}

.empty-compact .ico {
  font-size: 36px;
  opacity: 0.6;
}
