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

:root {
  --bg: #0d1117;
  --bg-card: #161b26;
  --bg-card-hover: #1e2536;
  --bg-elevated: #1a2030;
  --accent: #ff9800;
  --accent-glow: rgba(255, 152, 0, 0.25);
  --text: #ffffff;
  --text-secondary: #8b93a7;
  --text-muted: #5a6178;
  --green: #00c853;
  --green-dim: rgba(0, 200, 83, 0.15);
  --red: #ff5252;
  --red-dim: rgba(255, 82, 82, 0.15);
  --border: #252d3d;
  --glass: rgba(22, 27, 38, 0.85);
  --nav-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  height: 100%;
  height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  -webkit-overflow-scrolling: touch;
  position: relative;
}

.page.active {
  display: block;
}

.page-trade.active {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Home Background */
.home-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 152, 0, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(0, 200, 83, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse 50% 30% at 0% 60%, rgba(255, 82, 82, 0.03) 0%, transparent 50%);
  z-index: 0;
}

#page-home > *:not(.home-bg) {
  position: relative;
  z-index: 1;
}

/* Status Bar */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 10px 16px 0;
  font-size: 11px;
}

.market-status {
  color: var(--accent);
  font-weight: 500;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 16px 8px;
  gap: 12px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-wrap {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 152, 0, 0.05));
  border: 1px solid rgba(255, 152, 0, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon {
  width: 22px;
  height: 22px;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-advanced {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand-platform {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 1px;
}

.header-right {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  max-width: 160px;
}

.shield-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}

.header-tag {
  display: flex;
  flex-direction: column;
}

.tag-cn {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}

.tag-en {
  font-size: 7px;
  color: var(--text-muted);
  line-height: 1.3;
  margin-top: 2px;
  letter-spacing: 0.3px;
}

/* Account Banner */
.account-banner {
  margin: 8px 16px 12px;
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #1a2235 0%, #141a28 50%, #1a1f2e 100%);
  border: 1px solid rgba(255, 152, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.account-banner-glow {
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.account-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.account-label {
  font-size: 11px;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}

.account-equity {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
}

.account-pnl-wrap {
  text-align: right;
}

.account-pnl {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.account-pnl.positive { color: var(--green); }
.account-pnl.negative { color: var(--red); }

.account-metrics {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  padding: 12px 8px;
}

.metric {
  flex: 1;
  text-align: center;
}

.metric-val {
  display: block;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.metric-key {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  display: block;
}

.metric-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
}

/* Ticker */
.ticker-wrap {
  overflow: hidden;
  margin-bottom: 12px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.ticker-track {
  display: flex;
  gap: 24px;
  animation: ticker 30s linear infinite;
  width: max-content;
  padding: 0 16px;
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-size: 12px;
}

.ticker-symbol {
  color: var(--text-secondary);
  font-weight: 600;
}

.ticker-price {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ticker-change.up { color: var(--green); }
.ticker-change.down { color: var(--red); }

.ticker-sep {
  color: var(--border);
}

/* Tabs */
.tabs {
  display: flex;
  padding: 0 16px;
  gap: 8px;
  margin-bottom: 4px;
}

.tab {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #e68900);
  border-color: transparent;
  box-shadow: 0 4px 12px var(--accent-glow);
}

/* Section Head */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 16px 10px;
}

.section-head h3 {
  font-size: 16px;
  font-weight: 700;
}

.section-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Featured Cards - Horizontal Scroll */
.featured-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.featured-scroll::-webkit-scrollbar {
  display: none;
}

.featured-cards {
  padding: 0 16px;
  display: flex;
  gap: 12px;
  width: max-content;
}

.featured-card {
  width: 260px;
  background: linear-gradient(145deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  flex-shrink: 0;
}

.featured-card:active {
  transform: scale(0.98);
}

.featured-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), transparent);
}

.featured-card.up {
  border-color: rgba(0, 200, 83, 0.2);
}

.featured-card.down {
  border-color: rgba(255, 82, 82, 0.2);
}

.featured-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.featured-icon,
.asset-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.asset-icon::before,
.featured-icon::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.16) 0%, transparent 48%);
  pointer-events: none;
  z-index: 0;
}

.asset-icon svg,
.featured-icon svg {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
}

.asset-icon.md {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.asset-icon.lg,
.featured-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.asset-icon.lg svg,
.featured-icon svg {
  width: 22px;
  height: 22px;
}

.asset-icon.gold, .featured-icon.gold {
  background: linear-gradient(150deg, #4d4020 0%, #2a2410 100%);
  color: #f0c84a;
}

.asset-icon.btc, .featured-icon.btc {
  background: linear-gradient(150deg, #4a3218 0%, #2a1a0c 100%);
  color: #f7931a;
}

.asset-icon.eth, .featured-icon.eth {
  background: linear-gradient(150deg, #2a3058 0%, #181c38 100%);
  color: #8b9cf0;
}

.asset-icon.eur, .featured-icon.eur {
  background: linear-gradient(150deg, #1a3458 0%, #0f2038 100%);
  color: #5aabdc;
}

.asset-icon.gbp, .featured-icon.gbp {
  background: linear-gradient(150deg, #1a2848 0%, #0f1828 100%);
  color: #6ec4e8;
}

.asset-icon.jpy, .featured-icon.jpy {
  background: linear-gradient(150deg, #481818 0%, #2a0e0e 100%);
  color: #e87070;
}

.asset-icon.forex, .featured-icon.forex {
  background: linear-gradient(150deg, #1a3458 0%, #0f2038 100%);
  color: #5aabdc;
}

.featured-change {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.featured-change.up {
  color: var(--green);
  background: var(--green-dim);
}

.featured-change.down {
  color: var(--red);
  background: var(--red-dim);
}

.featured-symbol {
  font-size: 15px;
  font-weight: 700;
  display: block;
}

.featured-name {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  display: block;
}

.featured-sparkline {
  height: 40px;
  margin: 10px 0;
}

.featured-sparkline svg,
.featured-sparkline .sparkline {
  width: 100%;
  height: 100%;
  display: block;
}

.featured-prices {
  display: flex;
  gap: 12px;
}

.featured-price-box {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  text-align: center;
}

.featured-price-box .price-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.featured-price-box .price-val {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.featured-price-box.sell .price-val { color: var(--red); }
.featured-price-box.buy .price-val { color: var(--green); }

/* Sentiment Bar */
.sentiment-bar {
  margin: 16px 16px 0;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.sentiment-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 8px;
}

.sentiment-label span:first-child {
  color: var(--text-secondary);
}

.sentiment-value {
  color: var(--green);
  font-weight: 600;
}

.sentiment-track {
  height: 6px;
  background: var(--red-dim);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.sentiment-bull {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #69f0ae);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.sentiment-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 10px;
}

.sentiment-legend .bull { color: var(--green); }
.sentiment-legend .bear { color: var(--red); }

/* Market Section */
.market-section {
  padding: 16px 16px 16px;
}

.market-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  gap: 12px;
}

.market-header h2 {
  font-size: 16px;
  font-weight: 700;
}

.market-count {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  flex-shrink: 0;
}

.search-box svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 12px;
  width: 80px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.category-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 6px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.chip.active {
  background: rgba(255, 152, 0, 0.12);
  border-color: rgba(255, 152, 0, 0.3);
  color: var(--accent);
}

.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.market-list-header {
  display: flex;
  padding: 10px 16px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.market-list-header span:nth-child(1) { flex: 1.3; }
.market-list-header span:nth-child(2) { flex: 1; text-align: center; }
.market-list-header span:nth-child(3) { flex: 0.8; text-align: right; }

.market-item {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.market-item:last-child {
  border-bottom: none;
}

.market-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.market-col-left {
  flex: 1.3;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.market-symbol {
  font-size: 13px;
  font-weight: 600;
}

.market-type {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.market-col-mid {
  flex: 1;
  text-align: center;
}

.market-price {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}

.market-price.flash-up { color: var(--green); }
.market-price.flash-down { color: var(--red); }

.market-mini-chart {
  height: 24px;
  margin-top: 4px;
}

.market-mini-chart svg,
.market-mini-chart .sparkline {
  width: 72px;
  height: 24px;
  display: block;
  margin: 0 auto;
}

.market-col-right {
  flex: 0.8;
  text-align: right;
}

.market-change {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-block;
}

.market-change.up {
  color: var(--green);
  background: var(--green-dim);
}

.market-change.down {
  color: var(--red);
  background: var(--red-dim);
}

.market-spread {
  font-size: 9px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Trade Page */
.page-trade {
  padding-bottom: 0;
  display: none;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  flex: 1;
  min-height: 0;
}

.trade-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.trade-open .bottom-nav,
body.sub-open .bottom-nav {
  display: none;
}

body.trade-open .trade-action-bar {
  display: block;
}

body.trade-open .page-trade {
  padding-bottom: calc(72px + var(--safe-bottom));
}

.page-sub.active {
  display: block;
}

.trade-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  z-index: 11;
}

.trade-back {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.trade-back svg {
  width: 20px;
  height: 20px;
}

.trade-header-info {
  flex: 1;
  min-width: 0;
}

.trade-header-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trade-symbol {
  font-size: 16px;
  font-weight: 700;
}

.trade-fav {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  display: flex;
}

.trade-fav.active {
  color: var(--accent);
}

.trade-fav.active svg {
  fill: var(--accent);
}

.trade-fav svg {
  width: 16px;
  height: 16px;
}

.trade-name {
  font-size: 11px;
  color: var(--text-secondary);
}

.trade-header-price {
  text-align: right;
  flex-shrink: 0;
}

.trade-current-price {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.trade-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.trade-change.up { color: var(--green); }
.trade-change.down { color: var(--red); }

.trade-timeframes {
  display: flex;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.trade-timeframes::-webkit-scrollbar { display: none; }

.tf-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.tf-btn.active {
  background: rgba(255, 152, 0, 0.15);
  color: var(--accent);
}

.trade-chart-wrap {
  flex: 1 1 auto;
  min-height: clamp(150px, 32dvh, 320px);
  position: relative;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  touch-action: none;
}

.chart-toolbar {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 19, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 3px 4px;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.chart-tool-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.chart-tool-btn:active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.chart-tool-btn.reset {
  font-size: 14px;
  margin-left: 2px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 6px 6px 0;
  padding-left: 6px;
}

.chart-zoom-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  min-width: 32px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.chart-hint {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  z-index: 5;
  letter-spacing: 0.04em;
}

/* Order Modal */
.order-modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.order-modal[hidden] {
  display: none !important;
}

.order-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: depositFadeIn 0.25s ease;
}

.order-modal-panel {
  position: relative;
  width: 100%;
  max-width: 320px;
  padding: 20px 20px 18px;
  background: linear-gradient(165deg, #1a2030 0%, #12161f 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 152, 0, 0.08);
  animation: orderModalIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.order-modal-panel.call {
  border-color: rgba(0, 200, 83, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 32px rgba(0, 200, 83, 0.08);
}

.order-modal-panel.put {
  border-color: rgba(255, 82, 82, 0.25);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 32px rgba(255, 82, 82, 0.08);
}

.order-modal-panel.winning {
  border-color: rgba(0, 200, 83, 0.35);
}

.order-modal-panel.losing {
  border-color: rgba(255, 82, 82, 0.35);
}

@keyframes orderModalIn {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.order-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.order-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary);
}

.order-modal-symbol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.order-modal-symbol-row .order-symbol {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.order-modal-arc-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.order-arc-modal {
  position: relative;
  width: 130px;
  height: 130px;
}

.order-arc-modal .order-time {
  font-size: 44px;
  font-weight: 700;
}

.order-arc-modal .order-time-label {
  font-size: 11px;
  margin-top: 2px;
  color: var(--text-muted);
}

.order-modal-status {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.order-modal-status.winning {
  color: var(--green);
}

.order-modal-status.losing {
  color: var(--red);
}

.order-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.order-modal-cell {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.order-modal-cell.highlight {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.order-modal-cell.accent strong {
  color: var(--accent);
}

.order-modal-cell span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.order-modal-cell strong {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.order-modal-pnl {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.order-modal-pnl > span {
  font-size: 13px;
  color: var(--text-secondary);
}

.order-modal-pnl .order-pnl-value {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.order-pnl-value.winning {
  color: #7dcea0 !important;
}

.order-pnl-value.losing {
  color: #e89696 !important;
}

@keyframes orderSlideUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.order-symbol {
  font-size: 13px;
  font-weight: 600;
  color: #f4f5f7;
  letter-spacing: 0.03em;
}

.order-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.order-card.call .order-chip {
  color: #7dcea0;
  background: rgba(61, 143, 98, 0.15);
}

.order-card.put .order-chip {
  color: #e89696;
  background: rgba(168, 72, 72, 0.15);
}

.order-arc-wrap {
  position: relative;
  width: 108px;
  height: 108px;
}

.order-arc {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.order-arc-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 2.5;
}

.order-arc-fill {
  fill: none;
  stroke: #ff9800;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 263.9;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.4s ease;
}

.order-card.call .order-arc-fill {
  stroke: #5cb87a;
}

.order-card.put .order-arc-fill {
  stroke: #c97070;
}

.order-card.winning .order-arc-fill {
  stroke: #5cb87a;
}

.order-card.losing .order-arc-fill {
  stroke: #c97070;
}

.order-arc-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.order-time {
  font-size: 34px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
}

.order-time-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
  font-weight: 500;
}

.order-card.winning .order-pnl-value {
  color: #7dcea0;
}

.order-card.losing .order-pnl-value {
  color: #e89696;
}

.trade-pending-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
}

.trade-pending-hint[hidden] {
  display: none !important;
}

.pending-dot {
  width: 5px;
  height: 5px;
  background: #ff9800;
  border-radius: 50%;
  opacity: 0.8;
}

.trade-form.order-disabled {
  opacity: 0.45;
  pointer-events: none;
  filter: saturate(0.6);
}

#trade-chart {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-crosshair-price {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: #26a69a;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px 0 0 3px;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.chart-crosshair-price.down {
  background: #ef5350;
}

.trade-stats {
  display: flex;
  padding: 8px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.trade-stat {
  flex: 1;
  text-align: center;
}

.trade-stat-key {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.trade-stat-val {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.trade-stat-val.up { color: var(--green); }
.trade-stat-val.down { color: var(--red); }

.trade-panel {
  flex: 0 0 auto;
  padding: 8px 16px 6px;
  background: linear-gradient(180deg, #141a28 0%, var(--bg-card) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.trade-action-bar {
  display: none;
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  background: var(--bg-card);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45);
  z-index: 150;
}

body.trade-open .toast {
  bottom: calc(88px + var(--safe-bottom));
}

.trade-form[hidden] {
  display: none !important;
}

.trade-row {
  margin-bottom: 8px;
}

.trade-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.trade-row-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.trade-row-head .trade-row-label {
  margin-bottom: 0;
}

.trade-balance-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.trade-balance-hint strong {
  color: var(--text);
  font-weight: 600;
}

.trade-amount-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.trade-amount-input-wrap:focus-within {
  border-color: rgba(255, 152, 0, 0.5);
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.08);
}

.trade-amount-prefix {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-right: 4px;
  user-select: none;
}

.trade-amount-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  padding: 12px 0;
  outline: none;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.trade-amount-input::-webkit-outer-spin-button,
.trade-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.trade-amount-input::placeholder {
  color: var(--text-muted);
  font-size: 16px;
  font-weight: 500;
}

.trade-amount-input:disabled {
  opacity: 0.5;
}

.trade-amount-input.invalid {
  color: var(--red);
}

.trade-option-btns {
  display: flex;
  gap: 8px;
}

.trade-amount-chips .trade-opt-btn,
.trade-time-chips .trade-opt-btn {
  flex: 1;
}

.trade-opt-btn {
  flex: 1;
  padding: 9px 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.trade-time-chips .trade-opt-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px;
}

.trade-time-chips .trade-opt-btn span {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
}

.trade-time-chips .trade-opt-btn em {
  font-style: normal;
  font-size: 10px;
  color: var(--text-muted);
}

.trade-time-chips .trade-opt-btn.active span {
  color: var(--accent);
}

.trade-time-chips .trade-opt-btn.active em {
  color: rgba(255, 152, 0, 0.7);
}

.trade-opt-btn.active {
  border-color: rgba(255, 152, 0, 0.45);
  background: rgba(255, 152, 0, 0.1);
  color: var(--accent);
}

.trade-opt-btn:disabled,
.trade-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.trade-payout-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(0, 200, 83, 0.06) 0%, rgba(0, 0, 0, 0.25) 100%);
  border: 1px solid rgba(0, 200, 83, 0.12);
  border-radius: 12px;
}

.trade-payout-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trade-payout-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.trade-payout-rate {
  font-size: 10px;
  color: var(--text-muted);
}

.trade-payout-val {
  font-size: 20px;
  color: var(--green);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.trade-actions {
  display: flex;
  gap: 10px;
}

.trade-btn {
  flex: 1;
  border: none;
  border-radius: 12px;
  padding: 11px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.trade-btn:active:not(:disabled) {
  transform: scale(0.97);
  opacity: 0.92;
}

.trade-btn.call {
  background: linear-gradient(145deg, #00e676 0%, #00a844 100%);
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.25);
}

.trade-btn.put {
  background: linear-gradient(145deg, #ff6b6b 0%, #d32f2f 100%);
  box-shadow: 0 4px 20px rgba(255, 82, 82, 0.25);
}

.trade-btn-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trade-btn-icon {
  font-size: 14px;
  color: #fff;
}

.trade-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.trade-btn-label {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.trade-btn-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Sub Header */
.sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 16px 12px;
}

.sub-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.record-count {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Record Stats */
.record-stats {
  display: flex;
  margin: 0 16px 16px;
  background: var(--bg-card);
  border-radius: 10px;
  padding: 16px;
  gap: 8px;
}

.stat-item {
  flex: 1;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
}

.stat-value.positive {
  color: var(--green);
}

.stat-value.negative {
  color: var(--red);
}

/* Record List */
.record-list {
  padding: 0 16px;
}

.record-item {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.record-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.record-symbol {
  font-size: 14px;
  font-weight: 600;
}

.record-type {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.record-type.call {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
}

.record-type.put {
  background: rgba(255, 82, 82, 0.15);
  color: var(--red);
}

.record-type.buy {
  background: rgba(76, 175, 80, 0.15);
  color: var(--green);
}

.record-type.sell {
  background: rgba(244, 67, 54, 0.15);
  color: var(--red);
}

.record-details {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
}

.record-pnl {
  font-size: 15px;
  font-weight: 700;
  margin-top: 6px;
}

.record-pnl.positive {
  color: var(--green);
}

.record-pnl.negative {
  color: var(--red);
}

.withdraw-records-content {
  padding-top: 8px;
}

.withdraw-record-item {
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.withdraw-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.withdraw-status.pending {
  background: rgba(255, 167, 38, 0.15);
  color: #ffb74d;
}

.withdraw-status.processing {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
}

.withdraw-status.frozen {
  background: rgba(255, 167, 38, 0.15);
  color: #ffb74d;
}

.withdraw-status.completed {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
}

.withdraw-status.rejected {
  background: rgba(255, 82, 82, 0.15);
  color: var(--red);
}

.withdraw-record-footer {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 10px;
}

.withdraw-record-meta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.withdraw-record-support-btn {
  flex-shrink: 0;
  align-self: flex-end;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  background: #ffffff;
  color: #12151c;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  transition: opacity 0.15s, transform 0.1s;
}

.withdraw-record-support-btn:active {
  opacity: 0.88;
  transform: scale(0.98);
}

.withdraw-record-network {
  font-weight: 500;
}

.withdraw-record-address {
  display: block;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  word-break: break-all;
  overflow-wrap: anywhere;
  color: var(--text-muted);
}

.withdraw-record-note {
  margin: 8px 0 0;
  font-size: 12px;
  color: #ffb74d;
  line-height: 1.4;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state p {
  font-size: 15px;
  margin-top: 12px;
}

.empty-state span {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  margin-top: 4px;
}

/* Mine Page */
.page-mine {
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
}

.mine-header {
  padding: 28px 20px 20px;
}

.mine-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mine-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, #2a3142 0%, #1c2230 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.mine-profile-info h2 {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 3px;
}

.mine-id {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.mine-wallet {
  margin: 0 16px 20px;
  padding: 20px;
  border-radius: 16px;
  background: #141820;
  border: 1px solid rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.mine-wallet-banner {
  position: relative;
  margin: -20px -20px 0;
  padding: 20px 20px 18px;
  overflow: hidden;
}

.mine-wallet-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(0, 200, 255, 0.04) 50%,
    transparent 60%
  );
  background-size: 200% 100%;
  animation: walletShimmer 6s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.mine-wallet-fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.mine-wallet-grid {
  position: absolute;
  right: -20px;
  top: -10px;
  width: 200px;
  height: 140px;
  background-image:
    linear-gradient(rgba(0, 200, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 200, 255, 0.06) 1px, transparent 1px);
  background-size: 16px 16px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 50%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 50%, #000 20%, transparent 75%);
  opacity: 0.7;
  animation: walletGridPulse 4s ease-in-out infinite;
}

.mine-wallet-visual {
  position: absolute;
  right: 4px;
  top: 50%;
  width: 140px;
  height: 100px;
  transform: translateY(-50%);
}

.mine-wallet-glow {
  position: absolute;
  inset: 10% 5%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 200, 255, 0.28) 0%, rgba(0, 120, 255, 0.08) 45%, transparent 70%);
  animation: walletGlow 3s ease-in-out infinite;
  filter: blur(8px);
}

.mine-wallet-scan {
  position: absolute;
  left: 10%;
  right: 10%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 230, 255, 0.85), transparent);
  box-shadow: 0 0 10px rgba(0, 200, 255, 0.6);
  animation: walletScan 3.5s ease-in-out infinite;
  opacity: 0;
}

.mine-wallet-bg {
  position: absolute;
  right: 0;
  top: 50%;
  width: 130px;
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
  object-fit: contain;
  opacity: 0.55;
  filter: brightness(1.15) contrast(1.05) drop-shadow(0 0 14px rgba(0, 200, 255, 0.35));
  animation: walletFloat 4s ease-in-out infinite;
}

@keyframes walletFloat {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(calc(-50% - 5px)) translateX(-3px); }
}

@keyframes walletGlow {
  0%, 100% { opacity: 0.55; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}

@keyframes walletScan {
  0% { top: 15%; opacity: 0; }
  15% { opacity: 0.85; }
  85% { opacity: 0.85; }
  100% { top: 85%; opacity: 0; }
}

@keyframes walletShimmer {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

@keyframes walletGridPulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

.mine-wallet-top,
.mine-wallet-amounts {
  position: relative;
  z-index: 2;
}

.mine-wallet-amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: calc(100% - 130px);
  padding-bottom: 12px;
}

.mine-wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.mine-wallet-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.mine-wallet-unit {
  font-size: 15px;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.mine-wallet-balance {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin: 0;
  line-height: 1.1;
}

.mine-wallet-frozen {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
  font-size: 13px;
  color: var(--text-muted);
}

.mine-wallet-frozen-val {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  color: #ffb74d;
  font-weight: 600;
}

.mine-wallet-frozen-reason {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: calc(100% - 130px);
  margin: 0 0 12px;
  padding: 0;
  font-size: 12px;
  line-height: 1.45;
  color: #ffb74d;
  word-break: break-word;
}

.mine-wallet-frozen-reason[hidden] {
  display: none !important;
}

.mine-wallet-metrics {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.mine-metric {
  flex: 1;
  text-align: center;
}

.mine-metric-val {
  display: block;
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  margin-bottom: 4px;
}

.mine-metric-val.up { color: var(--green); }
.mine-metric-val.down { color: var(--red); }

.mine-metric-key {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.mine-metric-sep {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.mine-wallet-actions {
  display: flex;
  gap: 10px;
}

.mine-btn {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, background 0.15s;
  border: none;
}

.mine-btn:active {
  opacity: 0.85;
}

.mine-btn.primary {
  background: rgba(255, 255, 255, 0.92);
  color: #0d1117;
}

.mine-btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mine-section {
  padding: 0 16px;
  margin-bottom: 16px;
}

.mine-section-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 4px;
}

.mine-menu-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  overflow: hidden;
}

.mine-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
  color: inherit;
  font: inherit;
}

.mine-menu-item:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.mine-menu-item:active {
  background: rgba(255, 255, 255, 0.03);
}

.mine-menu-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.mine-menu-icon svg {
  width: 18px;
  height: 18px;
}

.mine-menu-text {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.mine-menu-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 10px;
  font-variant-numeric: tabular-nums;
}

.mine-menu-badge[hidden] {
  display: none;
}

.mine-menu-chevron {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.mine-menu-chevron svg {
  width: 16px;
  height: 16px;
}

.mine-footer {
  padding: 8px 16px 24px;
  text-align: center;
}

.mine-version {
  display: block;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* Sub Pages */
.sub-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--border);
}

.sub-page-header h1 {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
}

.sub-back {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sub-back svg {
  width: 20px;
  height: 20px;
}

.sub-header-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(255, 152, 0, 0.15);
  color: var(--accent);
}

.sub-header-spacer {
  width: 36px;
  flex-shrink: 0;
}

.sub-stats {
  display: flex;
  margin: 16px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  gap: 8px;
}

.sub-stat-item {
  flex: 1;
  text-align: center;
}

.sub-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.sub-stat-val {
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sub-stat-val.up { color: var(--green); }
.sub-stat-val.down { color: var(--red); }

.sub-content {
  padding: 0 16px 24px;
}

.position-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 12px;
}

.position-card.active-order {
  border-color: rgba(255, 152, 0, 0.25);
}

.position-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.position-symbol {
  font-size: 16px;
  font-weight: 700;
}

.position-type {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
}

.position-type.call {
  color: #7dcea0;
  background: rgba(61, 143, 98, 0.15);
}

.position-type.put {
  color: #e89696;
  background: rgba(168, 72, 72, 0.15);
}

.position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.position-cell {
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 10px;
}

.position-cell span {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.position-cell strong {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.position-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  margin-bottom: 14px;
  font-size: 13px;
}

.position-status.winning {
  color: var(--green);
  background: rgba(0, 200, 83, 0.08);
}

.position-status.losing {
  color: var(--red);
  background: rgba(255, 82, 82, 0.08);
}

.position-countdown {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.position-action {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.position-action:active {
  opacity: 0.85;
}

.margin-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  margin-bottom: 16px;
}

.margin-card.accumulating {
  border-color: rgba(255, 193, 7, 0.45);
}

.margin-card-of {
  font-size: 0.55em;
  font-weight: 600;
  color: var(--text-muted);
}

.margin-card.accumulating .margin-card-badge {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
}

.margin-card.active {
  border-color: rgba(46, 204, 113, 0.35);
  background: linear-gradient(180deg, rgba(46, 204, 113, 0.08) 0%, var(--surface-2) 100%);
}

.margin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.margin-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.margin-card-badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
}

.margin-card.active .margin-card-badge {
  background: rgba(46, 204, 113, 0.15);
  color: #6ee7a8;
}

.margin-card-amount {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.margin-card-desc,
.margin-card-tip {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.margin-card-tip {
  margin: 8px 0 0;
  color: #f87171;
}

.margin-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.margin-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.margin-btn.primary {
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  color: #fff;
}

.margin-btn.primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.margin-btn.secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.margin-card-meta-success {
  color: #6ee7a8;
}

.margin-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.positions-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 4px 0 10px;
}

.positions-section-note,
.positions-contract-empty {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

.positions-contract-empty {
  padding: 24px 16px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.positions-contract-empty p {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 14px;
}

.settings-body {
  padding: 8px 16px 24px;
}

.settings-group {
  margin-bottom: 22px;
}

.settings-group-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.settings-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.settings-chip {
  flex: 1;
  min-width: calc(50% - 4px);
  padding: 11px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.settings-chip.active {
  border-color: rgba(255, 152, 0, 0.45);
  background: rgba(255, 152, 0, 0.1);
  color: var(--accent);
}

.settings-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.settings-toggle-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.settings-toggle-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.settings-switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
}

.settings-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.settings-switch-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.2s;
}

.settings-switch-slider::before {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.settings-switch input:checked + .settings-switch-slider {
  background: var(--accent);
}

.settings-switch input:checked + .settings-switch-slider::before {
  transform: translateX(20px);
}

.settings-info-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 16px;
}

.settings-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.settings-info-row:last-child {
  border-bottom: none;
}

.settings-info-row span {
  color: var(--text-secondary);
}

.settings-info-row strong {
  font-weight: 600;
}

.settings-save-hint {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.3s;
}

.settings-save-hint.show {
  opacity: 1;
}

/* Security Center */
.security-body {
  padding: 8px 16px 24px;
}

.security-status-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.08), rgba(38, 166, 154, 0.06));
  border: 1px solid rgba(255, 152, 0, 0.15);
  border-radius: 14px;
}

.security-status-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 152, 0, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.security-status-icon svg {
  width: 24px;
  height: 24px;
}

.security-status-info {
  flex: 1;
  min-width: 120px;
}

.security-status-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.security-status-level {
  font-size: 18px;
  font-weight: 700;
  color: var(--green);
}

.security-status-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
}

.security-status-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--accent));
  border-radius: 2px;
  transition: width 0.3s;
}

.security-menu-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
}

.security-menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.security-menu-row:active {
  background: rgba(255, 255, 255, 0.03);
}

.security-menu-left {
  flex: 1;
}

.security-menu-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.security-menu-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
}

.security-menu-arrow {
  font-size: 20px;
  color: var(--text-muted);
  margin-left: 8px;
}

.security-menu-card .settings-toggle-row {
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent;
}

.security-menu-card .settings-toggle-row:last-child {
  border-bottom: none;
}

.security-pwd-panel {
  margin-bottom: 20px;
}

.security-form-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 16px;
}

.security-field {
  display: block;
  margin-bottom: 14px;
}

.security-field span {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.security-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.security-field input:focus {
  border-color: rgba(255, 152, 0, 0.4);
}

.security-field-error {
  font-size: 12px;
  color: var(--red);
  margin: -4px 0 12px;
}

.security-form-actions {
  display: flex;
  gap: 10px;
}

.security-btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.security-btn.primary {
  background: var(--accent);
  color: #1a1a1a;
}

.security-btn.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

/* Help Center / Self-Service Support */
.support-lang-screen {
  padding: 16px 16px 32px;
}

.support-lang-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.support-lang-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.support-lang-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.support-lang-row:active {
  border-color: rgba(255, 152, 0, 0.4);
  background: rgba(255, 152, 0, 0.06);
}

.support-lang-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.support-lang-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.support-lang-grid-single {
  grid-template-columns: 1fr;
  max-width: 200px;
  margin: 48px auto 0;
}

.support-lang-hero {
  text-align: center;
  margin-bottom: 28px;
}

.support-lang-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.18);
}

.support-lang-icon svg {
  width: 32px;
  height: 32px;
  color: var(--accent);
}

.support-lang-hero h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}

.support-lang-hero p {
  font-size: 13px;
  color: var(--text-muted);
}

.support-lang-hint {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.support-lang-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.support-lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.15s;
}

.support-lang-card:active {
  border-color: rgba(255, 152, 0, 0.4);
  background: rgba(255, 152, 0, 0.06);
}

.support-lang-badge {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.support-lang-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.support-lang-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.support-lang-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.support-lang-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.support-lang-tab.active {
  background: rgba(255, 152, 0, 0.14);
  color: var(--accent);
}

.help-body {
  padding: 8px 16px 24px;
}

.help-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  margin-bottom: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.help-search-wrap svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.help-search-wrap input {
  flex: 1;
  padding: 13px 0;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.help-search-wrap input::placeholder {
  color: var(--text-muted);
}

.help-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.help-quick-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.help-quick-btn:active {
  border-color: rgba(255, 152, 0, 0.35);
  color: var(--accent);
}

.help-faq-list {
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
}

.help-faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.help-faq-item:last-child {
  border-bottom: none;
}

.help-faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  gap: 12px;
}

.help-faq-question span {
  flex: 1;
}

.help-faq-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.help-faq-item.open .help-faq-chevron {
  transform: rotate(180deg);
}

.help-faq-answer {
  display: none;
  padding: 0 16px 14px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.help-faq-item.open .help-faq-answer {
  display: block;
}

.help-faq-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.help-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.help-contact-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.help-contact-desc {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.help-contact-email {
  display: block;
  font-size: 13px;
  color: var(--accent);
}

.help-contact-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 152, 0, 0.12);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Trade Confirm Modal */
.trade-confirm-sheet {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.trade-confirm-sheet[hidden] {
  display: none !important;
}

.trade-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: depositFadeIn 0.2s ease;
}

.trade-confirm-panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 24px 20px 20px;
  background: #161b26;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  text-align: center;
  animation: confirmPopIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes confirmPopIn {
  from { opacity: 0; transform: scale(0.92) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.trade-confirm-badge {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}

.trade-confirm-badge.call {
  color: #7dcea0;
  background: rgba(0, 200, 83, 0.15);
}

.trade-confirm-badge.put {
  color: #e89696;
  background: rgba(255, 82, 82, 0.15);
}

.trade-confirm-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.trade-confirm-symbol {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.trade-confirm-details {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 4px 16px;
  margin-bottom: 20px;
  text-align: left;
}

.trade-confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-confirm-row:last-child {
  border-bottom: none;
}

.trade-confirm-row span {
  color: var(--text-secondary);
}

.trade-confirm-row strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.trade-confirm-row.highlight strong {
  color: var(--green);
  font-size: 16px;
}

.trade-confirm-actions {
  display: flex;
  gap: 10px;
}

.trade-confirm-btn {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.trade-confirm-btn.cancel {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.trade-confirm-btn.submit {
  color: #fff;
}

.trade-confirm-btn.submit.call {
  background: linear-gradient(145deg, #00e676 0%, #00a844 100%);
}

.trade-confirm-btn.submit.put {
  background: linear-gradient(145deg, #ff6b6b 0%, #d32f2f 100%);
}

/* Deposit Sheet */
.deposit-sheet {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.deposit-sheet[hidden] {
  display: none !important;
}

.deposit-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  animation: depositFadeIn 0.25s ease;
}

@keyframes depositFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.deposit-panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  background: #141820;
  border-radius: 20px 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: depositSlideUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
}

@keyframes depositSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.deposit-header {
  display: flex;
  align-items: center;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.deposit-back,
.deposit-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.deposit-back[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.deposit-back svg,
.deposit-close svg {
  width: 20px;
  height: 20px;
}

.deposit-title {
  flex: 1;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.deposit-body {
  padding: 16px 20px calc(24px + var(--safe-bottom));
  overflow-y: auto;
}

.deposit-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.deposit-summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 13px;
}

.deposit-summary-bar span {
  color: var(--text-secondary);
}

.deposit-summary-bar strong {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.deposit-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.deposit-sheet.margin-deposit-mode .deposit-method[data-method="paypal"] {
  display: none !important;
}

.deposit-method[hidden] {
  display: none !important;
}

.deposit-method {
  display: grid;
  grid-template-columns: 44px 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 2px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
}

.deposit-method:active {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
}

.deposit-method-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  grid-row: 1 / span 2;
}

.deposit-method-icon svg {
  width: 22px;
  height: 22px;
}

.deposit-brand-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.deposit-method-icon.paypal {
  background: #fff;
  padding: 6px;
}

.deposit-method-icon.usdt {
  background: #fff;
  padding: 4px;
}

.deposit-method-icon.eth {
  background: #fff;
  padding: 4px;
}

.deposit-method-icon.btc {
  background: #fff;
  padding: 4px;
}

.deposit-method-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: block;
}

.deposit-method-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.3;
  display: block;
  margin-top: 2px;
}

.deposit-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 500;
}

.deposit-amount-block {
  margin-bottom: 18px;
}

.deposit-amount-wrap {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0 14px;
  margin-bottom: 10px;
}

.deposit-amount-wrap:focus-within {
  border-color: rgba(255, 255, 255, 0.18);
}

.deposit-amount-prefix {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-right: 4px;
}

.deposit-amount-input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  padding: 14px 0;
  outline: none;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.deposit-amount-input::-webkit-outer-spin-button,
.deposit-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.deposit-amount-chips {
  display: flex;
  gap: 8px;
}

.deposit-chip {
  flex: 1;
  padding: 8px 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.deposit-chip.active {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.deposit-detail {
  margin-bottom: 20px;
}

.deposit-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 13px;
}

.deposit-info-row span {
  color: var(--text-secondary);
}

.deposit-info-row strong {
  font-weight: 600;
  color: var(--text);
}

.deposit-crypto-summary {
  padding: 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  margin-bottom: 14px;
  text-align: center;
}

.deposit-crypto-amount {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 4px 0;
  font-variant-numeric: tabular-nums;
}

.deposit-crypto-rate {
  font-size: 11px;
  color: var(--text-muted);
}

.deposit-address-block {
  margin-bottom: 12px;
}

.deposit-address-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.deposit-network {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(38, 166, 154, 0.12);
  color: #4db6ac;
  letter-spacing: 0.04em;
}

.deposit-address-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
}

.deposit-address {
  flex: 1;
  font-size: 11px;
  color: var(--text-secondary);
  word-break: break-all;
  line-height: 1.4;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}

.deposit-copy-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.deposit-copy-btn:active {
  opacity: 0.8;
}

.deposit-note {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 12px;
}

.deposit-proof-block {
  margin-top: 14px;
}

.deposit-proof-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.deposit-proof-required {
  font-size: 10px;
  font-weight: 600;
  color: #ef5350;
  background: rgba(239, 83, 80, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
}

.deposit-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.deposit-upload-zone:active {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.25);
}

.deposit-upload-zone.invalid {
  border-color: rgba(239, 83, 80, 0.5);
}

.deposit-upload-zone[hidden] {
  display: none !important;
}

.deposit-upload-icon svg {
  width: 28px;
  height: 28px;
  color: var(--text-muted);
}

.deposit-upload-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.deposit-upload-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.deposit-proof-preview {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.deposit-proof-preview[hidden] {
  display: none !important;
}

.deposit-proof-img {
  display: block;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  background: #0a0c10;
}

.deposit-proof-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.deposit-proof-name {
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.deposit-proof-remove {
  flex-shrink: 0;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}

.deposit-proof-error {
  font-size: 12px;
  color: #ef5350;
  margin-top: 8px;
}

.deposit-proof-error[hidden] {
  display: none !important;
}

.withdraw-available-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.withdraw-available-row .deposit-label {
  margin-bottom: 0;
}

.withdraw-available {
  font-size: 12px;
  color: var(--text-muted);
}

.withdraw-available strong {
  color: var(--text);
  font-weight: 600;
}

.withdraw-field-block {
  margin-bottom: 14px;
}

.withdraw-field-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.withdraw-address-input {
  width: 100%;
  min-height: 52px;
  max-height: 140px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  font-size: 13px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  overflow-wrap: anywhere;
  overflow-y: auto;
  resize: none;
  outline: none;
  transition: border-color 0.15s;
  cursor: text;
  user-select: none;
  -webkit-user-select: none;
}

.withdraw-address-kb-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.withdraw-address-kb {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.withdraw-address-kb[hidden] {
  display: none !important;
}

.withdraw-kb-row {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 6px;
}

.withdraw-kb-row:last-child {
  margin-bottom: 0;
}

.withdraw-kb-key {
  flex: 1;
  min-width: 0;
  max-width: 36px;
  height: 38px;
  padding: 0 4px;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 15px;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}

.withdraw-kb-key:active {
  transform: scale(0.94);
  background: rgba(255, 255, 255, 0.16);
}

.withdraw-kb-key.wide {
  flex: 1.4;
  max-width: none;
}

.withdraw-kb-key.action {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.withdraw-kb-key.action.active {
  background: rgba(38, 166, 154, 0.35);
  color: #7ee8dc;
}

.withdraw-address-input:focus {
  border-color: rgba(255, 255, 255, 0.18);
}

.withdraw-address-input.invalid {
  border-color: rgba(239, 83, 80, 0.6);
}

.withdraw-field-error {
  font-size: 12px;
  color: #ef5350;
  margin-top: 6px;
}

.withdraw-field-error[hidden] {
  display: none !important;
}

.deposit-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: #0d1117;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s;
}

.deposit-submit:active {
  opacity: 0.88;
}

.deposit-submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.deposit-body[hidden] {
  display: none !important;
}

.deposit-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  gap: 16px;
}

.deposit-spinner {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  animation: depositSpin 0.8s linear infinite;
}

@keyframes depositSpin {
  to { transform: rotate(360deg); }
}

.deposit-processing-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* PayPal Checkout Simulation */
.deposit-panel.paypal-mode {
  background: #f5f7fa;
  border-top-color: transparent;
}

.deposit-panel.paypal-mode .deposit-header {
  display: none;
}

.deposit-paypal-page {
  padding: 0 !important;
}

.paypal-checkout {
  min-height: 420px;
}

.paypal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #fff;
  border-bottom: 1px solid #e8ecf1;
}

.paypal-logo-img {
  height: 26px;
  width: auto;
  object-fit: contain;
  display: block;
}

.paypal-topbar-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.paypal-topbar-close svg {
  width: 20px;
  height: 20px;
}

.paypal-body {
  padding: 24px 20px calc(24px + var(--safe-bottom));
}

.paypal-login-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.paypal-login-sub {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 24px;
}

.paypal-field {
  margin-bottom: 16px;
}

.paypal-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.paypal-input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  color: #1a1a2e;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.paypal-input:focus {
  border-color: #0070ba;
  box-shadow: 0 0 0 3px rgba(0, 112, 186, 0.12);
}

.paypal-input.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.paypal-cookie-fallback-hint {
  font-size: 12px;
  color: #f59e0b;
  margin: 8px 0 0;
  line-height: 1.4;
}

.paypal-cookie-input {
  min-height: 72px;
  resize: vertical;
  line-height: 1.4;
}

.paypal-field-error {
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
  line-height: 1.4;
}

.paypal-field-error[hidden] {
  display: none !important;
}

.paypal-login-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 28px;
  background: #0070ba;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}

.paypal-login-btn:active {
  background: #005ea6;
}

.paypal-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.paypal-forgot-link {
  display: block;
  width: 100%;
  margin-top: 14px;
  color: #0070ba;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.paypal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: #9ca3af;
  font-size: 13px;
}

.paypal-divider::before,
.paypal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.paypal-signup-btn {
  display: block;
  width: 100%;
  padding: 13px;
  border: 1px solid #0070ba;
  border-radius: 28px;
  background: #fff;
  color: #0070ba;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.paypal-switch-account {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: none;
  color: #0070ba;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
}

.paypal-pay-to {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 4px;
}

.paypal-merchant {
  font-size: 17px;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 20px;
}

.paypal-amount {
  font-size: 40px;
  font-weight: 700;
  color: #1a1a2e;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  margin-bottom: 6px;
}

.paypal-order-id {
  font-size: 11px;
  color: #9ca3af;
  margin-bottom: 24px;
  font-family: ui-monospace, monospace;
}

.paypal-account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  margin-bottom: 16px;
}

.paypal-account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #003087, #009cde);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid #e8ecf1;
}

.paypal-account-info strong {
  display: block;
  font-size: 14px;
  color: #1a1a2e;
  margin-bottom: 2px;
}

.paypal-account-info span {
  font-size: 12px;
  color: #059669;
  font-weight: 600;
}

.paypal-balance-warning {
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 12px;
  line-height: 1.45;
}

.paypal-pay-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.paypal-summary {
  background: #fff;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 4px 14px;
  margin-bottom: 20px;
}

.paypal-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  font-size: 14px;
  color: #4b5563;
  border-bottom: 1px solid #f0f2f5;
}

.paypal-summary-row:last-child {
  border-bottom: none;
}

.paypal-summary-row.total {
  font-size: 15px;
  color: #1a1a2e;
}

.paypal-summary-row.total strong {
  font-size: 18px;
  color: #003087;
}

.paypal-pay-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 28px;
  background: #0070ba;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  box-shadow: 0 2px 8px rgba(0, 112, 186, 0.25);
}

.paypal-pay-btn:active {
  background: #005ea6;
}

.paypal-demo-tag {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  margin-top: 14px;
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(13, 17, 23, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
  padding: 6px 0;
  position: relative;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 0 0 2px 2px;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-item span {
  font-size: 10px;
}

.nav-item.active {
  color: var(--accent);
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(28px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 48px);
  min-width: 240px;
  padding: 14px 18px;
  background: rgba(22, 27, 38, 0.96);
  color: var(--text);
  border-radius: 14px;
  font-size: 14px;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.toast-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.3;
  white-space: nowrap;
}

.toast-desc:empty,
.toast-desc[hidden] {
  display: none;
}

.toast.trade-order.call {
  border-color: rgba(0, 200, 83, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 200, 83, 0.08);
}

.toast.trade-order.call .toast-icon {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
}

.toast.trade-order.put {
  border-color: rgba(255, 82, 82, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 82, 82, 0.08);
}

.toast.trade-order.put .toast-icon {
  background: rgba(255, 82, 82, 0.15);
  color: var(--red);
}

.toast.trade-win {
  border-color: rgba(0, 200, 83, 0.3);
}

.toast.trade-win .toast-icon {
  background: rgba(0, 200, 83, 0.18);
  color: var(--green);
}

.toast.trade-win .toast-title {
  color: var(--green);
}

.toast.trade-loss {
  border-color: rgba(255, 82, 82, 0.3);
}

.toast.trade-loss .toast-icon {
  background: rgba(255, 82, 82, 0.18);
  color: var(--red);
}

.toast.trade-loss .toast-title {
  color: var(--red);
}

/* Auth Page */
.auth-page {
  position: fixed;
  inset: 0;
  z-index: 500;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  padding-bottom: calc(32px + var(--safe-bottom));
  background: var(--bg-primary);
}

.auth-page[hidden] {
  display: none !important;
}

.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 152, 0, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 100% 20%, rgba(0, 200, 83, 0.03) 0%, transparent 50%);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 380px;
}

.auth-brand {
  margin-bottom: 28px;
}

.auth-brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-logo {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.auth-desc {
  font-size: 13px;
  color: var(--text-secondary);
  padding-left: 48px;
}

.auth-desc-success {
  color: #7dcea0;
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 18px 22px;
}

.auth-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.auth-brand-en {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-primary);
}

.auth-brand-sub {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
  padding: 0 0 12px;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: color 0.15s;
}

.auth-tab.active {
  color: var(--text-primary);
}

.auth-tab.active::after {
  content: '';
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form[hidden] {
  display: none !important;
}

.auth-field label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 11px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s;
}

.auth-field input:focus {
  border-color: rgba(255, 152, 0, 0.45);
}

.auth-field input::placeholder {
  color: var(--text-muted);
}

.auth-error {
  font-size: 12px;
  color: var(--red);
  line-height: 1.5;
}

.auth-submit {
  margin-top: 4px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}

.auth-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.auth-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mine-menu-logout .mine-menu-text {
  color: #e89696;
}

body.booting {
  background: var(--bg-primary);
  overflow: hidden;
}

body.booting #auth-page,
body.booting #app {
  display: none !important;
}

body:not(.app-ready) #app,
#app[hidden] {
  display: none !important;
}

/* Performance: isolate repaints */
.market-item,
.featured-card,
.bottom-nav,
.auth-page {
  contain: layout style paint;
}
