/* ==================== 训练页面专用样式 ==================== */

.training-content {
  max-width: 1600px;
  padding: 24px;
}

/* ==================== 模式选择界面 ==================== */
.page-header {
  text-align: center;
  margin-bottom: 48px;
}

.page-title {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.page-description {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.mode-selection {
  max-width: 1200px;
  margin: 0 auto;
}

.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.mode-card-large {
  background: #fff;
  border-radius: 20px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  border: 3px solid transparent;
}

.mode-card-large:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.mode-card-large.selected {
  border-color: var(--primary-color);
  box-shadow: 0 8px 32px rgba(24, 144, 255, 0.3);
}

.mode-card-large[data-mode="normal"].selected {
  border-color: #1890ff;
}

.mode-card-large[data-mode="limit_up"].selected {
  border-color: #ff4d4f;
}

.mode-card-large[data-mode="bull_stock"].selected {
  border-color: #faad14;
}

.mode-card-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s ease;
}

.mode-card-large.selected .mode-card-check {
  opacity: 1;
  transform: scale(1);
}

.mode-card-icon {
  font-size: 64px;
  margin-bottom: 20px;
  display: block;
}

.mode-card-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.mode-card-description {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 14px;
}

.mode-card-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mode-card-features li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.mode-card-features li:last-child {
  border-bottom: none;
}

.mode-actions {
  text-align: center;
}

.mode-actions .btn {
  min-width: 200px;
}

/* ==================== 训练界面布局 ==================== */
.training-interface {
  width: 100%;
}

.training-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.training-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.training-day-display {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.day-number {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-color);
}

.training-market-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.market-index {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

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

.index-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.index-pct {
  font-size: 14px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 12px;
}

/* 主体内容区 - 三栏布局 */
.training-main {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

/* 图表区域 */
.training-chart-section {
  min-height: 600px;
  height: 100%;
}

.chart-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-md);
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  gap: 16px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chart-container {
  flex: 1;
  min-height: 500px;
  height: 100%;
  position: relative;
  width: 100%;
}

/* 侧边栏 */
.training-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 信息卡片 */
.info-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.info-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 行情卡片 */
.quote-card {
  min-height: 200px;
}

.quote-date {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

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

.quote-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.quote-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.quote-extra {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quote-row .quote-label {
  font-size: 13px;
}

.quote-row .quote-value {
  font-size: 14px;
}

/* 账户卡片 */
.account-card {
  min-height: 180px;
}

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.account-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

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

.account-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

/* 操作卡片 */
.action-card {
  min-height: 200px;
}

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

.btn-buy {
  background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
  color: #fff;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 77, 79, 0.3);
}

.btn-buy:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 77, 79, 0.4);
}

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

.btn-sell {
  background: linear-gradient(135deg, #52c41a 0%, #73d13d 100%);
  color: #fff;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(82, 196, 26, 0.3);
}

.btn-sell:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(82, 196, 26, 0.4);
}

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

.btn-next {
  width: 100%;
  background: var(--primary-gradient);
  color: #fff;
  padding: 16px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.btn-next:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 144, 255, 0.4);
}

/* ==================== 结果页面 ==================== */
.result-container {
  max-width: 1000px;
  margin: 0 auto;
}

.result-header {
  text-align: center;
  margin-bottom: 40px;
}

.result-icon {
  font-size: 80px;
  margin-bottom: 16px;
  animation: bounce 1s ease infinite;
}

.result-title {
  font-size: 40px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.result-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
}

.result-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

.result-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.result-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
}

/* 股票揭秘卡片 */
.stock-reveal-card {
  grid-column: span 2;
}

.stock-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stock-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
}

.stock-code {
  font-size: 16px;
  color: var(--text-muted);
}

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

.stock-date-range {
  font-size: 13px;
  color: var(--text-muted);
}

/* 成绩展示卡片 */
.performance-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.profit-display {
  text-align: center;
}

.profit-value {
  font-size: 56px;
  font-weight: 700;
}

.grade-badge {
  font-size: 48px;
  font-weight: 700;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 统计数据卡片 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stats-item {
  text-align: center;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.stats-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
  margin-bottom: 8px;
}

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

/* 涨停统计卡片 */
.limit-up-stats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.limit-up-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
}

.limit-up-stat-row .stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.limit-up-stat-row .stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
}

.limit-up-stat-row .stat-unit {
  font-size: 14px;
  color: var(--text-muted);
}

/* 成就卡片 */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.achievement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(24, 144, 255, 0.1) 0%, rgba(54, 207, 201, 0.1) 100%);
  border: 1px solid rgba(24, 144, 255, 0.2);
  border-radius: var(--radius-md);
}

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

.achievement-exp {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

/* 结果操作区 */
.result-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
}

/* 小程序引导卡片 */
.miniprogram-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}

.miniprogram-content {
  display: flex;
  align-items: center;
  gap: 24px;
}

.miniprogram-icon {
  font-size: 64px;
}

.miniprogram-text {
  flex: 1;
}

.miniprogram-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.miniprogram-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.miniprogram-qr {
  width: 160px;
  height: 160px;
  flex-shrink: 0;
}

.miniprogram-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-color);
}

/* ==================== 隐藏类 ==================== */
.hidden {
  display: none !important;
}

/* ==================== 加载动画 ==================== */
.loading-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;
  backdrop-filter: blur(4px);
}

.loading-spinner {
  background: #fff;
  padding: 40px 60px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

.loading-text {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

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

/* ==================== 图表错误提示 ==================== */
.chart-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px;
  text-align: center;
  color: var(--text-secondary);
}

.chart-error-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.chart-error-text {
  font-size: 16px;
  margin-bottom: 20px;
}

.chart-error-btn {
  padding: 10px 24px;
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s ease;
}

.chart-error-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1200px) {
  .training-main {
    grid-template-columns: 1fr;
  }
  
  .training-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  
  .mode-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .training-content {
    padding: 16px;
  }
  
  .page-title {
    font-size: 28px;
  }
  
  .mode-cards {
    grid-template-columns: 1fr;
  }
  
  .training-sidebar {
    grid-template-columns: 1fr;
  }
  
  .result-content {
    grid-template-columns: 1fr;
  }
  
  .stock-reveal-card {
    grid-column: span 1;
  }
  
  .stock-info {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .miniprogram-content {
    flex-direction: column;
    text-align: center;
  }
}
