/* ========================================
   FCAT-X - Financial Terminal Professional Style
   Professional Crypto Trading Platform UI
   ======================================== */

/* CSS Variables - Design System */
:root {
  /* Professional Trading Terminal Colors - Refined Depth */
  --bg-primary: #0A0A0A;
  --bg-secondary: #111111;
  --bg-tertiary: #1A1A1A;
  --bg-elevated: #222222;
  --bg-input: rgba(26, 26, 26, 0.95);
  --bg-void: #0A0A0A;
  --bg-surface: #111111;

  /* Status Colors - Softer Professional Palette */
  --accent-buy: #00D68F;
  --accent-sell: #FF4D6D;
  --accent-gold: #FFD600;
  --accent-gold-light: #FFE066;
  --accent-cyan: #38BDF8;
  --primary: #FFD600;
  --primary-bright: #FFE066;
  --primary-light: rgba(255, 214, 0, 0.15);
  --success: #00D68F;
  --danger: #FF4D6D;
  --warning: #FFD600;
  --info: #38BDF8;

  /* Text Colors */
  --text-primary: #FFFFFF;
  --text-secondary: #B0B0B0;
  --text-muted: #666666;
  --fg: #FFFFFF;
  --fg-muted: #B0B0B0;
  --fg-dim: #666666;

  /* Borders & Grid */
  --border: #2A2A2A;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 214, 0, 0.4);
  --grid: #1E1E1E;

  /* Glass Effect */
  --glass-bg: rgba(17, 17, 17, 0.88);
  --glass-blur: 20px;
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Border Radius */
  --radius-card: 20px;
  --radius-btn: 10px;
  --radius-sm: 8px;
  --radius-md: 14px;

  /* Shadows - Deeper, More Premium */
  --shadow-glow: 0 0 24px rgba(255, 214, 0, 0.18);
  --shadow-glow-sm: 0 0 12px rgba(255, 214, 0, 0.12);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-buy-glow: 0 0 16px rgba(0, 214, 143, 0.25);
  --shadow-sell-glow: 0 0 16px rgba(255, 77, 109, 0.25);

  /* Layout */
  --header-height: 52px;
  --account-bar-height: 40px;
  --nav-height: 56px;

  /* Fonts */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing Scale */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* 全局隐藏滚动条 - 兼容Android WebView */
html, body, * {
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE/Edge */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

html, body {
  height: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  background: var(--bg-void);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ========================================
   Utility Classes - Visual Signature System
   ======================================== */

/* Trend Light Band - signature element for key cards */
.card-accent {
  position: relative;
}

.card-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 30%, var(--accent-gold-light) 70%, transparent 100%);
  border-radius: 0 0 2px 2px;
  opacity: 0.8;
  z-index: 1;
}

.card-accent-left {
  position: relative;
}

.card-accent-left::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-gold) 0%, var(--accent-gold-light) 50%, transparent 100%);
  border-radius: 0 2px 2px 0;
  opacity: 0.9;
}

/* Gradient Text */
.text-gradient-gold {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glow Effects */
.glow-gold {
  box-shadow: var(--shadow-glow);
}

.glow-buy {
  box-shadow: var(--shadow-buy-glow);
}

.glow-sell {
  box-shadow: var(--shadow-sell-glow);
}

/* Subtle gradient surfaces */
.surface-gradient {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.surface-gradient-gold {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.1) 0%, rgba(255, 214, 0, 0.02) 100%);
}

/* Refined divider using spacing instead of lines */
.divider-soft {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--border) 20%, var(--border) 80%, transparent 100%);
  margin: var(--space-md) 0;
}

body {
  overflow: hidden;
}

#app {
  height: 100%;
  overflow: hidden;
}

/* Page Transitions */
.page {
  display: none;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
  /* 内容滚动到底部留出 nav-height 空间，避免被底部菜单覆盖造成"菜单消失"错觉 */
  padding-bottom: var(--nav-height);
}

.page::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.page.active {
  display: block;
}

/* ========================================
   Login Page - Professional Terminal Style
   ======================================== */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

/* Subtle Grid Pattern Background */
.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(255, 214, 0, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 214, 0, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Subtle Gradient Overlay */
.login-container::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255, 214, 0, 0.03) 0%, transparent 50%);
  animation: pulse-glow 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.login-box {
  width: 100%;
  max-width: 360px;
  padding: 32px 24px;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-elevated);
  position: relative;
  z-index: 1;
}

.login-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 30%, var(--accent-gold-light) 70%, transparent 100%);
  border-radius: 0 0 2px 2px;
  opacity: 0.8;
}

/* Brand Logo */
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent-gold), #FFC400);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow);
}

.login-title {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

.login-subtitle {
  font-size: 13px;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 28px;
}

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

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.form-group input {
  height: 50px;
  padding: 0 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font-body);
  transition: all 0.2s ease;
}

.form-group input:hover {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(26, 26, 26, 0.98);
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* Password Input with Toggle */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  flex: 1;
  padding-right: 44px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.password-toggle:hover {
  color: var(--text-secondary);
}

.captcha-row {
  display: flex;
  gap: 10px;
}

.captcha-row input {
  flex: 1;
}

.captcha-img {
  width: 100px;
  height: 48px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  object-fit: cover;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.captcha-img:hover {
  border-color: var(--accent-gold);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent-gold);
  cursor: pointer;
}

.login-btn {
  height: 50px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  border: none;
  border-radius: var(--radius-btn);
  color: var(--bg-primary);
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  box-shadow: var(--shadow-glow-sm);
}

.login-btn:hover {
  background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold) 100%);
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.login-btn:active {
  transform: translateY(0) scale(0.98);
}

.login-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.login-footer {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.2px;
}

/* ========================================
   Main Layout - Professional Terminal
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  z-index: 100;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 214, 0, 0.2) 50%, transparent 100%);
}

.header-content {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.header-title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-title .version-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* 行情页面Tab切换 */
.market-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.market-tab {
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.market-tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 50%, transparent 100%);
  border-radius: 1px;
  transition: width 0.25s ease;
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.3);
}

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

.market-tab.active {
  color: var(--accent-gold);
  font-weight: 600;
}

.market-tab.active::after {
  width: 28px;
}

/* Tab分隔线 */
.market-tab:not(:last-child)::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 16px;
  background: var(--border);
  opacity: 0.5;
}

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

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--primary-light);
  border-color: rgba(255, 214, 0, 0.3);
  color: var(--accent-gold);
  box-shadow: var(--shadow-glow-sm);
}

.icon-btn:active {
  transform: scale(0.95);
}

/* Account Bar */
.account-bar {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, rgba(17, 17, 17, 0.98) 100%);
  border-bottom: 1px solid var(--border-light);
  gap: 8px;
  height: var(--account-bar-height);
}
/* 单账号时整体隐藏 account-bar 区域，并消除 main-content 上方 40px 占位 */
body.single-account .account-bar { display: none !important; }
body.single-account .main-content {
  padding-top: calc(var(--header-height) + 12px);
}

.account-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 500;
}

/* Unified Select Styles */
select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23666666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px;
  padding-right: 32px;
}

.account-select {
  flex: 1;
  height: 32px;
  padding: 0 32px 0 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 180px;
}

.account-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.account-select:hover {
  border-color: var(--accent-gold);
}

.account-select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.account-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px;
}

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

.main-content {
  padding: calc(var(--header-height) + var(--account-bar-height) + 12px) 12px calc(var(--nav-height) + 12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-primary);
}

.main-content.simple {
  padding-top: calc(var(--header-height) + 12px);
  padding-bottom: 12px;
}
/* 日历年视图包装：放在 main-content 外，padding 单独设避免重复 header/nav 偏移 */
/* 注意：display 不能加 !important，会盖住内联 style.display='none'（切回月视图时） */
.calendar-year-wrap {
  display: block;
  padding-top: calc(var(--header-height) + 12px);
  padding-bottom: 12px;
}
.calendar-year-wrap .calendar-year-card {
  margin: 0;
}

/* ========================================
   AI Chat Page - Professional Style
   ======================================== */
.ai-entry {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
}

.ai-entry:hover, .ai-entry:active {
  background: rgba(255, 214, 0, 0.05);
  border-color: rgba(255, 214, 0, 0.2);
}

.ai-icon-large {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  border-radius: 12px;
  color: var(--bg-primary);
  margin-right: 14px;
  flex-shrink: 0;
}

.ai-entry-text {
  flex: 1;
}

.ai-entry-text h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ai-entry-text p {
  font-size: 13px;
  color: var(--text-muted);
}

.ai-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* AI Chat Page Layout */
.main-content.ai-chat-page {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  text-align: center;
}

.welcome-icon {
  font-size: 40px;
  margin-bottom: 10px;
}

.welcome-text {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 260px;
}

/* Chat Message Styles */
.chat-message {
  display: flex;
  gap: 8px;
  max-width: 100%;
}

.chat-message.user {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.chat-message.user .message-avatar {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.chat-message.ai .message-avatar {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

.message-content {
  flex: 1;
  max-width: calc(100% - 44px);
}

.message-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
  white-space: pre-wrap;
}

.chat-message.user .message-bubble {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-bottom-right-radius: 4px;
}

.chat-message.ai .message-bubble {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border);
}

/* Typing Indicator */
.message-bubble.typing {
  display: flex;
  gap: 4px;
  padding: 12px 14px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* Chat Input */
.chat-input-area {
  flex-shrink: 0;
  padding: 10px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
}

.chat-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: var(--bg-tertiary);
  border-radius: 16px;
  padding: 6px 10px;
  border: 1px solid var(--border);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  line-height: 1.4;
  resize: none;
  max-height: 80px;
  outline: none;
  font-family: var(--font-body);
}

#chat-input::placeholder {
  color: var(--text-muted);
}

.send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-gold);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-primary);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, opacity 0.15s;
}

.send-btn:active {
  transform: scale(0.92);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-muted);
}

.connection-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}

.connection-dot.connected {
  background: var(--accent-buy);
}

.connection-dot.connecting {
  background: var(--accent-gold);
  animation: pulse 1s infinite;
}

.connection-dot.error {
  background: var(--accent-sell);
}

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

/* ========================================
   Cards - Professional Terminal Style
   ======================================== */
.card {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-card);
  border: 1px solid var(--border-light);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:active {
  transform: translateY(-1px);
  box-shadow: var(--shadow-elevated);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.015);
  flex-shrink: 0;
}

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.card-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-body {
  padding: 12px 16px;
}

.card-body.no-padding {
  padding: 0;
}

/* ========================================
   Account Page - Professional Style
   ======================================== */

/* Account Page Layout - Fixed Header + Scrollable List */
.account-page-content {
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-height) + 8px);
  padding-bottom: calc(var(--nav-height) + 8px);
  height: 100vh;
  box-sizing: border-box;
}

/* Fixed Summary Header */
.account-summary-fixed {
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.account-total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.08) 0%, rgba(255, 214, 0, 0.02) 100%);
}

.account-total-bar .total-label {
  font-size: 12px;
  color: var(--text-muted);
}

.account-total-bar .total-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-gold);
  text-shadow: 0 0 16px rgba(255, 214, 0, 0.2);
}

.account-profit-bar {
  display: flex;
  gap: 0;
}

.account-profit-bar .profit-section-left,
.account-profit-bar .profit-section-right {
  flex: 1;
  padding: 12px 16px;
}

.account-profit-bar .profit-section-left {
  border-right: 1px solid var(--border-light);
}

.account-profit-bar .profit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.account-profit-bar .profit-row:first-child {
  padding-top: 0;
}

.account-profit-bar .profit-row:last-child {
  padding-bottom: 0;
}

.account-profit-bar .profit-label {
  font-size: 11px;
  color: var(--text-muted);
}

.account-profit-bar .profit-num {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.account-profit-bar .profit-num.positive { color: var(--accent-buy); }
.account-profit-bar .profit-num.negative { color: var(--accent-sell); }

/* Scrollable Account List */
.account-list-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.card-full-height {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-full-height .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-full-height .pull-refresh-container {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.card-full-height .funds-list {
  min-height: 100%;
}

/* Account Page Styles */
.funds-list {
  display: flex;
  flex-direction: column;
}

/* Account Item */
.account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
  background: var(--bg-tertiary);
}

.account-item:first-child {
  border-top: 1px solid var(--border);
}

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

.account-item:active {
  background: rgba(255, 214, 0, 0.05);
}

.account-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 80px;
}

.account-avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  border-radius: 6px;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--bg-primary);
}

.account-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.account-positions {
  font-size: 10px;
  color: var(--text-muted);
}

.account-center {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  text-align: right;
}

.account-funds {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.account-trading {
  font-size: 10px;
  color: var(--text-muted);
}

.account-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  min-width: 56px;
}

.account-threshold-label {
  font-size: 9px;
  color: var(--text-muted);
}

.account-threshold-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-gold);
}

.refresh-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.refresh-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.refresh-btn.loading svg {
  animation: spin 0.7s linear infinite;
}

.card-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.text-btn {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.text-btn:hover {
  background: var(--primary-light);
  border-color: rgba(255, 214, 0, 0.4);
  box-shadow: var(--shadow-glow-sm);
}

.text-btn.danger {
  color: var(--accent-sell);
  border-color: rgba(255, 77, 109, 0.3);
}

.text-btn.danger:hover {
  background: rgba(255, 77, 109, 0.1);
  border-color: var(--accent-sell);
  box-shadow: var(--shadow-sell-glow);
}

.text-btn.primary {
  color: var(--accent-gold);
  border-color: rgba(255, 214, 0, 0.3);
  display: flex;
  align-items: center;
}

.text-btn.primary:hover {
  background: rgba(255, 214, 0, 0.1);
  border-color: var(--accent-gold);
}

.text-btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.text-btn.warning {
  color: var(--accent-buy);
  border-color: rgba(0, 214, 143, 0.3);
  display: flex;
  align-items: center;
}

.text-btn.warning:hover {
  background: rgba(0, 214, 143, 0.1);
  border-color: var(--accent-buy);
  box-shadow: var(--shadow-buy-glow);
}

.spinner-sm {
  width: 12px;
  height: 12px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 4px;
}

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

/* ========================================
   Funds Overview - Dashboard Style
   ======================================== */
.overview-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
}

/* Dashboard Summary Card */
.dashboard-summary {
  padding: 18px 16px;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.08), rgba(255, 214, 0, 0.02));
  border-bottom: 1px solid var(--border-light);
}

.dashboard-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.dashboard-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.dashboard-value {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-gold);
  text-shadow: 0 0 18px rgba(255, 214, 0, 0.2);
}

.dashboard-change {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-family: var(--font-mono);
}

.dashboard-change.positive {
  color: var(--accent-buy);
}

.dashboard-change.negative {
  color: var(--accent-sell);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.dashboard-item {
  padding: 12px 14px;
  background: var(--bg-tertiary);
}

.dashboard-item-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.dashboard-item-value {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.dashboard-item-value.positive {
  color: var(--accent-buy);
}

.dashboard-item-value.negative {
  color: var(--accent-sell);
}

/* Quick Stats Row */
.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}

.quick-stat {
  padding: 10px 8px;
  background: var(--bg-tertiary);
  text-align: center;
}

.quick-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.quick-stat-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.quick-stat-value.positive {
  color: var(--accent-buy);
}

.quick-stat-value.negative {
  color: var(--accent-sell);
}

.funds-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.fund-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.fund-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
}

.fund-item.main {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.1), rgba(255, 214, 0, 0.03));
  border: 1px solid rgba(255, 214, 0, 0.2);
}

.fund-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.fund-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.fund-item.main .fund-value {
  font-size: 20px;
  color: var(--accent-gold);
}

/* ========================================
   Strategy Status
   ======================================== */
.strategy-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.strategy-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  padding: 10px 6px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
}

.strategy-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.strategy-label {
  font-size: 11px;
  color: var(--fg-dim);
  font-weight: 500;
}

.strategy-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg);
  word-break: break-all;
}

.status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-btn);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.status-badge.running {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.2);
}

.status-badge.stopped {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ========================================
   Coin List - Professional Terminal
   ======================================== */
.coin-list {
  display: flex;
  flex-direction: column;
}

.coin-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 10px;
}

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

.coin-item:active {
  background: rgba(255, 214, 0, 0.05);
}

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

.coin-rank {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
}

.coin-rank.top1 {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  border: none;
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow-sm);
}

.coin-rank.top2 {
  background: linear-gradient(135deg, #E8E8E8 0%, #BDBDBD 100%);
  border: none;
  color: var(--bg-primary);
}

.coin-rank.top3 {
  background: linear-gradient(135deg, #D4A574 0%, #B87333 100%);
  border: none;
  color: var(--bg-primary);
}

.coin-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coin-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.coin-price {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
}

.coin-price-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.coin-analysis-time {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Price Flash Animation */
.coin-price.flash-up {
  animation: flash-up 0.5s ease;
}

.coin-price.flash-down {
  animation: flash-down 0.5s ease;
}

@keyframes flash-up {
  0%, 100% { background: transparent; }
  50% { background: rgba(0, 214, 143, 0.25); }
}

@keyframes flash-down {
  0%, 100% { background: transparent; }
  50% { background: rgba(255, 77, 109, 0.25); }
}

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

.coin-detail-row {
  display: flex;
  align-items: center;
  font-size: 10px;
  gap: 4px;
}

.coin-detail-label {
  color: var(--text-muted);
}

.coin-detail-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 10px;
}

.coin-detail-value.high {
  color: var(--accent-buy);
}

.coin-detail-value.low {
  color: var(--accent-sell);
}

.coin-change {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  min-width: 56px;
  text-align: center;
  flex-shrink: 0;
}

.coin-change.positive {
  background: rgba(0, 214, 143, 0.12);
  color: var(--accent-buy);
}

.coin-change.negative {
  background: rgba(255, 77, 109, 0.12);
  color: var(--accent-sell);
}

/* ========================================
   Position List - Professional Style
   ======================================== */
.position-list {
  display: flex;
  flex-direction: column;
}

.position-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.position-item:active {
  background: rgba(255, 214, 0, 0.05);
}

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

.position-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.position-coin {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.position-lever {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.1);
  padding: 2px 5px;
  border-radius: 3px;
  border: 1px solid rgba(255, 214, 0, 0.2);
}

.position-account {
  font-size: 11px;
  color: var(--accent-gold);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 6px;
  font-weight: 500;
  border: 1px solid rgba(255, 214, 0, 0.2);
}

.position-side {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.position-side.long {
  background: rgba(0, 214, 143, 0.12);
  color: var(--accent-buy);
}

.position-side.short {
  background: rgba(255, 77, 109, 0.12);
  color: var(--accent-sell);
}

.position-details {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.position-detail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.position-detail-label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.position-detail-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-primary);
}

.position-detail-value.positive {
  color: var(--accent-buy);
}

.position-detail-value.negative {
  color: var(--accent-sell);
}

.position-detail-value.danger {
  color: var(--accent-sell);
  font-weight: 600;
}

/* 持仓项点击效果 */
.position-item {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.position-item:active {
  background-color: rgba(255, 255, 255, 0.05);
}

/* 持仓操作按钮 - 内联展开 */
.position-actions-inline {
  display: none;
  flex-direction: row;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.position-item.expanded .position-actions-inline {
  display: flex;
}

.position-actions-inline .action-btn {
  flex: 1;
  padding: 9px 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-heading);
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.position-actions-inline .action-btn.primary {
  background: linear-gradient(135deg, var(--accent-cyan) 0%, #0EA5E9 100%);
  color: #fff;
}

.position-actions-inline .action-btn.danger {
  background: linear-gradient(135deg, var(--accent-sell) 0%, #E5395F 100%);
  color: #fff;
  box-shadow: var(--shadow-sell-glow);
}

.position-actions-inline .action-btn.success {
  background: linear-gradient(135deg, var(--accent-buy) 0%, #00B87A 100%);
  color: #fff;
  box-shadow: var(--shadow-buy-glow);
}

.position-actions-inline .action-btn.tp-btn {
  background: linear-gradient(135deg, #ff9800, #f57c00);
  color: #fff;
}

.position-actions-inline .action-btn.sl-btn {
  background: linear-gradient(135deg, #9c27b0, #7b1fa2);
  color: #fff;
}

.position-actions-inline .action-btn:active {
  transform: scale(0.98);
  opacity: 0.9;
}

.empty-state {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.empty-state::before {
  content: '—';
  display: block;
  font-size: 24px;
  color: var(--border);
  line-height: 1;
}

/* ========================================
   Order List
   ======================================== */
.order-list {
  display: flex;
  flex-direction: column;
}

.order-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

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

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

.order-type {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: var(--info);
}

.order-type.tp {
  background: rgba(0, 214, 143, 0.12);
  color: var(--accent-buy);
}

.order-type.sl {
  background: rgba(255, 77, 109, 0.12);
  color: var(--accent-sell);
}

.order-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px 10px;
}

.order-detail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
}

.order-detail-label {
  color: var(--text-muted);
  flex-shrink: 0;
  font-size: 10px;
}

.order-detail-value {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.order-cancel-btn {
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
  cursor: pointer;
  transition: all 0.2s ease;
}

.order-cancel-btn:hover {
  background: rgba(255, 77, 109, 0.25);
}

.order-cancel-btn:active {
  transform: scale(0.96);
}

/* ========================================
   Left Drawer Navigation - Mobile Side Menu
   ======================================== */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  /* 不要覆盖底部菜单：高度减去 nav-height，bottom-nav 始终可见 + 可点 */
  bottom: var(--nav-height);
  background: rgba(0,0,0,0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.left-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  /* 同样 bottom 留出 nav-height：抽屉内部滚动不延伸到底部菜单下方 */
  bottom: var(--nav-height);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  z-index: 1000;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0,0,0,0.4);
  overflow-y: auto;
  border-right: 1px solid var(--border-light);
}
.left-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drawer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.drawer-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font-heading);
  box-shadow: var(--shadow-glow-sm);
}
.drawer-logo-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}
.drawer-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.2s;
}
.drawer-close:hover {
  background: rgba(255,255,255,0.12);
  color: #e2e8f0;
}

.drawer-nav {
  padding: 12px 0;
  flex: 1;
}
.drawer-section {
  padding: 8px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  margin: 2px 8px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.drawer-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.drawer-item:hover {
  background: rgba(167, 139, 250, 0.1);
  color: #c4b5fd;
}
.drawer-item.active {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
  font-weight: 600;
}

/* Hamburger menu button */
.hamburger-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255,255,255,0.06);
  color: #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  background: rgba(255,255,255,0.12);
}
.hamburger-btn svg {
  width: 20px;
  height: 20px;
}

/* Hide top tabs on mobile (now in drawer), show hamburger */
.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
/* Header tabs are always hidden - navigation is via left drawer */
.home-tabs, .review-tabs {
  display: none !important;
}

/* ========================================
   Bottom Navigation - Professional Style
   ======================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* 永远在抽屉 overlay(999)/left-drawer(1000) 之上：抽屉打开时底部菜单仍可见可点 */
  z-index: 1100;
  padding-bottom: env(safe-area-inset-bottom);
}

.bottom-nav::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 214, 0, 0.15) 50%, transparent 100%);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 14px;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.25s ease;
  border-radius: 12px;
  position: relative;
}

.nav-item svg {
  transition: all 0.25s ease;
}

.nav-item span {
  font-size: 10px;
  font-weight: 500;
  transition: all 0.25s ease;
}

.nav-item.active {
  color: var(--accent-gold);
  transform: translateY(-2px);
}

.nav-item.active svg {
  filter: drop-shadow(0 0 6px rgba(255, 214, 0, 0.5));
}

.nav-item.active span {
  font-weight: 600;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 50%, transparent 100%);
  border-radius: 1px;
}

.nav-item:active {
  background: rgba(255, 214, 0, 0.08);
}

/* ========================================
   Modals - Professional Style
   ======================================== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0) 16px;
}

.modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 480px;
  max-height: min(85vh, 640px);
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-radius: 24px;
  border: 1px solid var(--border-light);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.25s ease-out;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
}

.modal-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 24px;
  right: 24px;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-gold) 30%, var(--accent-gold-light) 70%, transparent 100%);
  border-radius: 0 0 2px 2px;
  opacity: 0.7;
  z-index: 1;
}

.modal-large {
  max-height: min(90vh, 720px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.015);
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.close-btn, .modal-close, .trade-modal-close, .modal-close-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.close-btn:hover, .modal-close:hover, .trade-modal-close:hover, .modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  opacity: 1;
}

.close-btn:active, .modal-close:active, .trade-modal-close:active, .modal-close-btn:active {
  transform: scale(0.95);
}

.modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.modal-footer {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: rgba(255, 255, 255, 0.01);
  flex-shrink: 0;
}

.action-btn {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-btn.success {
  background: linear-gradient(135deg, var(--accent-buy) 0%, #00B87A 100%);
  color: #fff;
  box-shadow: var(--shadow-buy-glow);
}

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

.action-btn.warning {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow-sm);
}

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

.action-btn.danger {
  background: linear-gradient(135deg, var(--accent-sell) 0%, #E5395F 100%);
  color: #fff;
  box-shadow: var(--shadow-sell-glow);
}

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

/* Confirm Modal */
.confirm-modal {
  align-items: center;
}

/* 确认弹窗需要更高的z-index，以便在其他modal之上显示 */
#confirm-modal {
  z-index: 1201;
}

.confirm-modal .modal-content {
  max-width: 340px;
  border-radius: 24px;
  border: 1px solid var(--border-light);
  max-height: none;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: modal-enter 0.2s ease-out;
}

.confirm-body {
  padding: 28px 24px;
  text-align: center;
}

.confirm-body p {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  border-top: 1px solid var(--border-light);
}

.confirm-btn {
  flex: 1;
  height: 50px;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.15s ease;
}

.confirm-btn.cancel {
  color: var(--text-muted);
  border-right: 1px solid var(--border-light);
}

.confirm-btn.cancel:active {
  background: rgba(255, 255, 255, 0.05);
}

.confirm-btn.confirm {
  color: var(--accent-gold);
}

.confirm-btn.confirm:active {
  background: var(--primary-light);
}

/* ========================================
   Trade Modal - Professional Style
   ======================================== */
.trade-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trade-coin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.trade-coin-name {
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.trade-price {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent-gold);
  font-weight: 600;
}

.trade-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 56px;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.trade-btn.buy {
  background: var(--accent-buy);
  color: #fff;
}

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

.trade-btn.sell {
  background: var(--accent-sell);
  color: #fff;
}

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

.trade-btn-label {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
}

.trade-btn-desc {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 2px;
}

/* ========================================
   Toast - Professional Style
   ======================================== */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-16px);
  padding: 12px 22px;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  box-shadow: var(--shadow-elevated);
}

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

.toast.success {
  border-color: rgba(0, 214, 143, 0.4);
  color: var(--accent-buy);
  box-shadow: var(--shadow-buy-glow);
}

.toast.error {
  border-color: rgba(255, 77, 109, 0.4);
  color: var(--accent-sell);
  box-shadow: var(--shadow-sell-glow);
}

/* ========================================
   Loading State
   ======================================== */
.loading-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  color: var(--text-muted);
  font-size: 13px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  box-shadow: 0 0 8px rgba(255, 214, 0, 0.15);
}

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

/* Pull Refresh */
.pull-refresh-container {
  position: relative;
  overflow-y: auto;
  max-height: calc(100vh - 260px);
}

#market-refresh {
  max-height: calc(100vh - 180px);
}

.pull-refresh-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-40px);
  transition: transform 0.2s ease;
}

.pull-refresh-indicator::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-gold);
  border-top-color: transparent;
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.pull-refresh-indicator.refreshing::before {
  opacity: 1;
  animation: spin 0.7s linear infinite;
}

/* ========================================
   Trade Parameters Page
   ======================================== */
.params-content {
  padding-top: calc(var(--header-height) + 8px);
}

.params-list {
  display: flex;
  flex-direction: column;
}

.params-table {
  width: 100%;
  font-size: 11px;
}

.params-table-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 60px;
  background: rgba(255, 214, 0, 0.05);
  padding: 10px 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}

.params-th {
  text-align: center;
  font-size: 11px;
}

.params-table-body {
  display: flex;
  flex-direction: column;
}

.params-tr {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 60px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.params-tr:last-child {
  border-bottom: none;
}

.params-tr:active {
  background: rgba(255, 214, 0, 0.05);
}

.params-td {
  text-align: center;
  color: var(--text-secondary);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.params-td:first-child {
  color: var(--text-primary);
  font-weight: 600;
  font-family: var(--font-heading);
}

.edit-btn {
  padding: 5px 10px;
  background: var(--primary-light);
  border: 1px solid rgba(255, 214, 0, 0.3);
  border-radius: 6px;
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.edit-btn:active {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

/* Param Edit Form */
.param-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.param-form .form-group select {
  height: 48px;
  padding: 0 40px 0 14px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  width: 100%;
  cursor: pointer;
  transition: all 0.15s ease;
}

.param-form .form-group select:hover {
  border-color: var(--accent-gold);
}

.param-form .form-group select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.param-form .form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 10px;
}

.param-form .form-group input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* T37: 探仓参数 - 区块分隔符 + 2列参数网格 */
.form-section-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 -2px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-light, rgba(255, 255, 255, 0.1));
}
.form-section-divider span {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold, #d4a544);
  letter-spacing: 0.3px;
}

.param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.param-grid .form-group {
  margin: 0;
}
.param-grid .form-group label {
  font-size: 11px;
}
.param-grid .form-group input {
  height: 44px;
  font-size: 14px;
  padding: 0 12px;
}
.param-grid-full {
  grid-column: 1 / -1;
}

@media (max-width: 380px) {
  /* 小屏(老 iPhone)单列避免挤压 */
  .param-grid {
    grid-template-columns: 1fr;
  }
  .param-grid-full {
    grid-column: 1;
  }
}

/* Modal Footer Buttons */
.modal-footer .cancel-btn {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.modal-footer .confirm-btn {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.modal-footer .action-btn {
  flex: 1;
  height: 44px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all 0.15s ease;
}

/* ========================================
   Funds Summary
   ======================================== */
.funds-summary {
  padding: 14px;
  background: rgba(255, 214, 0, 0.05);
  border-bottom: 1px solid var(--border);
}

.funds-summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.funds-summary-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.funds-summary-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
}

.profit-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-bottom: 1px solid var(--border);
}

.profit-section {
  padding: 12px 14px;
}

.profit-section:first-child {
  border-right: 1px solid var(--border);
}

.profit-title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.profit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}

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

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

.profit-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
}

.profit-value.positive {
  color: var(--accent-buy);
}

.profit-value.negative {
  color: var(--accent-sell);
}

.funds-items {
  padding: 0;
}

.funds-item-row {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s ease;
}

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

.funds-item-row:active {
  background: rgba(255, 214, 0, 0.05);
}

.funds-item-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.funds-item-values {
  display: flex;
  gap: 14px;
}

.funds-item-value {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.funds-item-value .label {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.funds-item-value .value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.funds-item-value.clickable {
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.funds-item-value.clickable:active {
  background: rgba(255, 214, 0, 0.08);
}

.funds-item-value .value.highlight {
  color: var(--accent-gold);
}

/* ========================================
   APK Download
   ======================================== */
.download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  background: var(--accent-gold);
  border: none;
  border-radius: var(--radius-btn);
  color: var(--bg-primary);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-heading);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

/* Version Info */
.version-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.version-current, .version-new {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

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

.version-value {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.version-value.new {
  color: var(--accent-gold);
}

.update-available {
  margin-bottom: 12px;
  padding: 12px;
  background: rgba(255, 214, 0, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 214, 0, 0.2);
}

.update-log {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  white-space: pre-line;
  line-height: 1.6;
}

.no-update-tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: rgba(0, 214, 143, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
  font-size: 13px;
  font-weight: 500;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 360px) {
  .login-box {
    padding: 24px 18px;
  }

  .login-title {
    font-size: 24px;
  }

  .funds-grid {
    grid-template-columns: 1fr;
  }

  .fund-item.main {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
  }

  .strategy-info {
    grid-template-columns: 1fr;
  }
}

/* Safe Area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav {
    padding-bottom: calc(6px + env(safe-area-inset-bottom));
  }

  .main-content {
    padding-bottom: calc(var(--nav-height) + 8px + env(safe-area-inset-bottom));
  }
}

/* Coin Selector - 币种选择器 */
.coin-selector {
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 8px 0;
}

.coin-selector-scroll {
  display: flex;
  gap: 8px;
  padding: 0 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.coin-selector-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.spinner-small {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.coin-chip {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 72px;
}

.coin-chip:active {
  transform: scale(0.95);
}

.coin-chip.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
}

.coin-chip.active .coin-chip-name,
.coin-chip.active .coin-chip-change {
  color: var(--bg-primary);
}

.coin-chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.coin-chip-change {
  font-size: 11px;
  font-weight: 500;
}

.coin-chip-change.up {
  color: var(--accent-buy);
}

.coin-chip-change.down {
  color: var(--accent-sell);
}

.coin-chip.active .coin-chip-change.up,
.coin-chip.active .coin-chip-change.down {
  color: var(--bg-primary);
}

/* Quick Questions */
.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  justify-content: center;
}

.quick-tag {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-tag:active {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
}

/* Markdown in chat */
.message-bubble details {
  margin: 8px 0;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
}

.message-bubble summary {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--accent-gold);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.message-bubble summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform 0.2s;
}

.message-bubble details[open] summary::before {
  transform: rotate(90deg);
}

.message-bubble details > *:not(summary) {
  padding: 0 12px 12px 12px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.message-bubble h1,
.message-bubble h2,
.message-bubble h3 {
  margin: 8px 0 4px 0;
  font-size: 14px;
  color: var(--text-primary);
}

.message-bubble p {
  margin: 4px 0;
}

.message-bubble ul,
.message-bubble ol {
  margin: 4px 0;
  padding-left: 16px;
}

.message-bubble code {
  background: var(--bg-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.message-bubble pre {
  background: var(--bg-secondary);
  padding: 8px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 11px;
}

.message-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 11px;
}

.message-bubble th,
.message-bubble td {
  border: 1px solid var(--border);
  padding: 4px 8px;
  text-align: left;
}

.message-bubble th {
  background: var(--bg-secondary);
}

/* AI Analysis Page */
.ai-page-content {
  padding: 10px;
  padding-bottom: calc(var(--nav-height) + 20px);
}

.ai-coin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-coin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-coin-item:active {
  transform: scale(0.98);
}

.ai-coin-item.active {
  border-color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.08);
}

.ai-coin-item.analyzed {
  border-color: var(--accent-buy);
  background: rgba(0, 214, 143, 0.05);
}

.ai-coin-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.ai-coin-item:nth-child(1) .ai-coin-rank {
  background: linear-gradient(135deg, #ffd700, #ffb347);
  color: #000;
}

.ai-coin-item:nth-child(2) .ai-coin-rank {
  background: linear-gradient(135deg, #c0c0c0, #a8a8a8);
  color: #000;
}

.ai-coin-item:nth-child(3) .ai-coin-rank {
  background: linear-gradient(135deg, #cd7f32, #b87333);
  color: #fff;
}

.ai-coin-info {
  flex: 1;
}

.ai-coin-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.ai-coin-change {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.ai-coin-change.up {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-buy);
}

.ai-coin-change.down {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-sell);
}

.ai-coin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.ai-coin-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
}

.ai-coin-badge.strong-buy {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.ai-coin-badge.buy {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
}

.ai-coin-badge.hold {
  background: rgba(107, 114, 128, 0.15);
  color: #6b7280;
}

.ai-coin-badge.sell {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.ai-coin-badge.strong-sell {
  background: rgba(20, 184, 166, 0.15);
  color: #14b8a6;
}

/* Analysis Result Card */
.analysis-result-card {
  margin-top: 12px;
}

.signal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  color: #fff;
}

.signal-banner.strong-buy {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.signal-banner.buy {
  background: linear-gradient(135deg, #f97316, #ea580c);
}

.signal-banner.hold {
  background: linear-gradient(135deg, #6b7280, #4b5563);
}

.signal-banner.sell {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.signal-banner.strong-sell {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.signal-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signal-icon {
  font-size: 32px;
}

.signal-text {
  font-size: 22px;
  font-weight: 700;
}

.signal-right {
  text-align: center;
}

.confidence-value {
  font-size: 28px;
  font-weight: 700;
}

.confidence-label {
  font-size: 12px;
  opacity: 0.9;
}

/* Reasoning Section */
.reasoning-section {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Trade Advice Section */
.trade-advice {
  margin-top: 12px;
}

.trade-advice-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trade-advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.trade-advice-item {
  background: var(--bg-tertiary);
  border-radius: 10px;
  padding: 10px;
  text-align: center;
}

.trade-advice-item.entry {
  border: 1px solid var(--accent-gold);
}

.trade-advice-item.profit {
  border: 1px solid var(--accent-buy);
}

.trade-advice-item.loss {
  border: 1px solid var(--accent-sell);
}

.trade-advice-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.trade-advice-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.trade-advice-value.profit {
  color: var(--accent-buy);
}

.trade-advice-value.loss {
  color: var(--accent-sell);
}

/* Analysis Process */
.analysis-process {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 10px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.analysis-process h1,
.analysis-process h2,
.analysis-process h3 {
  color: var(--text-primary);
  margin: 8px 0;
}

.analysis-process table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}

.analysis-process th,
.analysis-process td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  font-size: 11px;
}

.analysis-process th {
  background: var(--bg-secondary);
}

.coin-signal {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

.coin-signal.signal-buy {
  background: rgba(38, 166, 154, 0.15);
  color: #26a69a;
}

.coin-signal.signal-sell {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
}

.coin-signal.signal-neutral {
  background: rgba(158, 158, 158, 0.15);
  color: #9e9e9e;
}

/* Coin Name Row with AI Tag */
.coin-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* AI Signal Tag */
.ai-tag {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.ai-tag.strong-buy {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(38, 166, 154, 0.3);
}

.ai-tag.buy {
  background: rgba(38, 166, 154, 0.15);
  color: #26a69a;
  border: 1px solid rgba(38, 166, 154, 0.3);
}

.ai-tag.strong-sell {
  background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
  color: #fff;
  box-shadow: 0 1px 3px rgba(239, 83, 80, 0.3);
}

.ai-tag.sell {
  background: rgba(239, 83, 80, 0.15);
  color: #ef5350;
  border: 1px solid rgba(239, 83, 80, 0.3);
}

.ai-tag.neutral {
  background: rgba(158, 158, 158, 0.15);
  color: #9e9e9e;
  border: 1px solid rgba(158, 158, 158, 0.3);
}

/* RSI 标签样式 */
.coin-rsi {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 214, 0, 0.3);
  white-space: nowrap;
  margin-left: 4px;
}

.coin-rsi.oversold {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(38, 166, 154, 0.3);
}

.coin-rsi.overbought {
  background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(239, 83, 80, 0.3);
}

.coin-rsi.muted {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ADX 标签样式 */
.coin-adx {
  font-size: 9px;
  font-weight: 600;
  padding: 2px 5px;
  border-radius: 3px;
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.3);
  white-space: nowrap;
  margin-left: 4px;
}

.coin-adx.weak {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(74, 222, 128, 0.3);
}

.coin-adx.forming {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(251, 191, 36, 0.3);
}

.coin-adx.strong {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(251, 146, 60, 0.3);
}

.coin-adx.muted {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ========================================
   AI Analysis Detail Modal
   ======================================== */

.ai-detail-content {
  max-height: min(85vh, 640px);
  background: var(--bg-secondary);
  border-radius: 20px;
  animation: modal-enter 0.25s ease-out;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.ai-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.ai-detail-title-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.ai-detail-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.ai-detail-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

.ai-detail-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-detail-reanalyze-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: rgba(255, 214, 0, 0.1);
  border: 1px solid rgba(255, 214, 0, 0.3);
  border-radius: 6px;
  color: var(--accent-gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-detail-reanalyze-btn:hover {
  background: rgba(255, 214, 0, 0.2);
  border-color: var(--accent-gold);
}

.ai-detail-reanalyze-btn:active {
  transform: scale(0.96);
}

.ai-detail-reanalyze-btn.loading {
  opacity: 0.6;
  pointer-events: none;
}

.ai-detail-reanalyze-btn.loading svg {
  animation: spin 1s linear infinite;
}

.ai-detail-close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.2s;
}

.ai-detail-close:active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.ai-detail-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
}

/* AI Signal Card */
.ai-signal-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-elevated) 100%);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.ai-signal-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-gold);
  color: var(--bg-primary);
  flex-shrink: 0;
}

.ai-signal-icon.strong-buy,
.ai-signal-icon.buy {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  color: #fff;
}

.ai-signal-icon.strong-sell,
.ai-signal-icon.sell {
  background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
  color: #fff;
}

.ai-signal-icon.neutral {
  background: linear-gradient(135deg, #757575 0%, #424242 100%);
  color: #fff;
}

.ai-signal-info,
.ai-confidence-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-signal-label,
.ai-confidence-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-signal-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-heading);
}

.ai-signal-value.strong-buy { color: #26a69a; }
.ai-signal-value.buy { color: #4db6ac; }
.ai-signal-value.strong-sell { color: #ef5350; }
.ai-signal-value.sell { color: #e57373; }
.ai-signal-value.neutral { color: #9e9e9e; }

.ai-confidence-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

/* AI Action Buttons */
.ai-action-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.ai-action-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ai-action-btn.buy {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  color: #fff;
}

.ai-action-btn.buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(38, 166, 154, 0.4);
}

.ai-action-btn.sell {
  background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
  color: #fff;
}

.ai-action-btn.sell:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 83, 80, 0.4);
}

/* AI Section */
.ai-section {
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.ai-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-elevated);
  cursor: default;
}

.ai-section-header svg {
  flex-shrink: 0;
}

.ai-section-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-section-content {
  padding: 14px 16px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

#ai-reasoning-content {
  background: rgba(255, 214, 0, 0.05);
  border-left: 3px solid var(--accent-gold);
}

/* AI Trade Grid */
.ai-trade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 1px;
  overflow: hidden;
}

.ai-trade-item {
  padding: 12px;
  background: var(--bg-secondary);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ai-trade-item.profit {
  background: rgba(38, 166, 154, 0.08);
}

.ai-trade-item.loss {
  background: rgba(239, 83, 80, 0.08);
}

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

.ai-trade-value {
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.ai-trade-value-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.ai-trade-percent {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 4px;
  border-radius: 3px;
}

.ai-trade-percent.profit {
  color: #26a69a;
  background: rgba(38, 166, 154, 0.15);
}

.ai-trade-percent.loss {
  color: #ef5350;
  background: rgba(239, 83, 80, 0.15);
}

.ai-trade-item.profit .ai-trade-value {
  color: #26a69a;
}

.ai-trade-item.loss .ai-trade-value {
  color: #ef5350;
}

/* AI Trade Row - 止盈止损两列布局 */
.ai-trade-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
  margin: 1px;
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.ai-trade-column {
  padding: 0;
}

.ai-trade-column-title {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.ai-trade-column.profit .ai-trade-column-title {
  color: #26a69a;
  background: rgba(38, 166, 154, 0.1);
}

.ai-trade-column.loss .ai-trade-column-title {
  color: #ef5350;
  background: rgba(239, 83, 80, 0.1);
}

.ai-trade-column-items {
  display: flex;
  flex-direction: column;
}

.ai-trade-column-items .ai-trade-item {
  border-bottom: 1px solid var(--border);
}

.ai-trade-column-items .ai-trade-item:last-child {
  border-bottom: none;
}

.ai-trade-column.profit .ai-trade-item {
  background: rgba(38, 166, 154, 0.05);
}

.ai-trade-column.loss .ai-trade-item {
  background: rgba(239, 83, 80, 0.05);
}

/* AI Collapsible */
.ai-collapsible .ai-section-header {
  cursor: pointer;
}

.ai-collapse-icon {
  transition: transform 0.3s;
}

.ai-collapsible.expanded .ai-collapse-icon {
  transform: rotate(180deg);
}

.ai-process-content {
  display: none;
  padding: 14px 16px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg-secondary);
}

.ai-collapsible.expanded .ai-process-content {
  display: block;
}

/* AI Meta */
.ai-meta {
  display: flex;
  gap: 24px;
  padding: 12px 0;
  margin-bottom: 16px;
  border-top: 1px solid var(--border);
}

.ai-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ai-meta-label {
  font-size: 11px;
  color: var(--text-muted);
}

.ai-meta-value {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

/* AI Risk Warning */
.ai-risk-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px;
  background: rgba(239, 83, 80, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239, 83, 80, 0.2);
  font-size: 11px;
  color: #ef5350;
  line-height: 1.5;
}

.ai-risk-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* AI Loading & No Data */
.ai-loading,
.ai-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
  color: var(--text-muted);
}

.ai-loading .spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

.ai-no-data p {
  font-size: 14px;
}

.ai-reanalyze-btn {
  margin-top: 8px;
  padding: 10px 24px;
  background: var(--accent-gold);
  color: var(--bg-primary);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

/* ========================================
   问币助手页面样式
   ======================================== */

.ai-chat-page {
  display: flex;
  flex-direction: column;
  padding: 0 !important;
  height: calc(105vh - var(--header-height) - var(--nav-height));
  background: var(--bg-primary);
  overflow: hidden;
}

/* AI页面头部样式 */
.ai-header {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f23 100%);
}

.ai-header .header-content {
  justify-content: center;
}

.ai-header .header-title {
  font-size: 20px;
  font-weight: 700;
}

.ai-title-icon {
  font-size: 24px;
  margin-right: 4px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* 币种选择栏 */
.ai-coin-bar {
  background: linear-gradient(180deg, rgba(26, 26, 46, 0.8) 0%, rgba(13, 13, 13, 0.95) 100%);
  padding: 55px 0 10px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
  overflow: visible;
}

.ai-coin-bar-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ai-coin-bar-header .fire-icon {
  font-size: 16px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.ai-coin-scroll {
  display: flex;
  gap: 10px;
  padding: 10px 12px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  overflow-y: visible;
}

.ai-coin-scroll::-webkit-scrollbar {
  display: none;
}

.ai-coin-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 85px;
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ai-coin-chip:hover {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 215, 0, 0.15);
}

.ai-coin-chip.active {
  background: linear-gradient(135deg, #FFD600 0%, #FFA000 100%);
  border-color: #FFD600;
  box-shadow: 0 4px 16px rgba(255, 214, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.ai-coin-chip.active .coin-chip-name {
  color: #1a1a2e;
  font-weight: 700;
}

.ai-coin-chip.active .coin-chip-change {
  color: rgba(26, 26, 46, 0.85);
}

.ai-coin-chip .coin-chip-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  font-family: var(--font-heading);
}

.ai-coin-chip .coin-chip-change {
  font-size: 12px;
  font-weight: 600;
  margin-top: 4px;
  font-family: var(--font-mono);
}

.ai-coin-chip .coin-chip-change.up {
  color: #ef5350;
}

.ai-coin-chip .coin-chip-change.down {
  color: #26a69a;
}

.ai-coin-chip.active .coin-chip-change.up {
  color: #c62828;
}

.ai-coin-chip.active .coin-chip-change.down {
  color: #00897b;
}

.ai-coin-chip .coin-chip-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  letter-spacing: 0.3px;
}

.ai-coin-chip .coin-chip-badge.buy {
  background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
}

.ai-coin-chip .coin-chip-badge.sell {
  background: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
}

.ai-coin-chip .coin-chip-badge.hold {
  background: linear-gradient(135deg, #78909c 0%, #546e7a 100%);
}

.ai-coin-chip .coin-chip-rsi {
  font-size: 10px;
  font-weight: 600;
  color: #f59e0b;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.ai-coin-chip .coin-chip-rsi.oversold {
  color: #22c55e;
}

.ai-coin-chip .coin-chip-rsi.overbought {
  color: #ef4444;
}

.ai-coin-chip.active .coin-chip-rsi {
  color: rgba(26, 26, 46, 0.85);
}

.ai-coin-chip .coin-chip-adx {
  font-size: 10px;
  font-weight: 600;
  color: #a78bfa;
  margin-top: 2px;
  font-family: var(--font-mono);
}

.ai-coin-chip .coin-chip-adx.weak {
  color: #6b7280;
}

.ai-coin-chip .coin-chip-adx.forming {
  color: #f59e0b;
}

.ai-coin-chip .coin-chip-adx.strong {
  color: #a78bfa;
}

.ai-coin-chip.active .coin-chip-adx {
  color: rgba(26, 26, 46, 0.85);
}

/* 聊天主区域 */
.ai-chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 消息列表 */
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
}

.ai-chat-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.ai-chat-empty .empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.9;
}

.ai-chat-empty h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.ai-chat-empty p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 0;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.quick-tag {
  padding: 8px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-tag:active {
  background: var(--accent-gold);
  color: var(--bg-primary);
  border-color: var(--accent-gold);
}

/* 消息样式 */
.ai-message {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  max-width: 100%;
  animation: fadeIn 0.3s ease;
}

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

.ai-message.user {
  flex-direction: row-reverse;
}

.ai-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-tertiary) 100%);
  border: 1px solid var(--border);
}

.ai-message.user .ai-message-avatar {
  background: linear-gradient(135deg, #FFD600 0%, #FFA000 100%);
  border-color: #FFD600;
}

.ai-message-content {
  max-width: 85%;
}

.ai-message-text {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.65;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-tertiary) 100%);
  color: var(--text-primary);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ai-message.user .ai-message-text {
  background: linear-gradient(135deg, #FFD600 0%, #FFA000 100%);
  color: #1a1a2e;
  border-color: transparent;
  box-shadow: 0 2px 12px rgba(255, 214, 0, 0.25);
}

.ai-message-time {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 6px;
  padding: 0 4px;
}

.ai-message.user .ai-message-time {
  text-align: right;
}

/* AI消息Markdown样式 */
.ai-message-text h1,
.ai-message-text h2,
.ai-message-text h3 {
  margin: 8px 0;
  color: inherit;
}

.ai-message-text p {
  margin: 6px 0;
}

.ai-message-text ul,
.ai-message-text ol {
  margin: 6px 0;
  padding-left: 18px;
}

.ai-message-text code {
  background: rgba(0,0,0,0.1);
  padding: 2px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.ai-message.user .ai-message-text code {
  background: rgba(0,0,0,0.15);
}

.ai-message-text pre {
  background: rgba(0,0,0,0.1);
  padding: 10px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
}

.ai-message-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}

.ai-message-text th,
.ai-message-text td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  font-size: 12px;
}

.ai-message-text th {
  background: rgba(0,0,0,0.05);
}

/* Details/Summary 折叠样式 */
.ai-message-text .md-details {
  margin: 10px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
}

.ai-message-text .md-summary {
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  color: var(--accent-gold);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.2s;
}

.ai-message-text .md-summary::-webkit-details-marker {
  display: none;
}

.ai-message-text .md-summary::before {
  content: '▶';
  font-size: 10px;
  transition: transform 0.2s;
}

.ai-message-text .md-details[open] .md-summary::before {
  transform: rotate(90deg);
}

.ai-message-text .md-summary:hover {
  background: rgba(255,255,255,0.05);
}

.ai-message-text .md-details-content {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 用户消息中的details样式调整 */
.ai-message.user .ai-message-text .md-details {
  border-color: rgba(0,0,0,0.15);
  background: rgba(0,0,0,0.05);
}

.ai-message.user .ai-message-text .md-summary {
  color: #1a1a2e;
}

.ai-message.user .ai-message-text .md-summary:hover {
  background: rgba(0,0,0,0.05);
}

.ai-message.user .ai-message-text .md-details-content {
  border-top-color: rgba(0,0,0,0.1);
  color: rgba(26,26,46,0.8);
}

/* 输入中动画 */
.ai-typing {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.ai-typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-radius: 14px;
  border: 1px solid var(--border);
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  background: var(--text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.ai-typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-6px);
    opacity: 1;
  }
}

/* 输入区域 */
.ai-input-area {
  padding: 12px 14px 14px;
  background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-input-area textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
}

.ai-input-area textarea::placeholder {
  color: var(--text-muted);
}

.ai-input-area textarea:focus {
  border-color: var(--accent-gold);
}

.ai-input-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.ai-clear-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ai-clear-btn:active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.ai-send-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  background: var(--accent-gold);
  border: none;
  border-radius: 20px;
  color: var(--bg-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

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

.ai-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 快捷提问按钮组 */
.ai-quick-prompts {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding-bottom: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.ai-quick-prompts::-webkit-scrollbar {
  display: none;
}

.ai-quick-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ai-quick-btn .quick-icon {
  font-size: 14px;
}

.ai-quick-btn:active {
  transform: scale(0.96);
}

.ai-quick-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

/* 多单按钮 - 绿色 */
.ai-quick-btn.green {
  background: rgba(0, 214, 143, 0.1);
  border-color: rgba(0, 214, 143, 0.3);
  color: #00D68F;
}

.ai-quick-btn.green:hover {
  background: rgba(0, 214, 143, 0.2);
  border-color: #00D68F;
}

/* 空单按钮 - 红色 */
.ai-quick-btn.red {
  background: rgba(255, 77, 109, 0.1);
  border-color: rgba(255, 77, 109, 0.3);
  color: #FF4D6D;
}

.ai-quick-btn.red:hover {
  background: rgba(255, 77, 109, 0.2);
  border-color: #FF4D6D;
}

/* 输入行布局 */
.ai-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.ai-input-row textarea {
  flex: 1;
  min-height: 40px;
  max-height: 100px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 1.4;
}

.ai-input-row textarea::placeholder {
  color: var(--text-muted);
}

.ai-input-row textarea:focus {
  border-color: var(--accent-gold);
}

.ai-input-row .ai-send-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-input-row .ai-clear-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ========================================
   Leverage Modal
   ======================================== */
#leverage-modal .modal-content,
.leverage-modal {
  /* inherits .modal-content max-width: 480px, centered */
}

#leverage-modal .modal-header,
.leverage-modal .modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

#leverage-modal .modal-header h3,
.leverage-modal .modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

#leverage-modal .modal-body,
.leverage-modal .modal-body {
  padding: 20px;
}

.leverage-account-group {
  margin-bottom: 16px;
}

.leverage-account-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.leverage-account-group select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  outline: none;
}

.leverage-account-group select:focus {
  border-color: var(--accent-gold);
}

.leverage-modal .modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.leverage-modal .btn-cancel {
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
}

.leverage-modal .btn-confirm {
  padding: 10px 16px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.leverage-modal .btn-confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

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

.leverage-label {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.leverage-options {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.leverage-option {
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.leverage-option:hover {
  border-color: var(--accent-gold);
}

.leverage-option.active {
  background: var(--primary-light);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.leverage-custom {
  display: flex;
  justify-content: center;
}

.leverage-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  text-align: center;
  outline: none;
}

.leverage-input:focus {
  border-color: var(--accent-gold);
}

.leverage-note {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 8px;
}

/* 杠杆弹窗做多做空按钮 */
.leverage-trade-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.leverage-trade-actions .trade-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.leverage-trade-actions .long-btn {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.leverage-trade-actions .long-btn:hover {
  background: linear-gradient(135deg, #16a34a, #15803d);
  transform: translateY(-1px);
}

.leverage-trade-actions .long-btn:active {
  transform: translateY(0);
}

.leverage-trade-actions .short-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.leverage-trade-actions .short-btn:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-1px);
}

.leverage-trade-actions .short-btn:active {
  transform: translateY(0);
}

/* 币种杠杆设置按钮 */
.coin-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coin-lever-btn {
  padding: 4px 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.coin-lever-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.1);
}

/* 币种开多开空按钮 */
.coin-trade-btn {
  padding: 4px 10px;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-left: 6px;
}

.coin-trade-btn.long {
  background: linear-gradient(135deg, #00c853, #00a844);
  color: #fff;
}

.coin-trade-btn.long:hover {
  background: linear-gradient(135deg, #00e65c, #00c853);
}

.coin-trade-btn.short {
  background: linear-gradient(135deg, #ff5252, #d32f2f);
  color: #fff;
}

.coin-trade-btn.short:hover {
  background: linear-gradient(135deg, #ff6b6b, #ff5252);
}

.coin-trade-btn:active {
  transform: scale(0.96);
}

/* 币种杠杆标签 */
.coin-lever-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 4px;
}

/* ETF分析模块 */
.etf-card {
  margin-bottom: 12px;
}

.etf-list {
  padding: 0;
}

/* ETF列表项复用coin-item样式 */
.etf-list-item {
  background: var(--surface-2);
}

.etf-list-item:hover {
  background: var(--surface-3);
}

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

/* ETF分析按钮样式 */
.coin-analyze-btn {
  padding: 6px 8px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.coin-analyze-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
}

.coin-analyze-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.etf-analyze-btn {
  padding: 6px 10px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.etf-analyze-btn:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-1px);
}

.etf-analyze-btn.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.etf-analyze-btn.loading .spinner {
  width: 12px;
  height: 12px;
}

.etf-signal-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
}

.etf-signal-buy {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.etf-signal-sell {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.etf-signal-neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

.etf-no-data {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

.etf-no-data-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

/* ETF详情弹窗样式补充 */
.etf-detail-content {
  width: 100%;
}

.etf-detail-title-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.etf-detail-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.etf-detail-price-info {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.etf-detail-price {
  font-size: 14px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.etf-detail-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 24px;
  transition: all 0.2s ease;
}

.etf-detail-close:hover {
  background: var(--surface-3);
  color: var(--text-primary);
}

.etf-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: var(--text-muted);
}

.etf-indicators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.etf-indicator-item {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.etf-advice-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.etf-advice-content {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.etf-analysis-section {
  background: var(--surface-2);
  border-radius: 12px;
  overflow: hidden;
}

/* ETF分析详情弹窗 */
.etf-detail-modal {
  max-height: 85vh;
}

.etf-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.etf-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.etf-header-icon {
  font-size: 28px;
}

.etf-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.etf-header-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.etf-header-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.etf-price-value {
  font-size: 14px;
  font-weight: 500;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
}

.etf-price-change {
  font-size: 12px;
  font-weight: 500;
}

.etf-price-change.positive {
  color: #22c55e;
}

.etf-price-change.negative {
  color: #ef4444;
}

.etf-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.etf-refresh-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.etf-refresh-btn:hover {
  background: var(--accent-blue-hover);
}

.etf-close-btn, .ai-detail-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
}

.etf-close-btn:hover, .ai-detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  opacity: 1;
}

.etf-close-btn:active, .ai-detail-close:active {
  transform: scale(0.95);
}

.etf-detail-body {
  padding: 12px 16px;
  overflow-y: auto;
  max-height: calc(90vh - 80px);
}

/* 指标卡片 */
.etf-indicator-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.etf-indicator-card {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.etf-indicator-value {
  font-size: 20px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
}

.etf-indicator-value.oversold {
  color: #22c55e;
}

.etf-indicator-value.overbought {
  color: #ef4444;
}

.etf-indicator-value.signal.buy {
  color: #22c55e;
}

.etf-indicator-value.signal.sell {
  color: #ef4444;
}

.etf-indicator-value.signal.neutral {
  color: var(--accent-gold);
}

.etf-indicator-status {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  width: fit-content;
}

.etf-indicator-status.oversold {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.etf-indicator-status.overbought {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.etf-indicator-status.normal {
  background: var(--surface-3);
  color: var(--text-muted);
}

/* 操作建议网格 */
.etf-advice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.etf-advice-item {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
}

.etf-advice-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.etf-advice-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

/* AI深度分析区块 */
.etf-analysis-block {
  background: var(--surface-2);
  border-radius: 12px;
  overflow: hidden;
}

.etf-analysis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.etf-analysis-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.etf-analysis-time {
  font-size: 11px;
  color: var(--text-muted);
}

.etf-analysis-content {
  padding: 16px;
  font-size: 13px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.etf-analysis-content h1,
.etf-analysis-content h2,
.etf-analysis-content h3 {
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 8px;
}

.etf-analysis-content h2 {
  font-size: 15px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.etf-analysis-content h3 {
  font-size: 14px;
}

.etf-analysis-content p {
  margin-bottom: 12px;
}

.etf-analysis-content ul,
.etf-analysis-content ol {
  padding-left: 20px;
  margin-bottom: 12px;
}

.etf-analysis-content li {
  margin-bottom: 4px;
}

.etf-analysis-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.etf-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
  color: var(--text-muted);
}

.etf-reanalyze-btn {
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

/* ========================================
   RSI分析报告弹窗
   ======================================== */

.rsi-report-modal {
  width: 100%;
  max-width: 520px;
  max-height: 94vh; /* 内容多，高度拉满；内容自适应（内容少贴底矮、内容多滚到 94vh 上限） */
  background: var(--bg-secondary);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.25s ease-out;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.rsi-report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.rsi-report-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.rsi-report-body {
  padding: 16px 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0; /* 关键：允许 flex 子项收缩，否则内容溢出被父容器 overflow:hidden 裁剪、底部滚不到 */
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.rsi-signal-group {
  margin-bottom: 20px;
}

.rsi-signal-group:last-child {
  margin-bottom: 0;
}

.rsi-signal-title {
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.rsi-signal-title.buy {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.rsi-signal-title.sell {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.rsi-signal-title.neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.rsi-coin-card {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rsi-coin-card:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.rsi-coin-card:last-child {
  margin-bottom: 0;
}

.rsi-coin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.rsi-coin-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.rsi-coin-values {
  display: flex;
  gap: 12px;
}

.rsi-value,
.adx-value {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
}

.rsi-value.rsi-low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.rsi-value.rsi-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.rsi-value.rsi-neutral {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.adx-value.adx-low {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.adx-value.adx-medium {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.adx-value.adx-high {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.rsi-coin-details {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}

.rsi-detail-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rsi-detail-label {
  font-size: 11px;
  color: var(--text-muted);
}

.rsi-detail-value {
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.rsi-strategy {
  background: rgba(96, 165, 250, 0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.rsi-update-time {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* 分析报告按钮样式 */
.text-btn.info {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
}

.text-btn.info:hover {
  background: rgba(96, 165, 250, 0.25);
}

/* ========================================
   RSIADX页面样式
   ======================================== */

/* RSIADX标题区域统计 */
.rsiadx-header-stats {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}

.rsiadx-header-stats .rsiadx-stat {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.rsiadx-header-stats .rsiadx-stat.overbought {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.rsiadx-header-stats .rsiadx-stat.neutral {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

.rsiadx-header-stats .rsiadx-stat.oversold {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.rsiadx-stat {
  font-size: 13px;
  font-weight: 600;
}

.rsiadx-stat.overbought {
  color: var(--accent-sell);
}

.rsiadx-stat.neutral {
  color: var(--text-muted);
}

.rsiadx-stat.oversold {
  color: var(--accent-buy);
}

/* RSIADX 趋势方向分组标题 */
.rsiadx-trend-group-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 6px 4px;
  font-size: 13px;
  font-weight: 600;
}

.rsiadx-trend-group-header::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.rsiadx-trend-group-header.trend-bull {
  color: var(--accent-buy);
}

.rsiadx-trend-group-header.trend-bear {
  color: var(--accent-sell);
}

.rsiadx-trend-group-header.trend-neutral {
  color: var(--text-muted);
}

.rsiadx-trend-group-count {
  font-size: 11px;
  font-weight: 500;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

/* RSIADX币种列表 */
.rsiadx-coin-list {
  padding: 8px;
}

.rsiadx-coin-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.rsiadx-coin-item:hover {
  background: var(--bg-elevated);
  transform: translateX(4px);
}

/* RSI徽章 */
.rsiadx-rsi-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  min-width: 56px;
}

.rsiadx-rsi-badge.overbought {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.15), rgba(255, 77, 109, 0.25));
  color: var(--accent-sell);
}

.rsiadx-rsi-badge.oversold {
  background: linear-gradient(135deg, rgba(0, 214, 143, 0.15), rgba(0, 214, 143, 0.25));
  color: var(--accent-buy);
}

.rsiadx-rsi-badge.neutral {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.25));
  color: var(--text-muted);
}

.rsiadx-rsi-value {
  font-size: 18px;
  font-weight: 700;
}

.rsiadx-rsi-label {
  font-size: 10px;
  opacity: 0.8;
}

/* 币种信息 */
.rsiadx-coin-info {
  flex: 1;
  min-width: 0;
}

.rsiadx-coin-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.rsiadx-coin-name .rsiadx-coin-leverage,
.rsiadx-coin-name .rsiadx-coin-position {
  font-size: 10px;
}

/* 币种名可点击：跳转 OKX 交易页 */
.rsiadx-coin-link {
  color: var(--accent-cyan);
  cursor: pointer;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: color 0.2s, opacity 0.2s;
}

.rsiadx-coin-link:hover {
  opacity: 0.85;
}

.rsiadx-coin-link:active {
  opacity: 0.6;
}

.rsiadx-coin-detail {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.rsiadx-coin-price {
  color: var(--text-primary);
}

.rsiadx-coin-change.positive {
  color: var(--accent-buy);
}

.rsiadx-coin-change.negative {
  color: var(--accent-sell);
}

.rsiadx-coin-adx {
  padding: 2px 6px;
  background: var(--bg-elevated);
  border-radius: 4px;
  font-size: 11px;
}

.rsiadx-coin-adx-status {
  padding: 2px 6px;
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 6px;
}

.rsiadx-coin-atr {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.rsiadx-coin-atr.atr-low {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.rsiadx-coin-atr.atr-medium {
  background: rgba(255, 214, 0, 0.15);
  color: var(--warning);
}

.rsiadx-coin-atr.atr-high {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

/* ATR>2.5（建议杠杆<4x）不建议操作提醒 */
.rsiadx-coin-no-op {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 77, 109, 0.15);
  color: #f56c6c;
}

/* EMA60指标样式：价格>EMA红色，价格<=EMA绿色 */
.rsiadx-coin-ema {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.rsiadx-coin-ema.ema-above {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.rsiadx-coin-ema.ema-below {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.rsiadx-coin-di {
  padding: 2px 6px;
  background: var(--bg-elevated);
  border-radius: 4px;
  font-size: 11px;
}

.rsiadx-coin-ai-signal {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  margin-left: 6px;
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

.rsiadx-coin-ai-signal.signal-buy {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.rsiadx-coin-ai-signal.signal-sell {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.rsiadx-coin-adx-status.adx-oscillation {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
}

.rsiadx-coin-adx-status.adx-strong {
  background: rgba(255, 214, 0, 0.15);
  color: #f59e0b;
}

.rsiadx-coin-leverage {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.rsiadx-coin-leverage.leverage-low {
  background: rgba(255, 214, 0, 0.15);
  color: var(--warning);
}

.rsiadx-coin-leverage.leverage-danger {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.rsiadx-coin-position {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(236, 72, 153, 0.15);
  color: #ec407a;
}

.rsiadx-coin-position.position-high {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.rsiadx-coin-position.position-medium {
  background: rgba(255, 214, 0, 0.15);
  color: var(--warning);
}

.rsiadx-coin-position.position-low {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

/* 趋势方向样式 */
.rsiadx-coin-trend {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

.rsiadx-coin-trend.trend-bull {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.rsiadx-coin-trend.trend-bear {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

/* 列表页布林带位置徽章：破上轨/贴上轨/中上/中下/贴下轨/破下轨 */
.rsiadx-coin-boll {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 6px;
}

.rsiadx-coin-boll.boll-above {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.rsiadx-coin-boll.boll-near-up {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.rsiadx-coin-boll.boll-mid-up,
.rsiadx-coin-boll.boll-mid-down {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-secondary);
}

.rsiadx-coin-boll.boll-near-down {
  background: rgba(14, 165, 233, 0.15);
  color: #0ea5e9;
}

.rsiadx-coin-boll.boll-below {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.rsiadx-coin-position.position-danger {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

/* 信号图标 */
.rsiadx-signal-icon {
  font-size: 20px;
}

/* 详情弹窗样式 */
.rsiadx-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.rsiadx-detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
}

.rsiadx-detail-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.rsiadx-detail-icon.overbought {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.15), rgba(255, 77, 109, 0.25));
  color: var(--accent-sell);
}

.rsiadx-detail-icon.oversold {
  background: linear-gradient(135deg, rgba(0, 214, 143, 0.15), rgba(0, 214, 143, 0.25));
  color: var(--accent-buy);
}

.rsiadx-detail-icon.neutral {
  background: linear-gradient(135deg, rgba(107, 114, 128, 0.15), rgba(107, 114, 128, 0.25));
  color: var(--text-muted);
}

.rsiadx-detail-info h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text-primary);
}

.rsiadx-detail-instid {
  font-size: 12px;
  color: var(--text-muted);
}

.rsiadx-detail-rsi {
  text-align: right;
}

.rsiadx-detail-rsi-value {
  font-size: 32px;
  font-weight: 700;
  display: block;
}

.rsiadx-detail-rsi-value.overbought {
  color: var(--accent-sell);
}

.rsiadx-detail-rsi-value.oversold {
  color: var(--accent-buy);
}

.rsiadx-detail-rsi-value.neutral {
  color: var(--text-muted);
}

.rsiadx-detail-rsi-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* 指标卡片 */
.rsiadx-indicators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.rsiadx-indicator-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.rsiadx-indicator-label {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.rsiadx-indicator-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rsiadx-indicator-value.overbought {
  color: var(--accent-sell);
}

.rsiadx-indicator-value.oversold {
  color: var(--accent-buy);
}

.rsiadx-indicator-value.neutral {
  color: var(--text-muted);
}

.rsiadx-indicator-value.positive {
  color: var(--accent-buy);
}

.rsiadx-indicator-value.negative {
  color: var(--accent-sell);
}

.rsiadx-indicator-value.atr-low {
  color: var(--accent-buy);
}

.rsiadx-indicator-value.atr-medium {
  color: var(--warning);
}

.rsiadx-indicator-value.atr-high {
  color: var(--accent-sell);
}

.rsiadx-indicator-value.leverage-high {
  color: var(--info);
}

.rsiadx-indicator-value.leverage-medium {
  color: var(--info);
}

.rsiadx-indicator-value.leverage-low {
  color: var(--warning);
}

.rsiadx-indicator-value.leverage-danger {
  color: var(--accent-sell);
}

.rsiadx-indicator-value.position-high {
  color: var(--accent-buy);
}

.rsiadx-indicator-value.position-medium {
  color: var(--warning);
}

.rsiadx-indicator-value.position-low {
  color: var(--info);
}

.rsiadx-indicator-value.position-danger {
  color: var(--accent-sell);
}

/* 详情弹窗趋势方向样式 */
.rsiadx-indicator-value.trend-bull {
  color: var(--accent-buy);
  font-weight: 600;
}

.rsiadx-indicator-value.trend-bear {
  color: var(--accent-sell);
  font-weight: 600;
}

/* 趋势多空说明（详情弹窗） */
.rsiadx-trend-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 16px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border-left: 3px solid var(--info);
}

.rsiadx-trend-note-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.rsiadx-trend-note-text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* EMA指标样式：价格 > EMA = 红色(多头趋势)，价格 <= EMA = 绿色(空头趋势) */
.rsiadx-indicator-value.ema-above {
  color: #ef4444;
  font-weight: 600;
}

.rsiadx-indicator-value.ema-below {
  color: #22c55e;
  font-weight: 600;
}

/* 开仓按钮样式 */
.rsiadx-btn-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

.rsiadx-trade-btn {
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.rsiadx-long-btn {
  background: linear-gradient(135deg, #00c853, #00e676);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rsiadx-long-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(0, 214, 143, 0.3);
}

.rsiadx-short-btn {
  background: linear-gradient(135deg, #ff1744, #ff5252);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rsiadx-short-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(255, 77, 109, 0.3);
}

.rsiadx-tp-btn {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rsiadx-tp-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.3);
}

.rsiadx-sl-btn {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.rsiadx-sl-btn:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.3);
}

/* 开仓弹窗样式 */
.modal-overlay,
.trade-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0) 16px;
}

.trade-modal {
  background: var(--bg-secondary);
  border-radius: 20px;
  width: 100%;
  max-width: 460px;
  max-height: min(85vh, 640px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.25s ease-out;
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.trade-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.trade-modal-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.trade-modal-close {
  width: 32px;
  height: 32px;
  font-size: 22px;
}

.trade-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.trade-form-group {
  margin-bottom: 16px;
}

.trade-form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.trade-form-group input,
.trade-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  box-sizing: border-box;
}

.trade-form-group input:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
}

.trade-form-group input:focus,
.trade-form-group select:focus {
  outline: none;
  border-color: var(--primary);
}

.trade-hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.trade-hint.warning {
  color: var(--accent-gold);
  font-weight: 500;
}

/* 最新价格显示区域 */
.trade-price-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.trade-current-price {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent-gold);
  cursor: pointer;
  flex: 1;
}

.trade-current-price:hover {
  color: var(--text-primary);
}

.trade-current-price.loading {
  color: var(--text-muted);
  font-weight: 400;
}

.trade-price-refresh-btn {
  background: transparent;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--text-muted);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trade-price-refresh-btn:hover {
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.1);
}

.trade-price-refresh-btn.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ATR显示行 */
.atr-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

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

/* ATR倍数选择器 */
.atr-multiplier-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.atr-multiplier-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.atr-multiplier-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.atr-multiplier-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* 紧凑弹窗样式 */
.trade-modal-compact {
  /* inherits parent .trade-modal max-width: 460px */
}

.trade-modal-compact .trade-modal-body {
  padding: 12px;
}

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

.trade-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.trade-info-item {
  flex: 1;
  min-width: 80px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.trade-info-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* 开仓按钮组 */
.trade-open-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.trade-open-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.trade-open-long {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.trade-open-long:hover {
  background: rgba(0, 214, 143, 0.25);
}

.trade-open-short {
  background: rgba(255, 82, 82, 0.15);
  color: var(--accent-sell);
}

.trade-open-short:hover {
  background: rgba(255, 82, 82, 0.25);
}

.trade-open-icon {
  font-size: 24px;
}

.trade-open-text {
  font-size: 14px;
  font-weight: 600;
}

.trade-max-link {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
}

.trade-max-link:hover {
  color: var(--accent-buy);
}

/* 数量滑块样式 */
.trade-size-slider-container {
  margin-top: 8px;
}

.trade-size-slider-track {
  position: relative;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  cursor: pointer;
}

.trade-size-slider-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-gold));
  border-radius: 3px;
  pointer-events: none;
}

.trade-size-slider-thumb {
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  background: var(--accent-gold);
  border: 2px solid #fff;
  border-radius: 50%;
  cursor: grab;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 2;
}

.trade-size-slider-thumb:active {
  cursor: grabbing;
}

.trade-size-slider-marks {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
}

.trade-size-slider-mark {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-tertiary);
}

.trade-size-slider-mark:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.trade-size-slider-mark.active {
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.15);
  font-weight: 600;
}

.trade-size-slider-mark.disabled {
  color: var(--text-muted);
  background: var(--bg-tertiary);
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* 杠杆倍数选项 */
.trade-leverage-options {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.trade-leverage-option {
  padding: 6px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-mono);
}

.trade-leverage-option:hover {
  border-color: var(--accent-gold);
  color: var(--text-primary);
}

.trade-leverage-option.active {
  background: rgba(255, 214, 0, 0.15);
  border-color: var(--accent-gold);
  color: var(--accent-gold);
  font-weight: 600;
}

.trade-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.trade-footer-left {
  flex-shrink: 0;
}

.trade-footer-right {
  display: flex;
  gap: 12px;
}

.trade-btn {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.trade-btn-refresh {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 10px 14px;
}

.trade-btn-refresh:active {
  transform: scale(0.95);
}

.trade-btn-refresh svg {
  animation: none;
}

.trade-btn-refresh.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.trade-btn-cancel {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.trade-btn-cancel:hover {
  background: var(--bg-secondary);
}

.trade-btn-long {
  background: var(--accent-buy);
  color: #fff;
}

.trade-btn-long:hover {
  opacity: 0.9;
}

.trade-btn-short {
  background: var(--accent-sell);
  color: #fff;
}

.trade-btn-short:hover {
  opacity: 0.9;
}

.trade-btn-tp {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #fff;
}

.trade-btn-tp:hover {
  opacity: 0.9;
}

.trade-btn-sl {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}

.trade-btn-sl:hover {
  opacity: 0.9;
}

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

/* ATR 价格阶梯（详情弹窗）- X 轴样式：上行倍数、下行价格，中间当前列高亮 */
.atr-ladder {
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

.atr-ladder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.atr-ladder-header-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.atr-ladder-header-value {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-muted);
}

.atr-ladder-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.atr-ladder-scroll::-webkit-scrollbar {
  height: 4px;
}

.atr-ladder-scroll::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 2px;
  opacity: 0.4;
}

.atr-ladder-axis {
  display: inline-grid;
  grid-template-columns: repeat(11, minmax(70px, 1fr));
  min-width: 100%;
}

.atr-ladder-row {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  align-items: center;
}

.atr-ladder-axis-line {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: 1 / -1;
  height: 8px;
  position: relative;
}

.atr-ladder-axis-line::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--text-muted);
  opacity: 0.4;
  transform: translateY(-0.5px);
}

.atr-tick-tick {
  width: 1px;
  height: 6px;
  background: var(--text-muted);
  opacity: 0.5;
  justify-self: center;
  align-self: center;
  border-radius: 1px;
}

.atr-tick-tick.atr-tick-above,
.atr-tick-tick.atr-tick-below {
  background: currentColor;
  opacity: 0.4;
}

.atr-tick-tick.atr-tick-above {
  color: var(--accent-buy);
}

.atr-tick-tick.atr-tick-below {
  color: var(--accent-sell);
}

.atr-tick-tick.atr-tick-current {
  width: 2px;
  height: 8px;
  background: var(--primary);
  opacity: 1;
  border-radius: 1px;
  box-shadow: 0 0 4px var(--primary);
}

.atr-tick-mult,
.atr-tick-price {
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 2px 1px;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.atr-tick-mult {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.3px;
  font-weight: 600;
}

.atr-tick-price {
  color: var(--text-primary);
  font-size: 10.5px;
  line-height: 1.2;
}

.atr-tick-mult.atr-tick-above,
.atr-tick-price.atr-tick-above {
  color: var(--accent-buy);
}

.atr-tick-mult.atr-tick-below,
.atr-tick-price.atr-tick-below {
  color: var(--accent-sell);
}

.atr-tick-mult.atr-tick-current,
.atr-tick-price.atr-tick-current {
  color: var(--primary);
  font-weight: 700;
}

.atr-tick-price.atr-tick-current {
  font-size: 11.5px;
}

.atr-tick-mult.atr-tick-current::before {
  content: '▼';
  display: block;
  font-size: 7px;
  color: var(--primary);
  margin-bottom: 1px;
  line-height: 1;
}

.atr-tick-price.atr-tick-current::after {
  content: '▲';
  display: block;
  font-size: 7px;
  color: var(--primary);
  margin-top: 1px;
  line-height: 1;
}

.atr-ladder-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 16px 0;
}

/* 布林带位置（详情弹窗）：纵向色带 + 三轨价格 + 最新价圆点 + 一句话结论 */
.boll-position {
  margin: 16px 0;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}

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

.boll-pos-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.boll-pos-bandwidth {
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--text-muted);
}

.boll-pos-body {
  display: flex;
  align-items: stretch;
  gap: 14px;
}

.boll-track {
  position: relative;
  width: 14px;
  height: 120px;
  border-radius: 7px;
  flex-shrink: 0;
  background: linear-gradient(to top, rgba(0, 214, 143, 0.35), rgba(107, 114, 128, 0.15) 50%, rgba(255, 77, 109, 0.35));
}

.boll-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--text-muted);
  opacity: 0.5;
  z-index: 1;
}

.boll-line-upper { top: 0; }
.boll-line-middle { top: 50%; }
.boll-line-lower { bottom: 0; }

.boll-dot {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-tertiary);
  box-shadow: 0 0 6px var(--primary);
  z-index: 2;
}

.boll-dot-above {
  background: var(--accent-sell);
  box-shadow: 0 0 6px var(--accent-sell);
}

.boll-dot-near-up {
  background: #f59e0b;
  box-shadow: 0 0 6px #f59e0b;
}

.boll-dot-near-down {
  background: #0ea5e9;
  box-shadow: 0 0 6px #0ea5e9;
}

.boll-dot-below {
  background: var(--accent-buy);
  box-shadow: 0 0 6px var(--accent-buy);
}

.boll-labels {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 120px;
}

.boll-lab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  gap: 8px;
}

.boll-lab-name {
  color: var(--text-muted);
}

.boll-lab-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.boll-lab-upper .boll-lab-name,
.boll-lab-upper .boll-lab-val {
  color: var(--accent-sell);
}

.boll-lab-middle .boll-lab-val {
  color: var(--text-secondary);
}

.boll-lab-lower .boll-lab-name,
.boll-lab-lower .boll-lab-val {
  color: var(--accent-buy);
}

.boll-pos-conclusion {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}

.boll-pos-state {
  font-weight: 700;
  font-size: 13px;
}

.boll-pos-state.boll-above { color: var(--accent-sell); }
.boll-pos-state.boll-below { color: var(--accent-buy); }
.boll-pos-state.boll-near-up { color: #f59e0b; }
.boll-pos-state.boll-near-down { color: #0ea5e9; }
.boll-pos-state.boll-mid-up,
.boll-pos-state.boll-mid-down { color: var(--text-secondary); }

.boll-pos-detail {
  color: var(--text-muted);
  font-size: 12px;
}

.boll-pos-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 16px 0;
}

/* 信号卡片 */
.rsiadx-signal-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  background: var(--bg-tertiary);
}

.rsiadx-signal-card.buy-signal {
  background: linear-gradient(135deg, rgba(0, 214, 143, 0.1), rgba(0, 214, 143, 0.15));
}

.rsiadx-signal-card.sell-signal {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.1), rgba(255, 77, 109, 0.15));
}

.rsiadx-signal-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rsiadx-signal-icon {
  font-size: 28px;
}

.rsiadx-signal-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rsiadx-signal-label {
  font-size: 12px;
  color: var(--text-muted);
}

.rsiadx-signal-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.rsiadx-signal-right {
  text-align: right;
}

.rsiadx-confidence-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  display: block;
}

.rsiadx-confidence-label {
  font-size: 11px;
  color: var(--text-muted);
}

/* 交易建议 */
.rsiadx-trade-advice {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.rsiadx-trade-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.rsiadx-trade-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.rsiadx-trade-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  font-size: 13px;
}

.rsiadx-trade-item .label {
  color: var(--text-muted);
}

.rsiadx-trade-item .value {
  font-weight: 600;
  color: var(--text-primary);
}

.rsiadx-trade-item .value.profit {
  color: var(--accent-buy);
}

.rsiadx-trade-item .value.stop {
  color: var(--accent-sell);
}

.rsiadx-trade-item .value.leverage {
  color: var(--primary);
}

/* 分析理由 */
.rsiadx-reasoning {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.rsiadx-reasoning-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.rsiadx-reasoning-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* 完整报告 */
.rsiadx-full-report {
  background: var(--bg-tertiary);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.rsiadx-full-report-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.rsiadx-full-report-content {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.rsiadx-full-report-content h1,
.rsiadx-full-report-content h2,
.rsiadx-full-report-content h3 {
  color: var(--text-primary);
  margin-top: 16px;
  margin-bottom: 8px;
}

.rsiadx-full-report-content ul,
.rsiadx-full-report-content ol {
  padding-left: 20px;
}

.rsiadx-full-report-content code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
}

.rsiadx-analysis-time {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* 止盈止损百分比滑块 */
.stop-percent-slider-container {
  margin-top: 8px;
}

.stop-percent-slider-track {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: 3px;
  position: relative;
  margin-bottom: 12px;
}

.stop-percent-slider-fill {
  height: 100%;
  background: var(--accent-gold);
  border-radius: 3px;
  transition: width 0.15s ease;
}

.stop-percent-slider-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent-gold);
  border-radius: 50%;
  position: absolute;
  top: -5px;
  transform: translateX(-50%);
  cursor: grab;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: left 0.15s ease;
}

.stop-percent-slider-thumb:active {
  cursor: grabbing;
  transform: translateX(-50%) scale(1.2);
}

.stop-percent-slider-marks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
}

.stop-percent-slider-mark {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stop-percent-slider-mark:hover {
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.1);
}

.stop-percent-slider-mark.active {
  color: var(--accent-gold);
  font-weight: 600;
  background: rgba(255, 214, 0, 0.15);
}

/* 百分比输入框样式 */
.stop-percent-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stop-percent-input-group input {
  width: 80px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-align: center;
}

.stop-percent-input-group input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.stop-percent-unit {
  font-size: 14px;
  color: var(--text-muted);
}

/* ========================================
   Home Page Tabs
   ======================================== */
/* ========================================
   Home Tabs - Mobile Optimized (UI/UX)
   ======================================== */
.home-tabs {
  display: flex;
  padding: 6px 8px;
  gap: 2px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
}

.home-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 6px;
  min-height: 36px;
  min-width: 40px;
  border: none;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  gap: 2px;
  flex: 1;
  max-width: 60px;
}

.home-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.home-tab.active {
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.15);
}

.home-tab.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 1px;
}

.home-tab:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.home-tab:active:not(.active) {
  transform: scale(0.97);
}

/* ========================================
   Review Page Tabs (参考首页样式)
   ======================================== */
.review-tabs {
  display: flex;
  padding: 6px 8px;
  gap: 2px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
}

.review-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 6px;
  min-height: 36px;
  min-width: 40px;
  border: none;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  gap: 2px;
  flex: 1;
  max-width: 60px;
}

.review-tab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.review-tab span {
  display: block;
}

.review-tab.active {
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.15);
}

.review-tab.active::after {
  content: '';
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent-gold);
  border-radius: 1px;
}

.review-tab:hover:not(.active) {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.review-tab:active:not(.active) {
  transform: scale(0.97);
}

/* Scroll Loading Indicator */
.scroll-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 12px;
  gap: 8px;
}

.scroll-loading .spinner {
  width: 16px;
  height: 16px;
}

/* ========================================
   Review Page - Professional Trading UI
   ======================================== */

/* 复盘列表容器 */
#review-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 复盘卡片 - 专业交易终端风格 */
.review-item {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 0;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.2s ease;
}

.review-item:hover {
  border-color: rgba(255, 214, 0, 0.2);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* 卡片顶部：币种 + 信号 + 时间 */
.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.review-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-coin {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.review-coin-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-gold);
}

/* 信号类型标签 - 突出设计 */
.review-signal {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.02em;
}

.review-signal.buy {
  background: linear-gradient(135deg, rgba(0, 214, 143, 0.2), rgba(0, 214, 143, 0.1));
  color: var(--accent-buy);
  border: 1px solid rgba(0, 214, 143, 0.3);
}

.review-signal.sell {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.2), rgba(255, 77, 109, 0.1));
  color: var(--accent-sell);
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.review-signal-icon {
  font-size: 10px;
}

.review-time {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* 卡片主体：指标网格 */
.review-body {
  padding: 16px;
}

/* 指标网格布局 - 4个指标2列布局 */
.review-indicators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}

/* 指标项 - 紧凑卡片风格 */
.review-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  transition: all 0.15s ease;
}

.review-indicator:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.review-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.review-value {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* 价格行 - 突出显示 */
.review-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: rgba(255, 214, 0, 0.05);
  border-radius: 8px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 214, 0, 0.1);
}

.review-price-label {
  font-size: 11px;
  color: var(--text-muted);
}

.review-price-value {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent-gold);
}

/* 指标颜色类 */
.review-value.rsi-overbought { color: var(--accent-sell); }
.review-value.rsi-oversold { color: var(--accent-buy); }
.review-value.rsi-neutral { color: var(--text-secondary); }

.review-value.adx-extreme {
  color: var(--accent-gold);
  text-shadow: 0 0 8px rgba(255, 214, 0, 0.3);
}
.review-value.adx-strong { color: #f59e0b; }
.review-value.adx-moderate { color: var(--text-secondary); }

.review-value.atr-high { color: var(--accent-sell); }
.review-value.atr-medium { color: #f59e0b; }
.review-value.atr-low { color: var(--accent-buy); }

/* 建议杠杆配色（与杠杆设置页一致） */
.review-coin.lv-ok,
.review-value.lv-ok { color: #16A354; }
.review-coin.lv-warn,
.review-value.lv-warn { color: #e6a23c; }
.review-coin.lv-danger,
.review-value.lv-danger { color: #f56c6c; }

/* ATR>2.5 不建议操作提醒 */
.review-no-op {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #f56c6c;
}

.detail-no-op {
  color: #f56c6c;
  font-weight: 700;
}

.review-value.leverage {
  color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* ADX状态标签 */
.review-status-tag {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  font-weight: 500;
}

.review-value.position-heavy { color: var(--accent-buy); }
.review-value.position-medium { color: #f59e0b; }
.review-value.position-light { color: var(--text-muted); }

.review-value.trend-up { color: var(--accent-buy); }
.review-value.trend-down { color: var(--accent-sell); }
.review-value.trend-neutral { color: var(--text-muted); }

/* 复盘描述 */
.review-desc {
  padding: 12px 14px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  border: 1px solid var(--border-light);
}

/* 卡片底部：操作按钮 */
.review-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
}

.review-btn {
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.review-btn.edit {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.review-btn.edit:hover {
  background: rgba(255, 214, 0, 0.1);
  color: var(--accent-gold);
  border-color: var(--accent-gold);
}

.review-btn.edit:active {
  transform: scale(0.96);
}

.review-btn.copy {
  background: rgba(33, 150, 243, 0.08);
  color: #2196F3;
  border: 1px solid rgba(33, 150, 243, 0.2);
}

.review-btn.copy:hover {
  background: rgba(33, 150, 243, 0.15);
  border-color: #2196F3;
}

.review-btn.copy:active {
  transform: scale(0.96);
}

.review-btn.delete {
  background: rgba(255, 77, 109, 0.08);
  color: var(--accent-sell);
  border: 1px solid rgba(255, 77, 109, 0.2);
}

.review-btn.delete:hover {
  background: rgba(255, 77, 109, 0.15);
  border-color: var(--accent-sell);
}

.review-btn.delete:active {
  transform: scale(0.96);
}

/* 空状态设计 */
.review-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.review-empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.review-empty-text {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.review-empty-hint {
  font-size: 12px;
  color: var(--text-dim);
}

/* 加载状态 */
.review-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  gap: 12px;
}

.review-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.review-loading-text {
  font-size: 13px;
  color: var(--text-muted);
}

/* 复盘编辑弹窗 */
.review-edit-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0) 16px;
}

.review-edit-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  max-height: min(85vh, 640px);
  border: 1px solid var(--border);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  animation: modal-enter 0.25s ease-out;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.review-edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  flex-shrink: 0;
}

.review-edit-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.review-edit-close {
  width: 28px;
  height: 28px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
  transition: all 0.2s ease;
}

.review-edit-close:hover {
  opacity: 1;
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.review-edit-body {
  padding: 20px;
}

.review-edit-info {
  margin-bottom: 16px;
}

.review-edit-coin {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.review-edit-signal {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.review-edit-signal.buy {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.review-edit-signal.sell {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.review-edit-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.review-edit-body textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  font-family: var(--font-body);
  line-height: 1.6;
}

.review-edit-body textarea:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.1);
}

.review-edit-body input[type="number"],
.review-edit-body input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
}

.review-edit-body input[type="number"]:focus,
.review-edit-body input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(255, 214, 0, 0.1);
}

.review-edit-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.01);
  border-top: 1px solid var(--border-light);
}

.review-edit-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.review-edit-btn.cancel {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.review-edit-btn.cancel:hover {
  color: var(--text-secondary);
  background: var(--bg-elevated);
}

.review-edit-btn.submit {
  background: var(--accent-gold);
  color: var(--bg-primary);
}

.review-edit-btn.submit:hover {
  background: #ffe033;
  transform: translateY(-1px);
}

.review-edit-btn.submit:active {
  transform: translateY(0);
}

.review-edit-btn.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* 复盘删除确认弹窗 */
.review-delete-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1201;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 24px;
}

.review-delete-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  width: 100%;
  max-width: 340px;
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-elevated);
  animation: modal-enter 0.25s ease-out;
}

.review-delete-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 77, 109, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: var(--accent-sell);
  font-size: 24px;
}

.review-delete-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-family: var(--font-heading);
}

.review-delete-content p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.review-delete-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.review-delete-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 80px;
}

.review-delete-btn.cancel {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.review-delete-btn.cancel:hover {
  color: var(--text-secondary);
}

.review-delete-btn.confirm {
  background: var(--accent-sell);
  color: #fff;
}

.review-delete-btn.confirm:hover {
  background: #ff3958;
  transform: translateY(-1px);
}

.review-delete-btn.confirm:active {
  transform: translateY(0);
}

.review-delete-btn.confirm:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 复盘统计卡片 */
.review-stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-primary);
}

.review-stat-card {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 12px 8px;
  text-align: center;
  border: 1px solid var(--border);
}

.review-stat-card .stat-num {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.2;
  color: var(--text-primary);
}

.review-stat-card .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

.review-stat-card.buy .stat-num { color: var(--accent-buy); }
.review-stat-card.sell .stat-num { color: var(--accent-sell); }
.review-stat-card.profit .stat-num.positive { color: var(--accent-buy); }
.review-stat-card.profit .stat-num.negative { color: var(--accent-sell); }

/* RSI迷你进度条 */
.review-rsi-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.review-rsi-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  overflow: hidden;
}

.review-rsi-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* RSI指标样式 - 特殊布局 */
.review-indicator.rsi-ind {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.review-indicator.rsi-ind .review-value {
  font-size: 16px;
}

/* ADX状态标签样式增强 */
.review-status-tag.adx-extreme {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.review-status-tag.adx-strong {
  background: rgba(167, 139, 250, 0.2);
  color: #a78bfa;
}

.review-status-tag.adx-moderate {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

/* 复盘页面响应式 */
@media (max-width: 360px) {
  .review-stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .review-indicators {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .review-coin {
    font-size: 16px;
  }
  
  .review-value {
    font-size: 14px;
  }
}

/* ========================================
   我的页面 - 新版美化样式
   ======================================== */

.account-page-new {
  padding: 16px;
  padding-top: 72px;
  padding-bottom: 80px;
  background: var(--bg-primary);
}

/* 用户信息卡片 */
.account-user-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-card);
}

.account-user-avatar .avatar-circle {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  box-shadow: var(--shadow-glow);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--bg-primary);
  font-family: var(--font-heading);
}

.account-user-info {
  flex: 1;
}

.account-user-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: var(--font-heading);
}

.account-user-version {
  font-size: 13px;
  color: var(--text-muted);
}

/* 总资金卡片 */
.account-total-card {
  background: var(--bg-secondary);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.account-total-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

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

.total-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

/* 收益网格 */
.account-profit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.profit-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profit-item .profit-label {
  font-size: 12px;
  color: var(--text-muted);
}

.profit-item .profit-num {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.profit-item .profit-num.positive {
  color: var(--accent-buy);
}

.profit-item .profit-num.negative {
  color: var(--accent-sell);
}

/* 账户列表区块 */
.account-section {
  margin-bottom: 16px;
}

.account-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

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

/* 账户资金列表 */
.account-funds-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-funds-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.account-funds-item:active {
  transform: scale(0.98);
  border-color: rgba(255, 214, 0, 0.3);
  box-shadow: var(--shadow-glow-sm);
}

.account-funds-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-funds-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--bg-primary);
  box-shadow: var(--shadow-glow-sm);
}

.account-funds-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-funds-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.account-funds-positions {
  font-size: 12px;
  color: var(--text-muted);
}

.account-funds-center {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
}

.account-funds-value {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.account-funds-trading {
  font-size: 12px;
  color: var(--text-muted);
}

.account-funds-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.account-funds-threshold {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-gold);
  font-family: var(--font-mono);
}

/* 功能菜单区块 */
.account-menu-section {
  margin-top: 8px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.menu-item:active {
  transform: scale(0.98);
  border-color: rgba(255, 214, 0, 0.3);
}

.menu-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.menu-icon.logout {
  background: rgba(255, 77, 109, 0.1);
  color: var(--accent-sell);
}

.menu-content {
  flex: 1;
  margin-left: 12px;
}

.menu-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.menu-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.menu-arrow {
  color: var(--text-muted);
}

/* 响应式 */
@media (max-width: 360px) {
  .account-page-new {
    padding: 12px;
    padding-top: 68px;
  }
  
  .account-user-card {
    padding: 16px;
  }
  
  .avatar-circle {
    width: 48px;
    height: 48px;
    font-size: 18px;
  }
  
  .account-user-name {
    font-size: 16px;
  }
  
  .total-value {
    font-size: 20px;
  }
  
  .account-profit-grid {
    gap: 8px;
  }
  
  .profit-item .profit-num {
    font-size: 14px;
  }
}

/* 账户自动交易小开关 */
.account-auto-switch {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.switch-input-mini {
  display: none;
}

.switch-label-mini {
  display: block;
  width: 40px;
  height: 22px;
  background: #6b7280;
  border-radius: 11px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}

.switch-inner-mini {
  display: block;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.switch-input-mini:checked + .switch-label-mini {
  background: #22c55e;
}

.switch-input-mini:checked + .switch-label-mini .switch-inner-mini {
  left: 20px;
}

/* 自动交易设置弹窗样式 */
.switch-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.switch-group label {
  font-weight: 600;
  color: var(--text-primary);
}

.switch-container {
  display: flex;
  align-items: center;
}

.switch-input {
  display: none;
}

.switch-label {
  display: block;
  width: 50px;
  height: 28px;
  background: var(--bg-elevated);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid var(--border-light);
}

.switch-inner {
  display: block;
  width: 22px;
  height: 22px;
  background: linear-gradient(180deg, #ffffff 0%, #e0e0e0 100%);
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 3px;
  transition: all 0.3s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.switch-input:checked + .switch-label {
  background: rgba(0, 214, 143, 0.25);
  border-color: rgba(0, 214, 143, 0.4);
  box-shadow: var(--shadow-buy-glow);
}

.switch-input:checked + .switch-label .switch-inner {
  left: 25px;
  background: linear-gradient(180deg, var(--accent-buy) 0%, #00B87A 100%);
}

.switch-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.coin-select-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
  padding: 10px;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.coin-checkbox-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-btn);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s;
}

.coin-checkbox-item:hover {
  border-color: rgba(255, 214, 0, 0.3);
}

.coin-checkbox-item.selected {
  background: rgba(255, 214, 0, 0.12);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow-sm);
}

.coin-checkbox-item input[type="checkbox"] {
  display: none;
}

.coin-checkbox-item .coin-name {
  font-size: 13px;
  color: var(--text-primary);
}

.coin-select-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.menu-icon.strategy {
  background: linear-gradient(135deg, #ff6b6b, #ffa500);
}

/* ========================================
   Signal List (RSI信号列表)
   ======================================== */
.signal-list {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.signal-item {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-card);
  padding: 0;
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.2s ease;
  position: relative;
  box-shadow: var(--shadow-card);
}

.signal-item:hover {
  border-color: rgba(255, 214, 0, 0.2);
  box-shadow: var(--shadow-elevated);
}

.signal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  gap: 6px;
}

.signal-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.signal-coin {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.signal-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
}

.signal-badge.long {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.signal-badge.short {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.signal-badge.strategy-a {
  background: rgba(100, 181, 246, 0.15);
  color: #64b5f6;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.signal-badge.strategy-b {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
}

.signal-sim-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  margin-left: 4px;
}

.signal-sim-status.holding {
  background: rgba(255, 152, 0, 0.15);
  color: #ff9800;
}

.signal-sim-status.sim-profit {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.signal-sim-status.sim-loss {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.signal-time {
  font-size: 11px;
  color: var(--text-muted);
}

.signal-body {
  padding: 12px 16px;
}

.signal-indicators {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.signal-indicator-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.signal-indicator-label {
  font-size: 10px;
  color: var(--text-muted);
}

.signal-indicator-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.signal-indicator-value.overbought {
  color: var(--accent-sell);
}

.signal-indicator-value.oversold {
  color: var(--accent-buy);
}

.signal-indicator-value.neutral {
  color: var(--text-secondary);
}

.signal-tpsl-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-light);
}

.signal-tpsl-item {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.signal-tpsl-label {
  font-size: 11px;
  color: var(--text-muted);
}

.signal-tpsl-value {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.signal-tpsl-item.tp .signal-tpsl-value {
  color: var(--accent-buy);
}

.signal-tpsl-item.sl .signal-tpsl-value {
  color: var(--accent-sell);
}

/* ========================================
   Trade Record List (自动交易记录列表)
   ======================================== */
.trade-record-list {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.trade-record-item {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-card);
  padding: 0;
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.trade-record-item:hover {
  border-color: rgba(255, 214, 0, 0.2);
  box-shadow: var(--shadow-elevated);
}

.trade-record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.015);
  border-bottom: 1px solid var(--border-light);
}

.trade-record-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trade-record-coin {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.trade-record-account {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-primary);
  background: rgba(59, 130, 246, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
  margin-left: 8px;
}

.trade-record-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.trade-record-status.open {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.trade-record-status.closed {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

.trade-record-direction {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

.trade-record-direction.long {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.trade-record-direction.short {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.trade-record-body {
  padding: 12px 16px;
}

.trade-record-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.trade-record-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trade-record-grid-label {
  font-size: 11px;
  color: var(--text-muted);
}

.trade-record-grid-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.trade-record-grid-value.profit {
  color: var(--accent-buy);
}

.trade-record-grid-value.loss {
  color: var(--accent-sell);
}

.trade-record-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.trade-record-time {
  font-size: 12px;
  color: var(--text-muted);
}

.trade-record-profit {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.trade-record-profit.positive {
  color: var(--accent-buy);
}

.trade-record-profit.negative {
  color: var(--accent-sell);
}

/* Signal & Trade Record List Empty States */
.signal-empty, .trade-record-empty {
  padding: 60px 20px;
  text-align: center;
}

.signal-empty-icon, .trade-record-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.signal-empty-text, .trade-record-empty-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.signal-empty-hint, .trade-record-empty-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* ========================================
   详情弹窗样式 (专业交易终端风格)
   ======================================== */
.detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0) 16px;
}

.detail-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
}

.detail-modal-content {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: min(80vh, 600px);
  background: var(--bg-secondary);
  border-radius: 20px;
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modal-enter 0.25s ease-out;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

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

.detail-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}

.detail-modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-modal-coin {
  font-size: 20px;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--text-primary);
}

.detail-modal-badge {
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
}

.detail-modal-badge.long {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.detail-modal-badge.short {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.detail-modal-badge.open {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.detail-modal-badge.closed {
  background: rgba(107, 114, 128, 0.15);
  color: var(--text-muted);
}

.detail-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg-elevated);
  border-radius: 8px;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.detail-modal-close:hover {
  background: var(--bg-primary);
  color: var(--text-primary);
}

.detail-modal-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section:last-child {
  margin-bottom: 0;
}

.detail-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.detail-section-title svg {
  color: var(--accent-gold);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.detail-grid-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bg-tertiary);
  border-radius: 10px;
  border: 1px solid var(--border-light);
}

.detail-grid-item.full-width {
  grid-column: span 2;
}

.detail-grid-label {
  font-size: 11px;
  color: var(--text-muted);
}

.detail-grid-value {
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.detail-grid-value.positive {
  color: var(--accent-buy);
}

.detail-grid-value.negative {
  color: var(--accent-sell);
}

.detail-grid-value.highlight {
  color: var(--accent-gold);
}

.detail-grid-value.holding {
  color: #ff9800;
  font-weight: 600;
}

.detail-grid-value.closed {
  color: var(--text-muted);
}

.detail-modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border);
}

.detail-footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-modal-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.detail-footer-right {
  display: flex;
  align-items: center;
}

.detail-modal-profit {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.detail-modal-profit.positive {
  color: var(--accent-buy);
}

.detail-modal-profit.negative {
  color: var(--accent-sell);
}

/* ========================================
   卡片增强样式 - 可点击设计
   ======================================== */
.signal-item, .trade-record-item, .review-item {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.signal-item::after, .trade-record-item::after {
  content: none;
}

.signal-item:active, .trade-record-item:active, .review-item:active {
  transform: scale(0.98);
  border-color: var(--accent-gold);
}

/* 卡片状态指示条 */
.signal-item::before, .trade-record-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 3px;
  border-radius: 0 2px 2px 0;
}

.signal-item.long::before, .trade-record-item.long::before {
  background: linear-gradient(180deg, var(--accent-buy) 0%, transparent 100%);
}

.signal-item.short::before, .trade-record-item.short::before {
  background: linear-gradient(180deg, var(--accent-sell) 0%, transparent 100%);
}

.trade-record-item.open::before {
  background: linear-gradient(180deg, var(--accent-buy) 0%, transparent 100%);
}

.trade-record-item.closed::before {
  background: linear-gradient(180deg, var(--text-muted) 0%, transparent 100%);
}

/* ========================================
   列表卡片紧凑样式
   ======================================== */
.signal-item .signal-header,
.trade-record-item .trade-record-header {
  padding-right: 40px;
}

/* 添加点击提示 */
.signal-item .signal-body,
.trade-record-item .trade-record-body {
  padding-bottom: 12px;
}

/* ========================================
   EMA双均线策略模块样式
   ======================================== */

.ema-card {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}

.ema-header-stats {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ema-header-stats .stat-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ema-header-stats .btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ema-header-stats .stat-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.ema-header-stats .stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.ema-header-stats .stat-item.enabled .stat-num {
  color: var(--success);
}

.ema-header-stats .stat-item.long .stat-num {
  color: var(--accent-buy);
}

.ema-header-stats .stat-item.short .stat-num {
  color: var(--accent-sell);
}

.ema-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
}

.ema-item {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  transition: all 0.2s;
  box-shadow: var(--shadow-card);
}

.ema-item.pos-long {
  border-color: rgba(0, 214, 143, 0.35);
  background: linear-gradient(180deg, rgba(0, 214, 143, 0.08) 0%, var(--bg-secondary) 100%);
}

.ema-item.pos-short {
  border-color: rgba(255, 77, 109, 0.35);
  background: linear-gradient(180deg, rgba(255, 77, 109, 0.08) 0%, var(--bg-secondary) 100%);
}

.ema-item.disabled {
  opacity: 0.6;
  background: var(--bg-tertiary);
  border-color: var(--border-light);
}

.ema-item.disabled .coin-name {
  color: var(--text-secondary);
}

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

.ema-header-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ema-header-left .coin-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
}

.ema-header-left .coin-period {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-tertiary);
  padding: 2px 6px;
  border-radius: 4px;
}

.ema-header-left .coin-long {
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
}

.ema-header-right .pos-tag {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
}

.ema-header-right .pos-tag.long {
  background: rgba(0, 214, 143, 0.2);
  color: var(--accent-buy);
}

.ema-header-right .pos-tag.short {
  background: rgba(255, 77, 109, 0.2);
  color: var(--accent-sell);
}

.ema-header-right .pos-tag.disabled {
  background: rgba(128, 128, 128, 0.2);
  color: var(--text-secondary);
}

.ema-position {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
}

.ema-position .pos-price {
  font-size: 13px;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.ema-position .pos-sl {
  font-size: 12px;
  color: var(--accent-sell);
  font-family: var(--font-mono);
}

.ema-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  margin-bottom: 8px;
}

.ema-indicators {
  margin-bottom: 8px;
}

.ema-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.ema-row.tech {
  gap: 4px;
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
}

.ema-label {
  font-size: 11px;
  color: var(--text-muted);
}

.ema-val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.ema-val.fast {
  color: #3498db;
}

.ema-val.slow {
  color: #9b59b6;
}

.ema-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: auto;
}

.ema-tag.bull {
  background: rgba(0, 214, 143, 0.2);
  color: var(--accent-buy);
}

.ema-tag.bear {
  background: rgba(255, 77, 109, 0.2);
  color: var(--accent-sell);
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  min-width: 60px;
}

.tech-item .tech-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.tech-item .tech-val.up {
  color: var(--accent-buy);
}

.tech-item .tech-val.down {
  color: var(--accent-sell);
}

.tech-item .tech-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ema-reason {
  font-size: 12px;
  color: var(--warning);
  padding: 6px 8px;
  background: rgba(255, 214, 0, 0.08);
  border-radius: 4px;
  border: 1px solid rgba(255, 214, 0, 0.15);
}

/* EMA管理按钮 */
.ema-admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 6px;
  background: rgba(255, 214, 0, 0.15);
  color: var(--primary);
  border: 1px solid rgba(255, 214, 0, 0.3);
  cursor: pointer;
  transition: all 0.2s;
}

.ema-admin-btn:hover {
  background: rgba(255, 214, 0, 0.25);
}

.ema-admin-btn svg {
  flex-shrink: 0;
}

/* EMA弹窗样式 */
.ema-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.ema-modal {
  background: var(--bg-surface);
  border-radius: var(--radius-card);
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.ema-modal-wide {
  max-width: 400px;
}

.ema-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
}

.ema-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.ema-modal-close {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ema-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.ema-modal-body {
  padding: 16px;
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

.ema-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--border-light);
}

/* EMA表单样式 */
.ema-form-group {
  margin-bottom: 12px;
}

.ema-form-group label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.ema-form-group input,
.ema-form-group select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
}

.ema-form-group input:focus,
.ema-form-group select:focus {
  border-color: var(--primary);
  outline: none;
}

.ema-form-row {
  display: flex;
  gap: 12px;
}

.ema-form-row .ema-form-group {
  flex: 1;
}

/* EMA按钮样式 */
.ema-btn-primary {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--bg-void);
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.ema-btn-cancel {
  padding: 10px 20px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-light);
  cursor: pointer;
}

.ema-btn-confirm {
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--primary);
  color: #000;
  border: none;
  cursor: pointer;
  font-weight: 600;
}

.ema-btn-confirm:hover {
  background: #e6c200;
}

/* EMA账户列表样式 */
.ema-account-item {
  padding: 12px;
  border-radius: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
}

.ema-account-item.enabled {
  border-color: rgba(0, 214, 143, 0.3);
  background: rgba(0, 214, 143, 0.05);
}

.ema-account-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ema-account-header input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.ema-account-name {
  font-weight: 600;
  color: var(--text-primary);
}

.ema-account-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.ema-account-item.enabled .ema-account-status {
  background: rgba(0, 214, 143, 0.2);
  color: var(--accent-buy);
}

.ema-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

/* EMA账户币种选择样式 */
.ema-account-coins {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.ema-account-coins .coin-select-container {
  margin-top: 4px;
}

.ema-account-coins .coin-checkbox-item {
  padding: 6px 10px;
}

.ema-account-coins .coin-checkbox-item .coin-name {
  font-size: 12px;
}

.ema-account-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.ema-coin-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ema-coin-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255, 214, 0, 0.15);
  color: var(--primary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.ema-coin-tag:hover {
  background: rgba(255, 214, 0, 0.25);
}

/* EMA编辑图标 */
.ema-edit-icon {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 8px;
  opacity: 0.6;
}

.ema-item:hover .ema-edit-icon {
  opacity: 1;
  color: var(--primary);
}

/* EMA编辑表单扩展样式 */
.ema-form-divider {
  font-size: 12px;
  color: var(--text-muted);
  padding: 12px 0 8px;
  margin-top: 8px;
  border-top: 1px solid var(--border-light);
  font-weight: 500;
}

.ema-switch-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ema-select-sm {
  width: auto;
  min-width: 60px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
}

.ema-input-sm {
  width: 60px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
}

.ema-input-sm:disabled {
  opacity: 0.5;
  background: var(--bg-void);
}

.ema-filter-desc {
  font-size: 12px;
  color: var(--text-muted);
}

.ema-form-row-thresholds {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.ema-form-group-sm {
  flex: 1;
}

.ema-form-group-sm label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ema-form-group-sm input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
}

.ema-btn-save {
  padding: 10px 24px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--bg-void);
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.ema-btn-save:hover {
  opacity: 0.9;
}

.direction-tag {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  margin-left: 4px;
  border: 1px solid var(--border-light);
}

/* 策略详情弹窗样式 */
.ema-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.ema-detail-state {
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
}
.ema-detail-state.long { background: rgba(0, 214, 143, 0.15); color: var(--accent-buy); }
.ema-detail-state.short { background: rgba(255, 77, 109, 0.15); color: var(--accent-sell); }
.ema-detail-state.empty { background: rgba(158,158,158,0.2); color: #9e9e9e; }
.ema-detail-status {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 3px;
}
.ema-detail-status.enabled { background: rgba(0, 214, 143, 0.15); color: var(--accent-buy); }
.ema-detail-status.disabled { background: rgba(158,158,158,0.15); color: #9e9e9e; }
.ema-detail-pos, .ema-detail-reason {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.6;
}
.ema-detail-pos .pos-label, .ema-detail-reason .reason-label {
  color: var(--text-muted);
  margin-right: 4px;
}
.ema-detail-pos .pos-value, .ema-detail-reason .reason-value {
  color: var(--text-primary);
  margin-right: 16px;
}
.ema-detail-section {
  margin-top: 16px;
}
.ema-detail-title {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-light);
}
.ema-detail-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 8px;
  font-size: 13px;
}
.ema-detail-row .detail-label {
  color: var(--text-muted);
}
.ema-detail-row .detail-value {
  color: var(--text-primary);
}

/* ========================================
   币种监测模块样式
   ======================================== */

.monitor-card {
  margin-bottom: 16px;
}

/* ========================================
   Buttons - Mobile Optimized
   Touch targets: 44x44pt min (Apple HIG)
   ======================================== */
.btn-primary {
  padding: 12px 20px;
  min-height: 44px;
  background: linear-gradient(135deg, var(--accent-gold) 0%, #FFC400 100%);
  color: #1a1a1a;
  border: none;
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-glow-sm);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  padding: 12px 20px;
  min-height: 44px;
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-btn);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-secondary:active {
  transform: scale(0.97);
}

/* ========================================
   Monitor Empty State - Mobile Optimized
   ======================================== */
.monitor-empty {
  text-align: center;
  padding: 48px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.empty-icon {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon svg {
  color: var(--text-muted);
}

.empty-text {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
  font-weight: 500;
}

.empty-hint {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========================================
   Period Cards - Mobile Optimized
   ======================================== */
.monitor-periods {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.period-card {
  background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  transition: all 0.2s ease;
  box-shadow: var(--shadow-card);
}

.period-card:hover {
  border-color: rgba(255, 214, 0, 0.2);
  box-shadow: var(--shadow-elevated);
}

.period-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}

.period-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-gold);
}

.period-status {
  font-size: 11px;
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--bg-tertiary);
}

.period-status.new-kline {
  color: var(--accent-buy);
  background: rgba(0, 214, 143, 0.15);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.period-status.new-kline svg {
  color: var(--accent-buy);
}

/* 周期标签样式 */
.period-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
}

.period-tag.primary {
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(255, 214, 0, 0.3);
}

.period-tag.secondary {
  background: rgba(100, 100, 100, 0.2);
  color: #888;
  border: 1px solid rgba(100, 100, 100, 0.3);
}

.period-tag.tertiary {
  background: rgba(150, 100, 200, 0.15);
  color: #a0a0c0;
  border: 1px solid rgba(150, 100, 200, 0.3);
}

/* 主要周期卡片高亮 */
.period-card-highlight {
  border: 1px solid rgba(255, 214, 0, 0.25);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(255, 214, 0, 0.05) 100%);
}

.period-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.period-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.period-item {
  display: flex;
  align-items: baseline;
  gap: 4px;
  flex: 1;
  min-width: 60px;
}

.item-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.item-value {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  font-family: var(--font-mono);
}

.item-status {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 2px;
}

/* ========================================
   Trend Styles - Match RSI Page Design
   Using CSS variables for consistency
   ======================================== */

/* 趋势基础样式 */
.item-value.trend {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: inline-block;
}

/* 多头/看涨 - 绿色突出显示 */
.item-value.trend.bullish,
.item-value.trend.多头 {
  background: rgba(0, 214, 143, 0.2) !important;
  color: #00D68F !important;
  border: 1px solid rgba(0, 214, 143, 0.4);
}

/* 空头/看跌 - 红色突出显示 */
.item-value.trend.bearish,
.item-value.trend.空头 {
  background: rgba(255, 77, 109, 0.2) !important;
  color: #FF4D6D !important;
  border: 1px solid rgba(255, 77, 109, 0.4);
}

/* 无趋势/中性 */
.item-value.trend.无趋势,
.item-value.trend.neutral {
  background: rgba(107, 114, 128, 0.15) !important;
  color: #6B7280 !important;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* ========================================
   RSI Indicator Styles - 高可见度
   ======================================== */
.item-value.rsi-overbought {
  background: rgba(255, 77, 109, 0.25) !important;
  color: #FF4D6D !important;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  border: 1px solid rgba(255, 77, 109, 0.5);
}

.item-value.rsi-oversold {
  background: rgba(0, 214, 143, 0.25) !important;
  color: #00D68F !important;
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 700;
  border: 1px solid rgba(0, 214, 143, 0.5);
}

.item-value.rsi-neutral {
  color: var(--text-secondary);
}

/* ========================================
   ADX Status Styles
   ======================================== */
.item-status.adx-strong {
  color: var(--accent-gold);
  font-weight: 600;
  background: rgba(255, 214, 0, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
}

.item-status.adx-weak {
  color: var(--text-muted);
  background: rgba(107, 114, 128, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ========================================
   ATR14% Styles - 波动率风险等级
   ======================================== */
.item-value.atr {
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.item-value.atr.atr-high {
  background: rgba(255, 77, 109, 0.15) !important;
  color: #FF4D6D !important;
  border: 1px solid rgba(255, 77, 109, 0.3);
}

.item-value.atr.atr-medium {
  background: rgba(255, 214, 0, 0.15) !important;
  color: #FFD600 !important;
  border: 1px solid rgba(255, 214, 0, 0.3);
}

.item-value.atr.atr-low {
  background: rgba(0, 214, 143, 0.15) !important;
  color: #00D68F !important;
  border: 1px solid rgba(0, 214, 143, 0.3);
}

/* ========================================
   Amplitude & Change Styles - 振幅涨跌幅
   ======================================== */
.item-value.amplitude {
  font-weight: 600;
  color: var(--text-secondary);
}

.item-value.change {
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}

.item-value.change.change-up {
  background: rgba(0, 214, 143, 0.15) !important;
  color: #00D68F !important;
  border: 1px solid rgba(0, 214, 143, 0.3);
}

.item-value.change.change-down {
  background: rgba(255, 77, 109, 0.15) !important;
  color: #FF4D6D !important;
  border: 1px solid rgba(255, 77, 109, 0.3);
}

/* ========================================
   +DI / -DI Styles - 强势方向突出
   ======================================== */
.item-value.plus-di-high {
  color: #00D68F !important;
  font-weight: 700;
  background: rgba(0, 214, 143, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

.item-value.minus-di-high {
  color: #FF4D6D !important;
  font-weight: 700;
  background: rgba(255, 77, 109, 0.12);
  padding: 1px 4px;
  border-radius: 3px;
}

/* ========================================
   Monitor Info Bar - 一行显示
   ======================================== */
.monitor-info-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.info-symbol {
  font-weight: 700;
  color: var(--accent-gold);
  min-width: 50px;
}

.info-price {
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
  flex: 1;
}

.info-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.info-settings-btn {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: none;
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.info-settings-btn:hover {
  background: rgba(255, 214, 0, 0.25);
  transform: scale(1.05);
}

.info-settings-btn:active {
  transform: scale(0.95);
}

/* ========================================
   Empty Settings Button - 空状态设置按钮
   ======================================== */
.empty-settings-btn {
  margin-top: 16px;
  padding: 10px 20px;
  border: none;
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.empty-settings-btn:hover {
  background: rgba(255, 214, 0, 0.25);
  transform: scale(1.02);
}

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

/* ========================================
   Monitor Coin List - Mobile Optimized
   Touch targets: 44x44pt min (Apple HIG)
   8dp spacing rhythm (Material Design)
   ======================================== */
.monitor-coin-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
  padding: 8px 0;
}

.monitor-coin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  min-height: 52px;  /* Touch target height */
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.monitor-coin-card:hover {
  border-color: var(--primary-color);
  background: var(--bg-hover);
  transform: scale(1.02);  /* Subtle scale feedback */
}

.monitor-coin-card:active {
  transform: scale(0.97);  /* Press feedback */
}

.monitor-coin-card.active {
  border-color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.1);
  box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.2);
}

.coin-symbol {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.coin-change {
  font-size: 12px;
  margin-top: 2px;
  font-weight: 500;
}

.coin-change.up {
  color: #4caf50;
}

.coin-change.down {
  color: #f44336;
}

/* Button touch targets - min 44px height */
.btn-small {
  padding: 8px 12px;
  font-size: 12px;
  min-height: 36px;
}

/* ========================================
   Collapse Button & Modal - Mobile Optimized
   Touch targets: 44x44pt min
   ======================================== */
.admin-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.collapse-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  min-height: 36px;  /* Touch target */
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.collapse-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(var(--primary-color-rgb), 0.05);
}

.collapse-btn:active {
  transform: scale(0.97);  /* Press feedback */
}

.toggle-icon {
  font-size: 10px;
  transition: transform 0.2s ease;
}

/* 确认弹窗样式 */
.monitor-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
}

.monitor-confirm-modal .modal-content {
  background: var(--bg-secondary);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px;
  max-width: 100%;
  width: 100%;
  box-shadow: var(--shadow-elevated);
  border-top: 1px solid var(--border);
  animation: slideUp 0.3s ease;
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-align: center;
}

.modal-body {
  text-align: center;
  margin-bottom: 20px;
}

#confirm-coin-name {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent-gold);
  display: block;
  margin-bottom: 8px;
}

.modal-hint {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.modal-actions button {
  min-width: 88px;
  min-height: 44px;  /* Touch target */
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.modal-actions button:active {
  transform: scale(0.97);  /* Press feedback */
}

/* ========================================
   Coin Select Modal - 币种选择弹窗
   ======================================== */
.coin-select-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1201;
  padding: env(safe-area-inset-top, 0) 16px env(safe-area-inset-bottom, 0) 16px;
}

.coin-select-content {
  background: var(--bg-secondary);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: min(80vh, 560px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  animation: modal-enter 0.25s ease-out;
  overflow: hidden;
}

.coin-select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.coin-select-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modal-close-btn:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.coin-search-area {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.coin-search-area input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.coin-search-area input:focus {
  border-color: var(--accent-gold);
}

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

.coin-select-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  align-content: start;
  min-height: 200px;
  max-height: 400px;
  /* 支持平滑滚动 */
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

.coin-select-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-tertiary);
}

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

/* 弹窗内币种卡片样式 */
.coin-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  min-height: 56px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.coin-card:hover {
  border-color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.08);
  transform: scale(1.02);
}

.coin-card:active {
  transform: scale(0.97);
}

.coin-card.active {
  border-color: var(--accent-gold);
  background: rgba(255, 214, 0, 0.15);
  box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.2);
}

.coin-card-symbol {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.coin-card-change {
  font-size: 11px;
  margin-top: 2px;
}

.coin-card-change.up {
  color: var(--accent-buy);
}

.coin-card-change.down {
  color: var(--accent-sell);
}

/* ========================================
   超买超卖页面 (ob-page)
   精密交易终端风格 - 紧凑卡片 + 底部抽屉详情
   ======================================== */

.ob-subtabs {
  display: flex;
  gap: 8px;
  padding: 12px 12px 0 12px;
}

.ob-subtab {
  flex: 1;
  padding: 10px 0;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ob-subtab.active {
  background: linear-gradient(135deg, rgba(255, 214, 0, 0.18), rgba(255, 214, 0, 0.06));
  color: var(--accent-gold);
  border-color: rgba(255, 214, 0, 0.4);
  font-weight: 600;
}

.ob-filter {
  display: flex;
  gap: 12px;
  padding: 12px;
  flex-wrap: wrap;
}

.ob-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.ob-filter-label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.ob-segment {
  display: flex;
  flex: 1;
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ob-segment::-webkit-scrollbar {
  display: none;
}

.ob-seg-btn {
  flex: 1;
  padding: 6px 4px;
  background: transparent;
  color: var(--text-secondary);
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  min-width: 36px;
}

.ob-seg-btn.active {
  background: var(--bg-elevated);
  color: var(--accent-gold);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.ob-stats-card {
  margin: 0 12px 12px 12px;
}

.ob-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.ob-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  background: var(--bg-tertiary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.ob-stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ob-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ob-stat.overbought .ob-stat-num {
  color: var(--accent-sell);
}

.ob-stat.oversold .ob-stat-num {
  color: var(--accent-buy);
}

.ob-stat.holding .ob-stat-num {
  color: var(--accent-cyan);
}

.ob-list-card {
  margin: 0 12px 80px 12px;
}

.ob-event-list {
  padding: 8px;
  min-height: 200px;
}

.ob-event-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  margin-bottom: 8px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.ob-event-card:hover {
  background: var(--bg-elevated);
  transform: translateX(2px);
}

.ob-event-card.overbought {
  border-left-color: var(--accent-sell);
}

.ob-event-card.oversold {
  border-left-color: var(--accent-buy);
}

.ob-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ob-event-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ob-event-name .ob-event-sub {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 6px;
}

.ob-event-type {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.ob-event-type.overbought {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.ob-event-type.oversold {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.ob-event-middle {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}

.ob-event-rsi {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ob-event-rsi-val {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.ob-event-rsi-val.overbought {
  color: var(--accent-sell);
}

.ob-event-rsi-val.oversold {
  color: var(--accent-buy);
}

.ob-event-timeframe {
  padding: 1px 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  font-size: 10px;
  color: var(--accent-gold);
  font-weight: 500;
}

.ob-event-price {
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.ob-event-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.ob-event-ai {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-style: italic;
}

.ob-event-time {
  flex-shrink: 0;
  margin-left: 8px;
  font-variant-numeric: tabular-nums;
}

.ob-event-status {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 500;
  margin-left: 6px;
}

.ob-event-status.pending {
  background: rgba(255, 214, 0, 0.15);
  color: var(--accent-gold);
}

.ob-event-status.done {
  background: rgba(0, 214, 143, 0.15);
  color: var(--accent-buy);
}

.ob-event-status.failed {
  background: rgba(255, 77, 109, 0.15);
  color: var(--accent-sell);
}

.ob-load-more {
  text-align: center;
  padding: 12px;
}

.ob-load-more .text-btn {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 24px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.ob-load-more .text-btn:hover {
  background: var(--bg-elevated);
  color: var(--accent-gold);
}

.ob-load-more.no-more {
  color: var(--text-muted);
  font-size: 12px;
  padding: 16px;
}

/* 详情底部弹层 */
.ob-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  display: none;
  align-items: flex-end;
  animation: obFadeIn 0.2s ease-out;
}

.ob-detail-overlay.active {
  display: flex;
}

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

.ob-detail-sheet {
  width: 100%;
  max-height: 80vh;
  background: var(--bg-secondary);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: obSlideUp 0.25s ease-out;
}

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

.ob-detail-handle {
  width: 36px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 2px;
  margin: 8px auto 4px auto;
  opacity: 0.5;
}

.ob-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px 16px;
  border-bottom: 1px solid var(--border);
}

.ob-detail-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.ob-detail-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ob-detail-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.ob-detail-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ob-detail-body .ob-detail-section {
  margin-bottom: 16px;
}

.ob-detail-body .ob-detail-section-title {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ob-detail-body .ob-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.ob-detail-body .ob-detail-item {
  background: var(--bg-tertiary);
  padding: 8px 10px;
  border-radius: 6px;
}

.ob-detail-body .ob-detail-item-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.ob-detail-body .ob-detail-item-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ob-detail-body .ob-detail-ai-content {
  background: var(--bg-tertiary);
  padding: 12px;
  border-radius: 8px;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
}

.ob-detail-body .ob-detail-ai-content.empty {
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

.ob-detail-body .ob-detail-loading {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 12px;
}

.ob-detail-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.ob-detail-footer button {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.ob-detail-footer button:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.ob-detail-footer button.primary {
  background: var(--accent-gold);
  color: #000;
  border-color: var(--accent-gold);
}

.ob-detail-footer button.primary:hover {
  background: var(--primary-bright);
}

.ob-detail-footer button.danger {
  color: var(--accent-sell);
  border-color: rgba(255, 77, 109, 0.3);
}

.ob-detail-footer button.danger:hover {
  background: rgba(255, 77, 109, 0.1);
}

.ob-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
}

.ob-empty .ob-empty-icon {
  font-size: 36px;
  margin-bottom: 8px;
  opacity: 0.3;
}

/* ============================================
 * 辅助交易页（h5/#auto-trade-page）
 * ============================================ */
#auto-trade-page .form-group { margin-bottom: 14px; }
#auto-trade-page .form-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted, #888);
  margin-bottom: 6px;
}
#auto-trade-page .form-tip {
  font-size: 11px;
  color: var(--text-muted, #888);
}
#auto-trade-page .stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
}
#auto-trade-page .stepper button {
  width: 32px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: var(--text-primary, #eee);
  font-size: 16px;
  cursor: pointer;
}
#auto-trade-page .stepper button:hover { background: rgba(255, 255, 255, 0.1); }
#auto-trade-page .stepper input {
  width: 80px;
  border: none;
  background: transparent;
  color: var(--text-primary, #eee);
  text-align: center;
  font-size: 13px;
  padding: 6px 0;
  -moz-appearance: textfield;
}
#auto-trade-page .stepper input::-webkit-outer-spin-button,
#auto-trade-page .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#auto-trade-page .chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 0;
}
#auto-trade-page .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  font-size: 12px;
}
#auto-trade-page .chip .x {
  cursor: pointer;
  opacity: 0.6;
  padding: 0 2px;
}
#auto-trade-page .chip .x:hover { opacity: 1; }
#auto-trade-page .radio-card {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary, #eee);
}
#auto-trade-page .radio-card input { accent-color: #6366f1; }
#auto-trade-page .radio-card:has(input:checked) {
  background: rgba(99, 102, 241, 0.15);
  border-color: #6366f1;
}
#auto-trade-page .tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}
#auto-trade-page .tag-info { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; }
#auto-trade-page .tag-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
#auto-trade-page .tag-danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }
#auto-trade-page .tag-warning { background: rgba(234, 179, 8, 0.15); color: #fde047; }
#auto-trade-page .at-log-row {
  padding: 10px 12px;
  border-bottom: 1px solid #1f1f1f;
  font-size: 12px;
  line-height: 1.5;
}
#auto-trade-page .at-log-row .row1 { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#auto-trade-page .at-log-row .row2 { color: var(--text-muted, #888); font-size: 11px; margin-top: 2px; }
#auto-trade-page .at-log-row.failed { background: rgba(239, 68, 68, 0.06); }
#auto-trade-page .at-log-row.manual { background: rgba(234, 179, 8, 0.05); }
#auto-trade-page .at-pick-row {
  display: flex; align-items: center; gap: 8px; padding: 8px 4px;
  border-bottom: 1px solid #1f1f1f; cursor: pointer;
}
#auto-trade-page .at-pick-row:last-child { border-bottom: none; }
#auto-trade-page .at-pick-row input { accent-color: #6366f1; }
#auto-trade-page .at-ws-row {
  display: flex; align-items: center; gap: 8px; padding: 6px 0;
  font-size: 12px; border-bottom: 1px solid #1a1a1a;
}
#auto-trade-page .at-ws-row:last-child { border-bottom: none; }
#auto-trade-page input[type="text"],
#auto-trade-page input[type="number"],
#auto-trade-page select {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a2a2a;
  color: var(--text-primary, #eee);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
}
#auto-trade-page input:focus, #auto-trade-page select:focus {
  outline: none; border-color: #6366f1;
}

/* 交易参数页表单控件（对齐 param-form 暗色主题，修复 select 白底/窄高） */
#trade-param-page input[type="number"],
#trade-param-page select {
  width: 100%;
  height: 44px;
  padding: 0 32px 0 12px;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all 0.15s ease;
}
#trade-param-page input[type="number"] {
  cursor: text;
  padding: 0 12px;
}
/* 隐藏 number 输入框原生上下箭头（暗色主题下丑且不协调，与 .stepper 一致） */
#trade-param-page input[type="number"]::-webkit-outer-spin-button,
#trade-param-page input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
#trade-param-page input[type="number"] {
  -moz-appearance: textfield;
}
#trade-param-page input[type="number"]:hover,
#trade-param-page select:hover {
  border-color: var(--accent-gold);
}
#trade-param-page input[type="number"]:focus,
#trade-param-page select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 2px var(--primary-light);
}
#trade-param-page select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 8px;
}

/* ========================================
 * 个人日程 (v6.9.118)  —  H5 暗色终端主题
 * ======================================== */
.schedule-date-bar {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  padding: 12px 16px; background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 12px;
}
.date-nav-btn {
  width: 32px; height: 32px; border: 1px solid var(--border);
  background: var(--bg-tertiary); border-radius: 50%;
  font-size: 18px; cursor: pointer; color: var(--text-secondary);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.date-nav-btn:hover { background: var(--bg-elevated); color: var(--primary); border-color: var(--primary); }
.date-label { font-size: 15px; font-weight: 500; min-width: 130px; text-align: center; color: var(--text-primary); }

.schedule-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-bottom: 12px;
}
.stat-mini {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 4px; text-align: center;
}
.stat-mini-num { display: block; font-size: 20px; font-weight: 700; line-height: 1.2; color: var(--text-primary); }
.stat-mini-label { font-size: 11px; color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warn { color: var(--warning); }
.text-primary { color: var(--primary); }

.schedule-blocks { display: flex; flex-direction: column; gap: 10px; }
.sched-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  border-left: 4px solid var(--info);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sched-block.is-active {
  border-color: var(--warning);
  box-shadow: 0 0 0 1px var(--warning), 0 0 12px rgba(255, 214, 0, 0.15);
}
.sched-time {
  font-size: 12px; color: var(--text-muted); margin-bottom: 4px;
  display: flex; justify-content: space-between; align-items: center;
}
.sched-title { font-size: 16px; font-weight: 600; margin-bottom: 2px; color: var(--text-primary); }
.sched-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.sched-actions { display: flex; gap: 6px; margin-top: 8px; }
.btn-mini {
  padding: 5px 12px; border-radius: 6px; font-size: 12px;
  border: none; cursor: pointer; font-weight: 500; color: #0A0A0A;
}
.btn-mini.btn-success { background: var(--success); }
.btn-mini.btn-warn { background: var(--bg-tertiary); color: var(--text-muted); border: 1px solid var(--border); }

.badge {
  font-size: 10px; padding: 2px 6px; border-radius: 8px; font-weight: 500;
}
.badge-success { background: rgba(0, 214, 143, 0.15); color: var(--success); }
.badge-warn { background: rgba(255, 77, 109, 0.15); color: var(--danger); }
.badge-active { background: rgba(255, 214, 0, 0.15); color: var(--warning); animation: pulse 1.5s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.empty-placeholder {
  padding: 40px 16px; text-align: center; color: var(--text-muted); font-size: 14px;
}

.menu-icon.schedule {
  background: linear-gradient(135deg, var(--primary), var(--accent-gold-light));
  color: #0A0A0A;
}

/* 套用模板弹窗 (modal-bottom) */
.modal-bottom {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-top-left-radius: 16px; border-top-right-radius: 16px;
  max-height: 80vh; overflow-y: auto;
  z-index: 10001; padding: 0;
  animation: slideUp 0.25s ease;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.6);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.modal-header h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--text-primary); }
.modal-close {
  background: transparent; border: none; font-size: 18px; cursor: pointer; color: var(--text-muted);
  width: 28px; height: 28px;
}
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 16px; }
.modal-body .form-group { margin-bottom: 14px; }
.modal-body label {
  display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 6px;
}
.modal-body .form-control {
  width: 100%; padding: 10px 12px; background: var(--bg-tertiary);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-primary); font-size: 14px; box-sizing: border-box;
  -webkit-appearance: none; appearance: none;
}
.modal-body .form-control:focus { outline: none; border-color: var(--primary); }
.modal-body select.form-control {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23B0B0B0'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px;
}
.modal-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.modal-footer .btn {
  width: 100%; padding: 12px; border-radius: 8px; border: none;
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.modal-footer .btn-primary { background: var(--primary); color: #0A0A0A; }
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 10000;
  backdrop-filter: blur(2px);
}

/* ===== 收益日历 ===== */
.calendar-summary-card {
  padding: 14px 14px 12px;
  margin-bottom: 12px;
}
.calendar-month-bar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.cal-nav-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-tertiary); border: 1px solid var(--border);
  color: var(--text-primary); display: flex; align-items: center; justify-content: center;
  cursor: pointer; padding: 0;
}
.cal-nav-btn:active { transform: scale(0.95); }
.cal-month-title {
  font-size: 16px; font-weight: 600; color: var(--text-primary);
}
.cal-month-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px;
  margin-bottom: 10px;
}
.cal-stat {
  background: var(--bg-tertiary); border-radius: 8px; padding: 8px 6px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.cal-stat-label { font-size: 11px; color: var(--text-muted); }
.cal-stat-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.cal-stat-danger { color: var(--accent-sell); }
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-muted);
}
.cal-legend-item { display: inline-flex; align-items: center; gap: 4px; }
.cal-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
}
.cal-dot-normal  { background: var(--accent-buy); }
.cal-dot-warning { background: var(--accent-gold); }
.cal-dot-danger  { background: var(--accent-sell); }

.calendar-grid-card { padding: 8px; }
.cal-weekdays {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  font-size: 11px; color: var(--text-muted);
  text-align: center; padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.cal-weekdays span { padding: 4px 0; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  width: 100%;
}
.cal-loading {
  grid-column: 1 / -1; padding: 30px 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 13px;
}
.cal-day {
  position: relative;
  background: var(--bg-tertiary);
  border: 0;
  border-radius: 6px;
  padding: 0;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: transform .1s, border-color .1s;
  font-size: 12px;
  color: var(--text-primary);
  overflow: hidden;
  min-width: 0;
  min-height: 50px;
}
.cal-day:active { transform: scale(0.96); }
.cal-day.cal-day-empty {
  background: transparent; border-color: transparent; cursor: default; pointer-events: none;
}
/* 跨月日期：上月末尾/下月开头，仍可点击查收益但样式弱化 */
.cal-day.cal-day-other-month {
  background: var(--bg-secondary);
  opacity: 0.55;
}
.cal-day.cal-day-other-month .cal-day-num { color: var(--text-muted); }
.cal-day.cal-day-other-month .cal-day-pnl { color: var(--text-muted); }
.cal-day.cal-day-today {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary) inset;
}
.cal-day.cal-day-future { opacity: 0.4; pointer-events: none; }
.cal-day.cal-day-status-normal  { background: linear-gradient(180deg, rgba(0,214,143,0.10) 0%, var(--bg-tertiary) 60%); }
.cal-day.cal-day-status-warning { background: linear-gradient(180deg, rgba(255,214,0,0.18) 0%, var(--bg-tertiary) 60%); }
.cal-day.cal-day-status-danger  { background: linear-gradient(180deg, rgba(255,77,109,0.22) 0%, var(--bg-tertiary) 60%); }
.cal-day-num { font-size: 13px; font-weight: 700; line-height: 1; }
.cal-day-pnl {
  font-size: 10px; font-weight: 700; line-height: 1.1;
  white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  letter-spacing: -0.2px;
}
.cal-day-pnl.positive { color: var(--accent-buy); }
.cal-day-pnl.negative { color: var(--accent-sell); }
.cal-day-pnl.zero     { color: var(--text-muted); }
.cal-day-dot {
  position: absolute; top: 4px; right: 4px;
  width: 6px; height: 6px; border-radius: 50%;
  display: none;
}
.cal-day.cal-day-status-normal  .cal-day-dot { background: var(--accent-buy);  display: block; }
.cal-day.cal-day-status-warning .cal-day-dot { background: var(--accent-gold);  display: block; }
.cal-day.cal-day-status-danger  .cal-day-dot { background: var(--accent-sell); display: block; }

/* 当日详情弹窗内容 */
.day-detail-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.day-detail-stat {
  background: var(--bg-tertiary); border-radius: 10px; padding: 10px 12px;
}
.day-detail-stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.day-detail-stat-value { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.day-detail-stat-value.positive { color: var(--accent-buy); }
.day-detail-stat-value.negative { color: var(--accent-sell); }
.day-detail-section-title {
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin: 14px 0 8px;
  padding-bottom: 6px; border-bottom: 1px solid var(--border);
}
.day-detail-pos {
  background: var(--bg-tertiary); border-radius: 8px; padding: 10px 12px;
  margin-bottom: 8px; font-size: 12px;
}
.day-detail-pos-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px;
}
.day-detail-pos-coin { font-weight: 600; color: var(--text-primary); }
.day-detail-pos-pnl { font-weight: 600; }
.day-detail-pos-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  color: var(--text-muted); font-size: 11px;
}
.day-detail-pos-tag {
  display: inline-block; padding: 1px 6px; border-radius: 4px;
  background: var(--bg-secondary); color: var(--text-secondary);
  font-size: 10px; font-weight: 600;
}
.day-detail-pos-tag.tag-long  { color: var(--accent-buy); }
.day-detail-pos-tag.tag-short { color: var(--accent-sell); }
.day-detail-pos-tag.tag-lever { color: var(--accent-gold); }
.day-detail-empty {
  text-align: center; color: var(--text-muted); padding: 30px 0;
  font-size: 13px;
}
.loading-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 30px 0; color: var(--text-muted); font-size: 13px;
}
.spinner {
  display: inline-block; width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 收益日历样式优化(可读性/适配) ===== */
@media (max-width: 380px) {
  .cal-month-stats { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .cal-stat-value { font-size: 13px; }
  .cal-day { padding: 3px 2px 4px; }
  .cal-day-num { font-size: 12px; }
  .cal-day-pnl { font-size: 9px; }
  .day-detail-stat-value-sm { font-size: 13px; }
}
.calendar-summary-card .calendar-month-bar { margin-bottom: 14px; }
.cal-day { box-shadow: 0 1px 2px rgba(0,0,0,0.18); }
.cal-day.cal-day-status-normal  .cal-day-pnl { color: var(--accent-buy); }
.cal-day.cal-day-status-warning .cal-day-pnl { color: var(--accent-gold); }
.cal-day.cal-day-status-danger  .cal-day-pnl { color: var(--accent-sell); }
.cal-day.cal-day-empty { box-shadow: none; }

/* ===== 收益日历 v2 视觉优化 ===== */
.calendar-grid-card { padding: 10px; }
.cal-weekdays { font-weight: 500; }
.cal-grid { gap: 1px; }
.cal-day {
  min-height: 56px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.cal-day-num { font-size: 14px; font-weight: 600; }
.cal-day-pnl { font-size: 11px; font-weight: 700; margin-top: 2px; }
.cal-day-pnl.zero { opacity: 0.4; }
.cal-day.cal-day-future {
  opacity: 0.55;
  background: var(--bg-secondary);
}
.cal-day.cal-day-today {
  border: 2px solid var(--primary);
  box-shadow: 0 0 0 2px rgba(255, 214, 0, 0.25);
}
.cal-day.cal-day-status-normal  { box-shadow: 0 1px 2px rgba(0, 214, 143, 0.25); }
.cal-day.cal-day-status-warning { box-shadow: 0 1px 2px rgba(255, 214, 0, 0.25); }
.cal-day.cal-day-status-danger  { box-shadow: 0 1px 2px rgba(255, 77, 109, 0.3); }
.cal-day-dot { width: 7px; height: 7px; top: 5px; right: 5px; box-shadow: 0 0 4px currentColor; }
.cal-day.cal-day-status-normal  .cal-day-dot { background: var(--accent-buy);  color: var(--accent-buy); }
.cal-day.cal-day-status-warning .cal-day-dot { background: var(--accent-gold);  color: var(--accent-gold); }
.cal-day.cal-day-status-danger  .cal-day-dot { background: var(--accent-sell); color: var(--accent-sell); }
.calendar-summary-card { padding: 14px; }
.cal-month-title { font-size: 18px; letter-spacing: 0.5px; }
.cal-stat { padding: 10px 6px; }
.cal-stat-value { font-size: 16px; }
.cal-stat-danger { color: var(--accent-sell); }

/* ===== 收益日历 v3:修复边框导致的格子错位 ===== */
.cal-day { box-sizing: border-box; }
.cal-day.cal-day-status-normal  { box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.cal-day.cal-day-status-warning { box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.cal-day.cal-day-status-danger  { box-shadow: 0 1px 2px rgba(0,0,0,0.25); }
.cal-day.cal-day-today { box-shadow: 0 0 0 2px var(--primary), 0 1px 6px rgba(255,214,0,0.4); }

/* ===== 收益日历 v4: 优化 1-8 ===== */
.cal-month-stats { grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.cal-month-center {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  flex: 1; min-width: 0;
}
.cal-month-title { cursor: pointer; user-select: none; }
.cal-month-title:hover { color: var(--primary); }
.cal-today-btn {
  display: inline-block;
  background: var(--primary);
  color: #1a1a1a;
  font-size: 11px; font-weight: 600;
  border: none; border-radius: 10px;
  padding: 2px 10px;
  cursor: pointer;
  line-height: 1.4;
}
.cal-today-btn:active { transform: scale(0.95); }

.cal-week-summary {
  grid-column: span 7;
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border-radius: 6px;
  font-size: 12px;
  margin: 2px 0;
}
.cal-week-summary-empty { opacity: 0.5; }
.cal-week-summary-label { color: var(--text-muted); font-size: 11px; }
.cal-week-summary-val { font-weight: 700; }
.cal-week-summary-val.positive { color: var(--accent-buy); }
.cal-week-summary-val.negative { color: var(--accent-sell); }
.cal-week-summary-val.zero { color: var(--text-muted); }

.cal-empty-month {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 0;
  color: var(--text-muted);
}
.cal-empty-icon { font-size: 36px; opacity: 0.6; }
.cal-empty-text { font-size: 14px; font-weight: 600; }
.cal-empty-sub { font-size: 12px; opacity: 0.7; }

/* 月份选择器弹窗 */
.cal-picker-content { max-height: 70vh; }
.cal-picker-year {
  display: flex; align-items: center; justify-content: center; gap: 20px;
  padding: 12px 0;
  font-size: 18px; font-weight: 700;
  color: var(--text-primary);
}
.cal-picker-year-val { min-width: 60px; text-align: center; }
.cal-picker-months {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
  padding: 8px 4px 20px;
}
.cal-picker-month {
  background: var(--bg-tertiary); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 0;
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.cal-picker-month:active { transform: scale(0.96); }
.cal-picker-month.current {
  border-color: var(--primary);
  color: var(--primary);
}
.cal-picker-month.selected {
  background: var(--primary);
  color: #1a1a1a;
  border-color: var(--primary);
}
.cal-picker-month.future {
  opacity: 0.35; pointer-events: none;
}

/* 当日详情增强 */
.day-detail-stats-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px;
}
.day-detail-stat-value-sm { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.4; }
.day-detail-stat-value-sm .positive { color: var(--accent-buy); font-weight: 700; }
.day-detail-stat-value-sm .negative { color: var(--accent-sell); font-weight: 700; }

.day-detail-section-hint { font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px; }

.day-coin-bars {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.day-coin-row {
  display: grid;
  grid-template-columns: 70px 1fr 70px;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
}
.day-coin-name { color: var(--text-primary); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.day-coin-count { font-size: 10px; color: var(--text-muted); font-weight: 400; }
.day-coin-bar { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
.day-coin-bar-fill { height: 100%; border-radius: 3px; transition: width 0.2s; }
.day-coin-bar-fill.positive { background: var(--accent-buy); }
.day-coin-bar-fill.negative { background: var(--accent-sell); }
.day-coin-bar-fill.zero { background: var(--text-muted); }
.day-coin-pnl { font-weight: 600; text-align: right; }
.day-coin-pnl.positive { color: var(--accent-buy); }
.day-coin-pnl.negative { color: var(--accent-sell); }
.day-coin-pnl.zero { color: var(--text-muted); }

.day-detail-pos-extra {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.day-detail-pos-extra-row {
  display: flex; justify-content: space-between;
  padding: 3px 0;
}
.day-detail-pos-extra-val { color: var(--text-primary); font-weight: 500; }
.day-detail-pos-extra-val.positive { color: var(--accent-buy); font-weight: 700; }
.day-detail-pos-extra-val.negative { color: var(--accent-sell); font-weight: 700; }
.day-detail-pos-toggle {
  text-align: center; padding-top: 6px;
  font-size: 11px; color: var(--primary);
  cursor: pointer; user-select: none;
}
.day-detail-pos-toggle:active { opacity: 0.7; }

/* ============ 收益日历 - 优化 9~12：年视图/缓存/账号/导出 ============ */
.cal-view-toggle {
  position: relative;
  transition: all 0.2s ease;
}
.cal-view-toggle.active {
  background: var(--primary);
  color: #1a1a1a;
}

.cal-account-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
}
.cal-account-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.cal-account-select {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 28px 8px 10px;
  font-size: 13px;
  font-weight: 500;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23999'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 16px;
  cursor: pointer;
  min-width: 0;
}
.cal-account-select:focus { outline: none; border-color: var(--primary); }

.cal-cache-hint {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #f59e0b;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 10px;
  text-align: center;
}
.cal-cache-hint a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 500;
  margin-left: 4px;
}

.cal-export-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}
.cal-export-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-tertiary);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-export-btn:active { transform: scale(0.95); background: rgba(64, 158, 255, 0.1); }
.cal-export-btn svg { flex-shrink: 0; }

.calendar-year-card {
  padding: 12px 12px 10px;
}
.cal-year-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 8px;
  background: var(--bg-tertiary);
  border-radius: 8px;
}
.cal-year-sum-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.cal-year-sum-stat {
  text-align: center;
  min-width: 0;
}
.cal-year-sum-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 2px;
  white-space: nowrap;
}
.cal-year-sum-val {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-year-sum-val.positive { color: var(--accent-buy); }
.cal-year-sum-val.negative { color: var(--accent-sell); }

.cal-year-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  text-align: center;
}

.cal-year-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 540px) {
  .cal-year-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .cal-year-grid { grid-template-columns: repeat(4, 1fr); }
}

.cal-year-month {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-year-month:active { transform: scale(0.97); border-color: var(--primary); }
.cal-year-month-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
  line-height: 1.2;
}
.cal-year-month-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}
.cal-year-month-pnl {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cal-year-month-pnl.positive { color: var(--accent-buy); }
.cal-year-month-pnl.negative { color: var(--accent-sell); }
.cal-year-month-pnl.zero { color: var(--text-muted); }

.cal-year-month-mini {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}
.cal-year-month-days-label {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.cal-year-month-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  font-size: 8px;
  line-height: 1;
}
.cal-year-day {
  aspect-ratio: 1.4;
  border-radius: 1px;
  background: var(--bg-secondary);
  transition: all 0.2s;
}
/* 无数据的月份：折叠空白日历网格，节省纵向空间 */
.cal-year-month-days:not(:has(.has-data)) {
  display: none;
}
.cal-year-day.has-data.positive { background: rgba(38, 191, 138, 0.3); }
.cal-year-day.has-data.negative { background: rgba(237, 85, 100, 0.3); }
.cal-year-day.has-data.positive-strong { background: rgba(38, 191, 138, 0.85); }
.cal-year-day.has-data.negative-strong { background: rgba(237, 85, 100, 0.85); }
.cal-year-day.empty { background: transparent; }

.cal-year-month-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.cal-year-month-bar-fill {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 2px;
  transition: all 0.3s;
}
.cal-year-month-bar-fill.positive { left: 50%; background: var(--accent-buy); }
.cal-year-month-bar-fill.negative { right: 50%; background: var(--accent-sell); }

.cal-export-content { max-height: 90vh; overflow-y: auto; }
.cal-export-content .modal-body { padding: 14px; }
.cal-export-actions button {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.cal-export-actions button:active { transform: scale(0.96); }

/* ========================================
   设置页 - 主模型选择（对齐后台 aiSettings 运行时参数）
   ======================================== */
#settings-page .settings-channel-group { margin-bottom: 12px; }
#settings-page .settings-channel-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  padding: 8px 4px 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#settings-page .settings-channel-header::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--primary);
  border-radius: 2px;
}
#settings-page .settings-model-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
#settings-page .settings-model-row:active { transform: scale(0.99); }
#settings-page .settings-model-row.selected {
  background: rgba(99, 102, 241, 0.08);
  border-color: var(--primary);
}
#settings-page .settings-model-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: all 0.15s;
}
#settings-page .settings-model-row.selected .settings-model-radio {
  border-color: var(--primary);
}
#settings-page .settings-model-row.selected .settings-model-radio::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: var(--primary);
  border-radius: 50%;
}
#settings-page .settings-model-info { flex: 1; min-width: 0; }
#settings-page .settings-model-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  word-break: break-all;
}
#settings-page .settings-model-value {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
  margin-top: 2px;
  word-break: break-all;
}
#settings-page .settings-model-check {
  color: var(--primary);
  font-size: 18px;
  opacity: 0;
  flex-shrink: 0;
}
#settings-page .settings-model-row.selected .settings-model-check { opacity: 1; }
#settings-page .settings-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ========================================
   桌面浏览器模拟手机壳（≥1024px 触发）
   手机 APK 视窗 < 1024px，不受影响
   ======================================== */
@media (min-width: 1024px) {
  html, body {
    background: #050505;
    min-height: 100vh;
  }
  body {
    background:
      radial-gradient(ellipse at top, rgba(255, 214, 0, 0.04), transparent 60%),
      #050505;
  }
  #app {
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--bg-primary);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.05),
      0 0 60px rgba(0, 0, 0, 0.6),
      0 20px 80px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow-x: hidden;
  }
  /* 顶部状态栏装饰条，模拟手机 */
  #app::before {
    content: '';
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
    z-index: 9999;
    pointer-events: none;
  }
  /* 底部留白，避免阴影被裁切 */
  body::after {
    content: '';
    display: block;
    height: 40px;
  }
  /* 固定定位元素（header/bottom-nav/drawer）也要限制在 420px 容器内 */
  .header,
  .bottom-nav {
    left: 50% !important;
    right: auto !important;
    width: 420px !important;
    transform: translateX(-50%) !important;
  }
  .left-drawer {
    left: calc(50% - 210px) !important;
  }
  /* 模态遮罩也限制在 420px 内 */
  .modal,
  .detail-modal,
  .toast {
    left: 50% !important;
    right: auto !important;
    width: 420px !important;
    max-width: 420px !important;
    transform: translateX(-50%) !important;
  }
  .modal-overlay,
  .drawer-overlay,
  .detail-modal-overlay {
    left: calc(50% - 210px) !important;
    right: calc(50% - 210px) !important;
    width: 420px !important;
  }
}

/* ========================================
   统一底部弹窗（app sheet）
   以日历弹窗为标准的底部上滑弹框：
   - .modal / .detail-modal / .coin-select-modal / .monitor-confirm-modal 底部对齐
   - 弹窗内容统一顶部圆角 + 上滑入场 + 底部安全区
   - 下滑(侧滑)关闭、点背景关闭 由 js/app.js 的 openSheet/closeModal 统一处理
   ======================================== */
.modal,
.detail-modal,
.coin-select-modal,
.monitor-confirm-modal {
  align-items: flex-end !important;
  padding: 0 !important;
}

.modal > .modal-content,
.detail-modal > .detail-modal-content,
.coin-select-modal > .coin-select-content,
.monitor-confirm-modal > .modal-content {
  border-radius: 20px 20px 0 0 !important;
  border-bottom: none !important;
  animation: sheet-slide-up 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes sheet-slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* 下滑关闭时的下落态（由 js 动态添加） */
.sheet-closing {
  transition: transform 0.22s ease-in !important;
  transform: translateY(100%) !important;
}

