/* ========================================
   火山给我点支烟 - 设计系统 v2
   Volcano Trading Platform - 超越版
   ======================================== */

:root {
  --bg-primary: #06060c;
  --bg-secondary: #0d0d14;
  --bg-card: #12121c;
  --bg-card-hover: #1a1a28;
  --bg-card-active: #1f1f30;
  --bg-overlay: rgba(6, 6, 12, 0.92);
  
  --lava-1: #ff4d00;
  --lava-2: #ff6b35;
  --lava-3: #ff8c42;
  --lava-4: #ffaa5c;
  --lava-glow: rgba(255, 77, 0, 0.25);
  --lava-glow-strong: rgba(255, 77, 0, 0.5);
  --lava-gradient: linear-gradient(135deg, #ff4d00, #ff6b35, #ff8c42);
  
  --neon-blue: #00d4ff;
  --neon-purple: #b24dff;
  --neon-green: #00ff88;
  --neon-red: #ff3366;
  --neon-yellow: #ffd700;
  
  --text-primary: #eaeaef;
  --text-secondary: #7a7a8c;
  --text-muted: #4a4a5c;
  
  --up: #00ff88;
  --down: #ff3366;
  
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --font-main: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Fira Code", "JetBrains Mono", monospace;
  
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px var(--lava-glow);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 85%, rgba(255, 77, 0, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 15%, rgba(0, 212, 255, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(178, 77, 255, 0.02) 0%, transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
button { border: none; outline: none; cursor: pointer; font-family: inherit; background: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* --- Container --- */
.container { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 var(--space-md); }

.page { display: none; min-height: 100vh; padding-bottom: 72px; }
.page.active { display: block; animation: pageIn 0.3s ease; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* --- Desktop Layout --- */
@media (min-width: 768px) {
  .container { max-width: 1200px; }
  .page { padding-bottom: 80px; }
  .header { position: sticky; top: 0; }
  .banner { height: 280px; }
  .asset-value { font-size: 2.8rem; }
  .kline-area { height: 400px; }
  .market-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
  .sub-page {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid rgba(255,255,255,0.04);
    border-right: 1px solid rgba(255,255,255,0.04);
  }
}

/* --- Header --- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(255, 77, 0, 0.1);
  padding: 12px 0;
}

.header-inner { display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; }

.logo-icon {
  width: 34px; height: 34px;
  background: var(--lava-gradient);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 24px var(--lava-glow);
  animation: logoBreath 3s ease-in-out infinite;
}

@keyframes logoBreath {
  0%, 100% { box-shadow: 0 0 20px var(--lava-glow); }
  50% { box-shadow: 0 0 35px var(--lava-glow-strong); }
}

.logo-text {
  font-size: 1rem; font-weight: 700;
  background: var(--lava-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.header-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 16px;
  transition: all 0.3s;
}

.header-btn:hover {
  border-color: var(--lava-1);
  color: var(--lava-1);
  box-shadow: 0 0 16px var(--lava-glow);
}

/* --- Tab Bar --- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 77, 0, 0.08);
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
}

.tabbar-inner { display: flex; justify-content: space-around; align-items: center; }

.tab-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 12px; border-radius: 8px;
  color: var(--text-muted); cursor: pointer; transition: all 0.3s;
  min-width: 52px;
}

.tab-item:hover { color: var(--text-secondary); }
.tab-item.active { color: var(--lava-1); }
.tab-item.active .tab-icon { filter: drop-shadow(0 0 8px var(--lava-glow-strong)); }

.tab-icon { font-size: 20px; transition: all 0.3s; }
.tab-label { font-size: 0.6rem; font-weight: 500; }

.tab-center { margin-top: -18px; }

.tab-center .tab-icon {
  width: 44px; height: 44px;
  background: var(--lava-gradient);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff;
  box-shadow: 0 0 28px var(--lava-glow-strong);
  transition: all 0.3s;
}

.tab-center:hover .tab-icon { transform: scale(1.08); }

/* --- Card --- */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: var(--space-md);
  transition: all 0.3s;
}

.card:hover {
  border-color: rgba(255, 77, 0, 0.15);
  box-shadow: var(--shadow-card);
}

/* --- Banner --- */
.banner {
  margin: 12px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 150px;
  background: var(--bg-card);
  position: relative;
}

.banner-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  height: 100%;
}

.banner-slide {
  min-width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}

.slide-1 { background: linear-gradient(135deg, #1a0800 0%, #2a1510 50%, #0a0a0f 100%); }
.slide-2 { background: linear-gradient(135deg, #081520 0%, #102030 50%, #0a0a12 100%); }
.slide-3 { background: linear-gradient(135deg, #150820 0%, #201030 50%, #0a0a12 100%); }

.banner-glow {
  position: absolute;
  width: 180px; height: 180px;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.35;
}

.slide-glow-1 { background: var(--lava-1); top: -40px; right: -40px; }
.slide-glow-2 { background: var(--neon-blue); bottom: -40px; left: -40px; }

.banner-content { padding: var(--space-lg); text-align: center; z-index: 1; }

.banner-title {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 4px;
  background: linear-gradient(90deg, var(--lava-1), var(--lava-3), var(--neon-blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.banner-sub { font-size: 0.7rem; color: var(--text-secondary); }

.banner-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 5px; z-index: 2;
}

.banner-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--text-muted); transition: all 0.3s; cursor: pointer;
}

.banner-dot.active {
  width: 16px; border-radius: 3px;
  background: var(--lava-1);
  box-shadow: 0 0 8px var(--lava-glow);
}

/* --- Ticker --- */
.ticker {
  overflow: hidden;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 77, 0, 0.08);
}

.ticker-track {
  display: flex; gap: 32px;
  animation: tickerScroll 25s linear infinite;
  white-space: nowrap;
}

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

.ticker-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.7rem; flex-shrink: 0;
}

.ticker-name { color: var(--text-secondary); }
.ticker-price { font-family: var(--font-mono); font-weight: 600; }

.ticker-change {
  font-family: var(--font-mono);
  padding: 1px 5px; border-radius: 3px; font-size: 0.6rem;
}

.ticker-change.up { color: var(--up); background: rgba(0, 255, 136, 0.08); }
.ticker-change.down { color: var(--down); background: rgba(255, 51, 102, 0.08); }

/* --- Notice --- */
.notice {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 77, 0, 0.06);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 77, 0, 0.12);
  margin-bottom: 12px;
  overflow: hidden;
}

.notice-icon { font-size: 14px; color: var(--lava-1); flex-shrink: 0; }

.notice-text {
  font-size: 0.7rem; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: noticeScroll 20s linear infinite;
}

@keyframes noticeScroll {
  0%, 15% { transform: translateX(0); }
  85%, 100% { transform: translateX(-30%); }
}

/* --- Section --- */
.section { margin-bottom: 20px; }

.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}

.section-title {
  font-size: 0.95rem; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}

.section-title::before {
  content: '';
  width: 3px; height: 14px;
  background: var(--lava-gradient);
  border-radius: 2px;
}

.section-more {
  font-size: 0.7rem; color: var(--text-secondary);
  display: flex; align-items: center; gap: 3px; cursor: pointer;
}

.section-more:hover { color: var(--lava-1); }

/* --- Market Item --- */
.market-item {
  display: flex; align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s;
}

.market-item:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 77, 0, 0.15);
  transform: translateY(-1px);
}

.market-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  margin-right: 12px;
  flex-shrink: 0;
}

.market-info { flex: 1; min-width: 0; }
.market-name { font-weight: 600; font-size: 0.85rem; }
.market-symbol { font-size: 0.7rem; color: var(--text-secondary); font-family: var(--font-mono); }

.market-price { text-align: right; margin-left: 12px; }
.market-current { font-family: var(--font-mono); font-weight: 600; font-size: 0.9rem; }
.market-change { font-family: var(--font-mono); font-size: 0.7rem; text-align: right; }
.market-change.up { color: var(--up); }
.market-change.down { color: var(--down); }

/* --- Profit Scroll --- */
.profit-scroll {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 77, 0, 0.08);
  padding: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.profit-track {
  animation: profitScroll 30s linear infinite;
}

@keyframes profitScroll {
  0% { transform: translateY(0); }
  100% { transform: translateY(-50%); }
}

.profit-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.profit-user {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  min-width: 90px;
}

.profit-action { color: var(--text-secondary); }
.profit-action.buy { color: var(--neon-green); }
.profit-action.sell { color: var(--neon-red); }

.profit-amount {
  margin-left: auto;
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--neon-green);
}

.profit-time { color: var(--text-muted); font-size: 0.6rem; min-width: 30px; text-align: right; }

/* --- Trade Page --- */
.trade-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.trade-pair { display: flex; align-items: center; gap: 10px; }
.trade-pair-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.trade-pair-name { font-size: 1.1rem; font-weight: 700; }

.trade-pair-price { font-family: var(--font-mono); font-weight: 600; font-size: 1rem; text-align: right; }
.trade-pair-change { font-family: var(--font-mono); font-size: 0.7rem; text-align: right; }
.trade-pair-change.up { color: var(--up); }
.trade-pair-change.down { color: var(--down); }

/* K-line */
.kline-area {
  height: 220px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin: 12px 0;
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.kline-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 36px 36px;
}

.kline-canvas { width: 100%; height: 100%; }

.kline-label {
  position: absolute; bottom: 10px; left: 10px;
  font-size: 0.65rem; color: var(--text-muted);
  background: rgba(0, 0, 0, 0.5);
  padding: 2px 8px; border-radius: 4px;
}

/* Depth Chart */
.depth-area {
  height: 120px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.depth-canvas { width: 100%; height: 100%; }

/* Trade Form */
.trade-form { padding: 12px 0; }

.trade-tabs { display: flex; gap: 8px; margin-bottom: 14px; }

.trade-tab {
  flex: 1; padding: 10px; text-align: center;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: all 0.3s;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.trade-tab.active { border-color: var(--lava-1); color: var(--lava-1); background: rgba(255, 77, 0, 0.08); }
.trade-tab.active.green { border-color: var(--up); color: var(--up); background: rgba(0, 255, 136, 0.08); }
.trade-tab.active.red { border-color: var(--down); color: var(--down); background: rgba(255, 51, 102, 0.08); }

.trade-group { margin-bottom: 12px; }

.trade-label {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 4px;
}

.trade-input-wrap { position: relative; display: flex; align-items: center; }

.trade-input {
  width: 100%;
  padding: 12px;
  background: var(--bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  outline: none; transition: border-color 0.3s;
}

.trade-input:focus {
  border-color: var(--lava-1);
  box-shadow: 0 0 0 3px var(--lava-glow);
}

.trade-suffix {
  position: absolute; right: 12px;
  font-size: 0.7rem; color: var(--text-secondary);
  font-family: var(--font-mono);
}

.quick-btns { display: flex; gap: 6px; margin-bottom: 12px; }

.quick-btn {
  flex: 1; padding: 6px; text-align: center;
  font-size: 0.7rem;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer; transition: all 0.3s;
  font-family: var(--font-mono);
}

.quick-btn:hover { border-color: var(--lava-1); color: var(--lava-1); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 0.9rem;
  transition: all 0.3s; cursor: pointer;
}

.btn-block { width: 100%; }
.btn-lg { padding: 14px 24px; font-size: 1rem; }

.btn-buy {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 200, 83, 0.25);
}

.btn-buy:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(0, 200, 83, 0.4); }

.btn-sell {
  background: linear-gradient(135deg, #ff1744, #ff5252);
  color: #fff;
  box-shadow: 0 4px 20px rgba(255, 23, 68, 0.25);
}

.btn-sell:hover { transform: translateY(-2px); box-shadow: 0 6px 28px rgba(255, 23, 68, 0.4); }

.btn-primary {
  background: var(--lava-gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--lava-glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 28px var(--lava-glow-strong); }

/* --- Asset Page --- */
.asset-hero {
  text-align: center;
  padding: 36px 0 28px;
  background: linear-gradient(180deg, rgba(255, 77, 0, 0.06) 0%, transparent 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  position: relative; overflow: hidden;
}

.asset-hero::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%; transform: translateX(-50%);
  width: 250px; height: 250px;
  background: radial-gradient(circle, var(--lava-glow) 0%, transparent 70%);
  opacity: 0.25;
}

.asset-label { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 6px; }

.asset-value {
  font-size: 2.2rem; font-weight: 700; font-family: var(--font-mono);
  background: var(--lava-gradient);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}

.asset-usd { font-size: 0.8rem; color: var(--text-secondary); font-family: var(--font-mono); margin-top: 4px; }

.asset-actions { display: flex; gap: 14px; justify-content: center; margin-top: 20px; }

.asset-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  min-width: 76px; cursor: pointer; transition: all 0.3s;
}

.asset-btn:hover { border-color: var(--lava-1); transform: translateY(-2px); }

.asset-btn-icon {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.asset-btn-icon.green { background: rgba(0, 255, 136, 0.1); color: var(--up); }
.asset-btn-icon.red { background: rgba(255, 51, 102, 0.1); color: var(--down); }
.asset-btn-icon.blue { background: rgba(0, 212, 255, 0.1); color: var(--neon-blue); }

.asset-btn-text { font-size: 0.7rem; color: var(--text-secondary); }

.holding-item {
  display: flex; align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
  margin-bottom: 8px;
  transition: all 0.3s;
}

.holding-item:hover { border-color: rgba(255, 77, 0, 0.15); }

.holding-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-right: 12px;
}

.holding-info { flex: 1; }
.holding-name { font-weight: 600; font-size: 0.8rem; }
.holding-amount { font-size: 0.65rem; color: var(--text-secondary); font-family: var(--font-mono); }

.holding-value { text-align: right; }
.holding-price { font-family: var(--font-mono); font-weight: 600; font-size: 0.85rem; }
.holding-change { font-family: var(--font-mono); font-size: 0.65rem; }
.holding-change.up { color: var(--up); }
.holding-change.down { color: var(--down); }

/* --- Profile --- */
.profile-hero {
  text-align: center;
  padding: 36px 0 28px;
  position: relative;
}

.profile-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--lava-gradient);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
  box-shadow: 0 0 36px var(--lava-glow);
  position: relative;
}

.profile-avatar::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lava-1), var(--neon-blue));
  z-index: -1;
  animation: avatarGlow 3s ease-in-out infinite;
}

@keyframes avatarGlow { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

.profile-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 3px; }
.profile-id { font-size: 0.7rem; color: var(--text-secondary); font-family: var(--font-mono); }

.profile-menu { display: flex; flex-direction: column; gap: 8px; }

.menu-item {
  display: flex; align-items: center;
  padding: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer; transition: all 0.3s;
}

.menu-item:hover { background: var(--bg-card-hover); border-color: rgba(255, 77, 0, 0.12); }

.menu-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; margin-right: 12px;
  background: rgba(255, 77, 0, 0.08);
  color: var(--lava-1);
}

.menu-text { flex: 1; font-size: 0.85rem; }
.menu-arrow { color: var(--text-muted); font-size: 12px; }

/* --- Modal --- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: none; align-items: flex-end; justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal-content {
  width: 100%; max-width: 480px;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--space-lg);
  animation: slideUp 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.modal-handle {
  width: 36px; height: 4px;
  background: var(--text-muted);
  border-radius: 2px;
  margin: 0 auto 16px;
  cursor: pointer;
}

.modal-title {
  font-size: 1.05rem; font-weight: 700;
  text-align: center; margin-bottom: 16px;
}

.login-form { display: flex; flex-direction: column; gap: 12px; }

.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-label { font-size: 0.7rem; color: var(--text-secondary); }

.form-input {
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none; transition: border-color 0.3s;
}

.form-input:focus {
  border-color: var(--lava-1);
  box-shadow: 0 0 0 3px var(--lava-glow);
}

/* --- Toast --- */
.toast {
  position: fixed;
  top: 20px; left: 50%; transform: translateX(-50%);
  padding: 10px 22px;
  background: var(--bg-card);
  border: 1px solid var(--lava-1);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 0.85rem;
  z-index: 9999;
  box-shadow: 0 0 30px var(--lava-glow);
  animation: fadeIn 0.3s ease;
}

/* --- Utils --- */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.mt-md { margin-top: 16px; }
.mb-md { margin-bottom: 16px; }
.text-center { text-align: center; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-muted); border-radius: 2px; }

/* --- Sub Pages --- */
.sub-page { display: none; position: fixed; inset: 0; z-index: 150; background: var(--bg-primary); overflow-y: auto; padding-bottom: 20px; }
.sub-page.active { display: block; animation: slideInRight 0.3s ease; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.sub-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; position: sticky; top: 0; z-index: 10;
  background: var(--bg-primary); border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sub-header span:nth-child(2) { font-weight: 600; font-size: 1rem; }

.back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-primary); font-size: 18px; cursor: pointer; transition: all 0.3s;
}

.back-btn:hover { border-color: var(--lava-1); color: var(--lava-1); }

/* Upload Area */
.upload-area {
  width: 100%; height: 120px;
  background: var(--bg-secondary);
  border: 2px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 0.85rem;
  cursor: pointer; transition: all 0.3s;
}

.upload-area:hover { border-color: var(--lava-1); color: var(--lava-1); }

@media (max-width: 480px) {
  .banner { height: 130px; }
  .asset-value { font-size: 1.8rem; }
  .kline-area { height: 180px; }
}

/* --- Desktop Tab Bar --- */
@media (min-width: 768px) {
  .tabbar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    padding: 6px 0;
    display: flex;
    justify-content: center;
  }

  .tabbar-inner {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 600px;
    width: 100%;
    gap: 0;
  }

  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    min-width: 72px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
  }

  .tab-item:hover {
    color: var(--text-secondary);
  }

  .tab-item.active {
    color: var(--lava-1);
    background: rgba(255, 77, 0, 0.08);
  }

  .tab-item.active .tab-icon {
    filter: drop-shadow(0 0 8px var(--lava-glow-strong));
  }

  .tab-icon {
    font-size: 22px;
    transition: all 0.3s;
  }

  .tab-label {
    font-size: 0.7rem;
    font-weight: 500;
  }

  .tab-center {
    margin-top: 0;
  }

  .tab-center .tab-icon {
    width: 40px;
    height: 40px;
    background: var(--lava-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 0 28px var(--lava-glow-strong);
    transition: all 0.3s;
  }

  .tab-center:hover .tab-icon {
    transform: scale(1.08);
  }
}
