/* simulation-square.css - 现代化炒股广场样式 */
:root {
  /* 主色调定义 */
  --primary-gradient: linear-gradient(135deg, #4299e1 0%, #38a169 100%);
  --secondary-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  
  /* 浅色主题变量 */
  --bg-gradient: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border-color: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.04);
  --shadow-color: rgba(0, 0, 0, 0.08);
  --shadow-light: rgba(0, 0, 0, 0.06);
  --surface-1: #f1f5f9;
  --surface-2: #f8fafc;
  --overlay-bg: rgba(0, 0, 0, 0.6);
  
  /* 图表容器样式 */
  --chart-container-bg: #f8fafc;
  --chart-border: #e2e8f0;
  --chart-frame-bg: rgba(241, 245, 249, 0.8);
}

/* Dark Mode 变量 */
body.dark-mode {
  --bg-gradient: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  --card-bg: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255, 255, 255, 0.05);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-light: rgba(0, 0, 0, 0.2);
  --surface-1: #334155;
  --surface-2: #475569;
  --overlay-bg: rgba(0, 0, 0, 0.8);
  
  /* 图表容器暗色样式 */
  --chart-container-bg: #334155;
  --chart-border: #475569;
  --chart-frame-bg: rgba(30, 41, 59, 0.8);
}

/* 基础容器 */
.swtool-unified-simulation-square {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  background: var(--bg-gradient);
  min-height: 100vh;
  color: var(--text-primary);
}

/* 头部样式 */
.unified-square-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.unified-square-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, #4299e1, #38a169);
  border-radius: 3px;
}

.square-title {
  font-size: 36px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.square-description {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
  font-weight: 400;
}

/* 视图切换样式 - 复用按钮基础样式 */
.view-tabs {
  display: inline-flex;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 4px 20px var(--shadow-color);
  margin-bottom: 30px;
  border: 1px solid var(--border-light);
}

.btn-base {
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0);
}

.btn-base::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.btn-base > * {
  position: relative;
  z-index: 2;
}

.btn-base:hover {
  transform: translateY(-1px);
}

/* 视图标签 */
.view-tab {
  padding: 14px 28px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0);
}

.view-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.view-tab > * {
  position: relative;
  z-index: 2;
}

.view-tab:not(.active):not(:hover) {
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.1);
}

.view-tab:hover {
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.2), 0 2px 8px var(--shadow-light);
}

.view-tab:hover::before {
  opacity: 0.05;
}

.view-tab.active {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 4px 20px rgba(66, 153, 225, 0.3);
  border: 2px solid transparent;
}

.view-tab.active::before {
  display: none;
}

.view-tab.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(66, 153, 225, 0.4);
}

.view-tab.external-link {
  background: var(--secondary-gradient);
  color: white;
  margin-left: 10px;
  padding: 14px 24px;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.view-tab.external-link:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(245, 158, 11, 0.4), inset 0 0 0 1px rgba(245, 158, 11, 0.3);
}

/* 徽章样式 */
.follow-count-badge {
  background: #ef4444;
  color: white;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  margin-left: 6px;
  font-weight: 700;
  min-width: 24px;
  display: inline-block;
  text-align: center;
  animation: badge-pulse 2s infinite;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* 控制区域样式 */
.unified-square-controls {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 6px 25px var(--shadow-light);
  border: 1px solid var(--border-light);
}

.controls-main-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 20px;
  flex-wrap: wrap;
}



.sort-btn {
  padding: 12px 24px;
  background: var(--surface-1);
  border: 2px solid transparent;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.1);
}

.sort-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sort-btn > * {
  position: relative;
  z-index: 1;
}

.sort-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px var(--shadow-light), inset 0 0 0 1px rgba(66, 153, 225, 0.2);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.sort-btn:hover::before {
  opacity: 0.05;
}

.sort-btn.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 20px rgba(66, 153, 225, 0.3);
}

.sort-btn.active::before {
  display: none;
}

.sort-btn.active:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(66, 153, 225, 0.4);
}

/* 搜索框样式 - 修复按钮跑出搜索框的问题 */
.following-search-container {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  position: relative;
}

.search-box {
  position: relative;
  background: var(--card-bg);
  border-radius: 12px;
  border: 2px solid var(--chart-border);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 0 0 1px rgba(231, 235, 238, 0.1);
  display: flex;
  align-items: center;
  width: 100%;
}

.search-box:focus-within {
  border-color: #4299e1;
  box-shadow: 0 4px 20px rgba(66, 153, 225, 0.15), inset 0 0 0 1px rgba(66, 153, 225, 0.2);
  transform: translateY(-1px);
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 15px 20px;
  border: none;
  outline: none;
  font-size: 15px;
  color: var(--text-primary);
  background: transparent;
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
}

.search-btn {
  padding: 0 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  flex-shrink: 0;
}

.search-btn:hover {
  color: #4299e1;
}

.clear-search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 5px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-search-btn:hover {
  color: #ef4444;
  transform: scale(1.1);
}

/* 修复搜索样式 - 还原到原来的样式 */
.search-container {
  width: 100%;
  max-width: 800px;
  margin: 30px auto;
  text-align: center;
}

.search-box-wide {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 4px 15px var(--shadow-color);
  border: 2px solid var(--chart-border);
  transition: all 0.3s ease;
}

.search-box-wide:focus-within {
  border-color: #4299e1;
  box-shadow: 0 6px 20px rgba(66, 153, 225, 0.15), inset 0 0 0 1px rgba(66, 153, 225, 0.2);
  transform: translateY(-2px);
}

.search-input-wide {
  flex: 1;
  min-width: 0;
  padding: 15px 20px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
}

.search-input-wide::placeholder {
  color: var(--text-muted);
}

/* 按钮组样式 */
.search-button-group {
  display: flex;
  gap: 8px;
}


/* 暗色模式下的模拟交易按钮 */
body.dark-mode .trade-btn-wide:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.clear-btn-wide {
  padding: 12px 20px;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 2px solid var(--chart-border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.clear-btn-wide:hover {
  background: var(--surface-1);
  color: #e53e3e;
  border-color: #fc8181;
}

/* 搜索提示 */
.search-hint {
  margin-top: 10px;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  opacity: 0.8;
}


/* 统计信息样式 */
.controls-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-1) 100%);
  border-radius: 12px;
  border: 1px solid var(--chart-border);
  font-size: 15px;
  color: var(--text-secondary);
  gap: 20px;
  flex-wrap: wrap;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.05);
}

.controls-info .total-users {
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.controls-info .total-users strong {
  font-size: 20px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.controls-info .page-info {
  color: var(--text-secondary);
  font-weight: 500;
}

.controls-info .stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--chart-border);
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.05);
}

.controls-info .stat-item strong {
  font-weight: 700;
  color: #10b981;
}

/* 用户卡片网格 */
.users-grid-container {
  position: relative;
  min-height: 400px;
}

.users-grid {
  display: grid;
  gap: 25px;
  margin-bottom: 40px;
}

/* 用户卡片样式 */
.user-card {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 0;
  box-shadow: 0 8px 30px var(--shadow-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.user-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #4299e1, #38a169);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  border-color: #c5d3e8;
}

.user-card:hover::before {
  opacity: 1;
}

/* 用户排名徽章 */
.user-rank {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: var(--secondary-gradient);
  color: white;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  z-index: 2;
}

.user-rank.rank-1 {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  box-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
}

.user-rank.rank-2 {
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%);
  box-shadow: 0 4px 20px rgba(156, 163, 175, 0.4);
}

.user-rank.rank-3 {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: 0 4页边空白: 20px rgba(249, 115, 22, 0.4);
}

/* 卡片顶部区域 */
.user-card-top {
  padding: 30px 25px 20px;
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--card-bg) 100%);
  text-align: center;
  border-bottom: 1px solid var(--border-light);
}

.user-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 15px;
  border: 4px solid var(--card-bg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
}

.user-avatar::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  padding: 4px;
  background: var(--primary-gradient);
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  text-align: center;
}

.user-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.2px;
  padding: 0 10px;
}

.user-bio {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 15px;
  min-height: 40px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding: 0 15px;
}

.follow-time, .followers-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 12px;
  background: var(--surface-1);
  border-radius: 8px;
  margin: 0 4px;
  font-weight: 500;
}

/* 卡片中部 - 统计数据 */
.user-card-middle {
  padding: 20px 25px;
}

.user-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.stat-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  justify-content: center; /* 新增：水平居中 */
  align-items: baseline; /* 保持垂直对齐 */
  gap: 5px;
  padding: 5px 0;
  text-align: center; /* 新增：确保文本居中 */
}

.stat-value small {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
  margin-left: 2px;
}

.profit-positive {
  color: #ef4444 !important;
  animation: profit-pulse 2s infinite;
}

.profit-negative {
  color: #10b981 !important;
}

.profit-neutral {
  color: var(--text-secondary) !important;
}

@keyframes profit-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* 策略图表容器 */
.user-nav-chart {
  position: relative;
  margin: 15px 0;
  padding: 15px;
  background: var(--chart-container-bg);
  border-radius: 12px;
  border: 1px solid var(--chart-border);
  overflow: hidden;
}

/* 策略图浅色框框样式 */
.chart-container {
  position: relative;
  width: 100%;
  height: 120px;
  background: var(--chart-frame-bg);
  border-radius: 8px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

body.dark-mode .chart-container {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-user::before,
.legend-hs300::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border-radius: 2px;
}

.legend-user::before {
  background-color: #e27924;
}

.legend-hs300::before {
  background-color: #2196F3;
}

/* 卡片底部 - 操作按钮 */
.user-card-bottom {
  padding: 20px 25px 25px;
  border-top: 1px solid var(--border-light);
}

.user-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.action-btn {
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.3px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.03);
}

.view-btn {
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  color: white;
}

.view-btn:hover {
  background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(49, 130, 206, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.follow-btn {
  background: var(--surface-2);
  color: var(--text-secondary);
  border-color: var(--chart-border);
}

.follow-btn:hover {
  background: var(--surface-1);
  border-color: var(--border-color);
  transform: translateY(-2px);
  color: var(--text-primary);
  box-shadow: 0 4px 12px var(--shadow-light), inset 0 0 0 1px rgba(66, 153, 225, 0.1);
}

.follow-btn.following {
  background: var(--success-gradient);
  color: white;
  border: none;
}

.follow-btn.following:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

/* 加载状态 */
.loading-container {
  text-align: center;
  padding: 100px 20px;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--surface-1);
  border-top: 3px solid #4299e1;
  border-radius: 50%;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  margin: 0 auto 25px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-container p {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
  background: var(--card-bg);
  border-radius: 20px;
  box-shadow: 0 8px 30px var(--shadow-light);
  border: 2px dashed var(--chart-border);
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.5;
  background: linear-gradient(135deg, var(--text-muted) 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state p {
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-weight: 600;
  padding: 0 20px;
}

.empty-state .empty-hint {
  font-size: 14px;
  opacity: 0.8;
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
  padding: 0 20px;
}

/* 分页样式 */
.square-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  padding: 30px 0;
  margin-top: 20px;
  border-top: 1px solid var(--border-light);
}

.pagination-btn {
  padding: 14px 28px;
  background: var(--card-bg);
  border: 2px solid var(--chart-border);
  border-radius: 10px;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 120px;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.05);
}

.pagination-btn:hover:not(:disabled) {
  border-color: #4299e1;
  color: #4299e1;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(66, 153, 225, 0.15), inset 0 0 0 1px rgba(66, 153, 225, 0.1);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-numbers {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0 20px;
}

.page-number {
  padding: 12px 18px;
  background: var(--card-bg);
  border: 2px solid var(--chart-border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 48px;
  text-align: center;
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.05);
}

.page-number:hover {
  background: var(--surface-2);
  border-color: var(--border-color);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.1);
}

.page-number.active {
  background: var(--primary-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(66, 153, 225, 0.3);
}

.page-dots {
  padding: 12px 8px;
  color: var(--text-muted);
  font-weight: 700;
}

/* 通知消息 */
.follow-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 10000;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 380px;
  border: 1px solid var(--border-light);
}

.follow-notification.show {
  transform: translateX(0);
}

.follow-notification-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  font-weight: bold;
}

.follow-notification-icon.success {
  background: var(--success-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.follow-notification-icon.error {
  background: var(--danger-gradient);
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.follow-notification-content {
  flex: 1;
  min-width: 0;
}

.follow-notification-title {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-size: 16px;
}

.follow-notification-message {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

/* 模态框样式 - 解决手机端弹窗问题 */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: var(--overlay-bg);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-content {
  background-color: var(--card-bg);
  margin: 2vh auto;
  width: 90%;
  max-width: 800px;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* 模态框头部固定，内容可滚动 */
.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--chart-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--primary-gradient);
  border-radius: 20px 20px 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
  flex-shrink: 0;
}

.modal-title {
  color: white;
  font-size: 24px;
  margin: 0;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* 关闭按钮优化 - 确保在手机端容易找到 */
.modal-close {
  color: white;
  font-size: 28px;
  font-weight: 300;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  position: relative;
  z-index: 11;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.modal-body {
  padding: 32px;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 详情页图表容器 */
.detail-chart-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 30px;
  box-shadow: 0 4px 20px var(--shadow-light);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

/* 添加浅色框框样式 */
.detail-chart-container::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  background: var(--chart-frame-bg);
  border-radius: 8px;
  z-index: 0;
  pointer-events: none;
}

.chart-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.chart-wrapper {
  height: 400px;
  width: 100%;
  position: relative;
  z-index: 1;
  background: transparent;
}

/* 图表统计信息 */
.chart-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  padding: 15px;
  background: var(--surface-1);
  border-radius: 12px;
  border: 1px solid var(--chart-border);
  position: relative;
  z-index: 1;
}

/* 图表加载状态 */
.chart-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  color: #666;
  font-size: 14px;
  border-radius: 8px;
}

body.dark-mode .chart-loading-overlay {
  background: rgba(30, 41, 59, 0.9);
  color: var(--text-secondary);
}

/* 图表控制按钮 */
.chart-range-select {
  padding: 10px 16px;
  border: 2px solid var(--chart-border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--card-bg);
  color: var(--text-primary);
  min-width: 120px;
  transition: all 0.3s ease;
}

.chart-range-select:focus {
  border-color: #4299e1;
  outline: none;
}

.refresh-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #87CEEB 0%, #5cb3e6 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.3s ease;
}

.refresh-btn:hover {
  background: linear-gradient(135deg, #5cb3e6 0%, #4299e1 100%);
  transform: translateY(-2px);
}

/***************************/
/* 交易列表样式 */
.transactions-list {
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-light);
  border: 1px solid var(--border-light);
}

/* 交易表头 */
.transaction-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  background: var(--surface-1);
  border-bottom: 2px solid var(--chart-border);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

/* 交易项 */
.transaction-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-light);
}

.transaction-item:last-child {
  border-bottom: none;
}

.transaction-item:hover {
  background: var(--surface-2);
}

/* 单元格宽度与表头对齐 */
.transaction-header .transaction-time,
.transaction-item .transaction-time {
  width: 120px;
}

.transaction-header .transaction-symbol,
.transaction-item .transaction-symbol {
  width: 100px;
  font-weight: 600;
  color: var(--text-primary);
}

.transaction-header .transaction-type,
.transaction-item .transaction-type {
  width: 80px;
}

.transaction-header .transaction-quantity,
.transaction-item .transaction-quantity {
  flex: 1;
  text-align: right;
}

.transaction-header .transaction-price,
.transaction-item .transaction-price {
  width: 100px;
  text-align: right;
  color: var(--text-primary);
  font-weight: 600;
}

/* 交易类型颜色 */
.transaction-type {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.transaction-type.buy,
.transaction-type.open_long {
  background: rgba(46, 125, 50, 0.1);
  color: #2e7d32;
}

.transaction-type.sell,
.transaction-type.close_long {
  background: rgba(198, 40, 40, 0.1);
  color: #c62828;
}

.transaction-type.open_short,
.transaction-type.close_short {
  background: rgba(239, 108, 0, 0.1);
  color: #ef6c00;
}

.square-sort-controls {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
  padding: 15px 0;
}

.sort-buttons {
  display: flex;
  justify-content: center;
  width: 100%;
}

.view-mode-switcher {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  align-items: center;
  padding: 15px;
  background: var(--surface-1);
  border-radius: 12px;
  border: 1px solid var(--chart-border);
  justify-content: center;
  width: fit-content;  /* 添加这行，让容器宽度根据内容自适应 */
  margin: 0 auto;      /* 添加这行，水平居中 */
}

/* 响应式设计 */
@media (max-width: 1200px) {
  .users-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .swtool-unified-simulation-square {
    padding: 20px 15px;
  }
  
  .square-title {
    font-size: 28px;
  }
  
  .users-grid {
    grid-template-columns: 1fr !important;
    gap: 20px;
  }
  .square-sort-controls {
    display: flex;
    justify-content: center;
    width: 100%;
}
  .view-tabs {
    flex-direction: column;
    width: 100%;
  }
  
  .view-tab {
    width: 100%;
    justify-content: center;
    padding: 16px;
  }
  
  .view-tab.external-link {
    margin-left: 0;
    margin-top: 10px;
  }
  
  .controls-main-area {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .sort-buttons {
    display: flex;
    justify-content: center;
    width: 100%;
}
  
  .following-search-container {
    max-width: 100%;
  }
  
  .controls-info {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .controls-info .stat-item {
    width: 100%;
    justify-content: center;
  }
  
  .square-pagination {
    flex-direction: column;
    gap: 15px;
  }
  
  .pagination-numbers {
    order: 1;
    margin: 10px 0;
  }
  
  .pagination-btn.prev {
    order: 2;
  }
  
  .pagination-btn.next {
    order: 3;
  }
  
  .user-card {
    margin: 0 10px;
  }
  
  .user-card-top {
    padding: 25px 20px 15px;
  }
  
  .user-card-middle {
    padding: 15px 20px;
  }
  
  .user-card-bottom {
    padding: 15px 20px 20px;
  }
  
  /* 手机端模态框优化 */
  .modal-content {
    width: 95%;
    margin: 10px auto;
    max-height: calc(100vh - 20px);
    border-radius: 16px;
  }
  
  .modal-header {
    padding: 20px;
    position: sticky;
    top: 0;
  }
  
  .modal-title {
    font-size: 20px;
  }
  
  .modal-close {
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .chart-wrapper {
    height: 300px;
  }
  
  .chart-controls {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }
  
  .chart-range-select,
  .refresh-btn {
    width: 100%;
  }
  
  .chart-stats {
    grid-template-columns: 1fr;
  }
  
  .detail-chart-container {
    padding: 20px;
  }
  
  .detail-chart-container::before {
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
  }
  
  /* 手机端搜索框优化 */
  .search-box-wide {
    flex-direction: column;
    gap: 10px;
  }
  
  .search-input-wide,
  .search-btn-wide,
  .trade-btn-wide,
  .clear-btn-wide {
    width: 100%;
  }
  
  .search-button-group {
    width: 100%;
    flex-direction: column;
    gap: 8px;
  }
  
  /* 手机端 view-mode-switcher 优化 */
  .view-mode-switcher {
    gap: 8px;
    padding: 10px;
  }
}

@media (max-width: 480px) {
  .square-title {
    font-size: 24px;
  }
  
  .user-actions {
    grid-template-columns: 1fr;
  }
  
  .user-stats {
    grid-template-columns: 1fr;
  }
  
  .user-rank {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }
  
  .action-btn {
    padding: 12px;
    font-size: 13px;
  }
  
  .stat-value {
    font-size: 16px;
  }
  
  .user-name {
    font-size: 16px;
    padding: 0 8px;
  }
  
  .user-bio {
    padding: 0 10px;
  }
  
  .chart-container {
    height: 100px;
    padding: 8px;
  }
  
  .transaction-header,
  .transaction-item {
    padding: 12px 15px;
    font-size: 12px;
  }
  
  .transaction-header .transaction-time,
  .transaction-item .transaction-time {
    width: 100px;
  }
  
  .transaction-header .transaction-symbol,
  .transaction-item .transaction-symbol {
    width: 80px;
  }
  
  .transaction-header .transaction-type,
  .transaction-item .transaction-type {
    width: 70px;
  }
  
  .transaction-header .transaction-price,
  .transaction-item .transaction-price {
    width: 80px;
  }
}

/* 适配CSS预处理器不支持@extend的情况 */
.btn-base, .view-tab, .sort-btn, .action-btn, .pagination-btn, .refresh-btn {
  box-sizing: border-box;
}

/* 修复暗色模式下的额外问题 */
body.dark-mode .user-card:hover {
  border-color: rgba(96, 165, 250, 0.3);
}

body.dark-mode .follow-notification {
  background: var(--card-bg);
  border-color: var(--border-light);
}


body.dark-mode .clear-btn-wide:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* ============================================= */
/* 关注列表卡片净值图专用样式 - 与炒股广场完全一致 */
/* ============================================= */

/* 图表容器 - 确保在卡片内正确显示 */
.user-nav-chart {
  position: relative;
  margin: 15px 25px;
  padding: 0;
  background: transparent;
  border: none;
  overflow: hidden;
  height: 120px;
}

/* 图表画布容器 */
.user-nav-chart .chart-container {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--chart-frame-bg);
  border-radius: 8px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.dark-mode .user-nav-chart .chart-container {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* 图表画布 */
.user-nav-chart .chart-container canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  border-radius: 4px;
}

/* 图表加载状态 */
.user-nav-chart .chart-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 12px;
  z-index: 5;
  border-radius: 8px;
}

body.dark-mode .user-nav-chart .chart-loading {
  background: rgba(30, 41, 59, 0.9);
  color: var(--text-secondary);
}

/* 图表悬停提示 */
.user-nav-chart:hover .chart-container {
  box-shadow: inset 0 0 0 1px rgba(66, 153, 225, 0.2);
}

.user-card:hover .user-nav-chart .chart-container {
  background: linear-gradient(180deg, var(--chart-frame-bg) 0%, rgba(255, 255, 255, 0.1) 100%);
}

body.dark-mode .user-card:hover .user-nav-chart .chart-container {
  background: linear-gradient(180deg, var(--chart-frame-bg) 0%, rgba(66, 153, 225, 0.05) 100%);
}

/* 图表图例 - 如果需要显示 */
.user-nav-chart .chart-legend {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-secondary);
  opacity: 0.8;
  padding: 0 5px;
}

.user-nav-chart .chart-legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.user-nav-chart .legend-user::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #dc2626;
  border-radius: 2px;
  margin-right: 4px;
}

.user-nav-chart .legend-hs300::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  background-color: #2196F3;
  border-radius: 2px;
  margin-right: 4px;
  opacity: 0.7;
}

/* 图表收益率显示 */
.user-nav-chart .chart-return {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  z-index: 2;
}

.user-nav-chart .chart-return.positive {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.user-nav-chart .chart-return.negative {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

/* 图表日期范围显示 */
.user-nav-chart .chart-date-range {
  position: absolute;
  bottom: 5px;
  left: 10px;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.7;
  z-index: 2;
}

/* 图表网格线样式 */
.user-nav-chart .chart-grid {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  pointer-events: none;
  z-index: 1;
}

.user-nav-chart .chart-grid-line {
  position: absolute;
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .user-nav-chart .chart-grid-line {
  background: rgba(255, 255, 255, 0.05);
}

.user-nav-chart .chart-grid-line.horizontal {
  left: 0;
  right: 0;
  height: 1px;
}

.user-nav-chart .chart-grid-line.vertical {
  top: 0;
  bottom: 0;
  width: 1px;
}

/* 图表数据点标记 */
.user-nav-chart .chart-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  z-index: 3;
  pointer-events: none;
}

.user-nav-chart .chart-dot.start {
  background-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3);
}

.user-nav-chart .chart-dot.end {
  background-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .user-nav-chart {
      margin: 12px 20px;
      height: 100px;
  }
  
  .user-nav-chart .chart-container {
      padding: 8px;
  }
  
  .user-nav-chart .chart-return {
      font-size: 10px;
      top: 4px;
      right: 8px;
  }
  
  .user-nav-chart .chart-date-range {
      font-size: 9px;
      bottom: 4px;
      left: 8px;
  }
}

@media (max-width: 480px) {
  .user-nav-chart {
      margin: 10px 15px;
      height: 90px;
  }
  
  .user-nav-chart .chart-container {
      padding: 6px;
  }
  
  .user-nav-chart .chart-legend {
      font-size: 10px;
      gap: 10px;
  }
  
  .user-nav-chart .legend-user::before,
  .user-nav-chart .legend-hs300::before {
      width: 8px;
      height: 8px;
  }
}

/* 图表动画效果 */
@keyframes chartDraw {
  0% {
      transform: scaleX(0);
      opacity: 0;
  }
  100% {
      transform: scaleX(1);
      opacity: 1;
  }
}

.user-nav-chart canvas {
  animation: chartDraw 0.8s ease-out forwards;
}

/* 图表悬停交互效果 */
.user-nav-chart:hover .chart-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.05) 0%, rgba(56, 161, 105, 0.05) 100%);
  border-radius: 8px;
  pointer-events: none;
}

body.dark-mode .user-nav-chart:hover .chart-container::after {
  background: linear-gradient(135deg, rgba(66, 153, 225, 0.1) 0%, rgba(56, 161, 105, 0.1) 100%);
}

/* 图表工具提示样式 */
.user-nav-chart .chart-tooltip {
  position: absolute;
  background: var(--card-bg);
  border: 1px solid var(--chart-border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-primary);
  box-shadow: 0 4px 15px var(--shadow-color);
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  max-width: 200px;
}

.user-nav-chart .chart-tooltip.show {
  opacity: 1;
}

.user-nav-chart .chart-tooltip .tooltip-date {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.user-nav-chart .chart-tooltip .tooltip-value {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 2px;
}

.user-nav-chart .chart-tooltip .tooltip-value .label {
  color: var(--text-secondary);
  font-size: 10px;
}

.user-nav-chart .chart-tooltip .tooltip-value .value {
  font-weight: 600;
  color: var(--text-primary);
}

.user-nav-chart .chart-tooltip .tooltip-value.user-value .value {
  color: #dc2626;
}

.user-nav-chart .chart-tooltip .tooltip-value.hs300-value .value {
  color: #2196F3;
}

/* 确保图表在卡片中的层次结构正确 */
.user-card .user-nav-chart {
  order: 4; /* 放在用户信息之后，操作按钮之前 */
}

.user-card:hover .user-nav-chart {
  transform: translateY(-2px);
  transition: transform 0.3s ease;
}
/* 基础按钮样式 - 统一所有按钮的基础样式 */
.btn-base-wide {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* 搜索按钮 - 蓝色 */
.search-btn-wide {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;  /* 默认就居中 */
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
  outline: none;
}

/* 模拟交易按钮 - 绿色 */
.trade-btn-wide {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;  /* 默认就居中 */
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.search-btn-wide:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.5);
}

.search-btn-wide:hover {
  background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
  border: none;
  color: #ffffff;
}

/* 模拟交易按钮 - 绿色 */
.trade-btn-wide {
  padding: 12px 25px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.trade-btn-wide:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  color: #ffffff;
  text-decoration: none;
  border: none;
}

/* 暗色模式下的搜索按钮悬停效果 */
body.dark-mode .search-btn-wide:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
  border: none;
  color: #ffffff;
}

/* 暗色模式下的模拟交易按钮 */
body.dark-mode .trade-btn-wide:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  color: #ffffff;
}

/*一键跟单*/
/* 跟单按钮样式 - 与右上角数字颜色一致 */
/* 跟单按钮样式 - 与右上角数字高度对齐 */
.card-corner-buttons {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 15;
}
/* 跟单按钮样式 - 强制与右上角数字高度对齐 */
.card-corner-buttons .copy-trade-btn,
.copy-trade-btn {
  background: linear-gradient(135deg, #3182ce 0%, #3182ce 100%) !important;
  color: white !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 8px 16px !important;
  height: 40px !important;
  margin-top: 5px !important;  /* 使用margin-top代替top */
  min-height: 40px !important;
  max-height: 40px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3) !important;
  transition: all 0.2s ease !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  margin: 0 !important;
  width: auto !important;
  box-sizing: border-box !important;
}

/* 确保图标大小也适应 */
.card-corner-buttons .copy-trade-btn i,
.copy-trade-btn i {
  font-size: 12px !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
}

/* 悬停状态 */
.card-corner-buttons .copy-trade-btn:hover:not(:disabled),
.copy-trade-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4) !important;
}

/* 禁用状态 */
.card-corner-buttons .copy-trade-btn:disabled,
.card-corner-buttons .copy-trade-btn.guest-disabled,
.card-corner-buttons .copy-trade-btn.vip-disabled,
.copy-trade-btn:disabled,
.copy-trade-btn.guest-disabled,
.copy-trade-btn.vip-disabled {
  background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%) !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  box-shadow: none !important;
}

/* 深色模式适配 */
body.dark-mode .card-corner-buttons .copy-trade-btn,
body.dark-mode .copy-trade-btn {
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2) !important;
}

body.dark-mode .card-corner-buttons .copy-trade-btn:hover:not(:disabled),
body.dark-mode .copy-trade-btn:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
}


/* VIP禁用按钮样式 */
.copy-trade-btn.vip-disabled {
  background: linear-gradient(135deg, #cbd5e0 0%, #a0aec0 100%);
  cursor: not-allowed;
  opacity: 0.7;
  box-shadow: none;
}

.copy-trade-btn.vip-disabled i.fa-lock {
  opacity: 0.8;
}

/* 资金相关样式 */
.available-cash-hint {
  font-size: 12px;
  font-weight: normal;
  color: #10b981;
  margin-left: 10px;
}

.funds-remaining {
  font-weight: 600;
}

.funds-remaining .insufficient {
  color: #ef4444;
}

.funds-warning {
  background: #fee2e2;
  border-left: 4px solid #ef4444;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 10px;
  color: #b91c1c;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.funds-warning i {
  color: #ef4444;
}

/* 持仓方向标签 */
.position-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.position-badge.long {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.position-badge.short {
  background: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

/* 深色模式适配 */
body.dark-mode .funds-warning {
  background: #7f1d1d;
  color: #fecaca;
  border-left-color: #ef4444;
}

body.dark-mode .position-badge.long {
  background: rgba(239, 68, 68, 0.2);
}

body.dark-mode .position-badge.short {
  background: rgba(16, 185, 129, 0.2);
}

/* 资金明细样式 */
.funds-detail {
  font-size: 12px;
  color: #64748b;
  margin-top: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 4px;
  border: 1px dashed #cbd5e1;
}

body.dark-mode .funds-detail {
  background: #334155;
  color: #cbd5e1;
  border-color: #475569;
}

/* 汇总表格样式优化 */
.copy-summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.copy-summary-table th {
  background: #f1f5f9;
  padding: 8px 6px;
  text-align: left;
  font-weight: 600;
  color: #1e293b;
  font-size: 11px;
}

.copy-summary-table td {
  padding: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.copy-summary-table tr:last-child td {
  border-bottom: none;
}

.copy-summary-table td:last-child,
.copy-summary-table th:last-child {
  text-align: right;
}

/* 深色模式 */
body.dark-mode .copy-summary-table th {
  background: #1e293b;
  color: #f1f5f9;
}

body.dark-mode .copy-summary-table td {
  border-bottom-color: #334155;
}

/* 剩余资金状态 */
.funds-remaining .insufficient {
  color: #ef4444;
  font-weight: 700;
}

/* 总成本显示 */
#copy-total-allocated {
  font-weight: 700;
  color: #2563eb;
}


