/* 训练页面样式 */

/* 隐藏元素 */
.hidden {
  display: none !important;
}

/* 模式选择区域 */
.mode-selection {
  padding: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 16px;
  text-align: center;
}

/* 模式卡片 */
.mode-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  border: 2px solid transparent;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  cursor: pointer;
  transition: all 0.2s;
}

.mode-card:active {
  transform: scale(0.98);
}

.mode-card.selected {
  border-color: #1890FF;
  background: #f0f7ff;
}

.mode-icon {
  font-size: 32px;
  margin-right: 12px;
}

.mode-content {
  flex: 1;
}

.mode-name {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.mode-desc {
  font-size: 13px;
  color: #666;
}

.mode-check {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #1890FF;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.2s;
}

.mode-check.show {
  opacity: 1;
}

/* 开始按钮 */
.start-btn {
  width: 100%;
  margin-top: 24px;
  padding: 16px;
  font-size: 18px;
}

.start-btn.loading {
  opacity: 0.7;
}

/* 广告弹窗 */
.ad-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: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  padding: 20px;
}

.ad-modal.show {
  opacity: 1;
  visibility: visible;
}

.ad-content {
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 320px;
  padding: 24px;
  text-align: center;
}

.ad-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.ad-desc {
  color: #666;
  font-size: 14px;
  margin-bottom: 20px;
}

.ad-countdown {
  margin-bottom: 20px;
}

.countdown-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}

.countdown-progress {
  height: 100%;
  background: linear-gradient(90deg, #1890FF, #36cfc9);
  border-radius: 3px;
  transition: width 1s linear;
}

.countdown-text {
  font-size: 24px;
  font-weight: 600;
  color: #1890FF;
}

.ad-video-box {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 40px 20px;
  margin-bottom: 16px;
  color: #999;
}

.ad-tip {
  font-size: 12px;
  color: #999;
  margin: 16px 0;
}

/* 广告加载/错误/就绪状态 */
.ad-loading-box,
.ad-error-box,
.ad-ready-box {
  padding: 30px 20px;
  margin-bottom: 16px;
  background: #f5f5f5;
  border-radius: 8px;
}

.ad-loading-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ad-loading-box .spinner {
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
}

.loading-text {
  color: #666;
  font-size: 14px;
}

.ad-error-box {
  text-align: center;
}

.error-icon {
  font-size: 40px;
  margin-bottom: 8px;
}

.error-text {
  color: #ff4d4f;
  font-size: 14px;
  margin-bottom: 4px;
}

.error-tip {
  color: #999;
  font-size: 12px;
}

.ad-ready-box {
  text-align: center;
}

.ad-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.ad-ready-text {
  font-size: 16px;
  font-weight: 600;
  color: #52c41a;
  margin-bottom: 4px;
}

.ad-ready-tip {
  font-size: 13px;
  color: #666;
}

.ad-unlock-all-day {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #fa8c16;
  background: linear-gradient(135deg, #fff7e6 0%, #fff1b8 100%);
  padding: 10px 16px;
  border-radius: 20px;
  margin: 12px 20px;
  border: 1px solid #ffd591;
}

.ad-actions {
  display: flex;
  gap: 12px;
}

.ad-actions .btn {
  flex: 1;
}

/* ===== 兜底策略样式 ===== */

/* 任务解锁 */
.fallback-task-box {
  text-align: center;
  padding: 30px 20px;
  margin-bottom: 16px;
  background: #e6f7ff;
  border-radius: 8px;
  border: 1px solid #91d5ff;
}

.task-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.task-progress-bar {
  width: 80%;
  height: 8px;
  background: #d9d9d9;
  border-radius: 4px;
  margin: 0 auto 12px;
  overflow: hidden;
}

.task-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1890FF, #36cfc9);
  border-radius: 4px;
  transition: width 1s linear;
}

.task-text {
  font-size: 14px;
  color: #1890FF;
  font-weight: 500;
}

/* 训练界面 */
.training-interface {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 56px);
}

/* 导航栏 */
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

.nav-back {
  display: flex;
  align-items: center;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
}

.nav-icon {
  font-size: 18px;
  margin-right: 4px;
}

.nav-text {
  font-size: 14px;
}

.nav-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.nav-placeholder {
  width: 50px;
}

/* K线图容器 */
.chart-container {
  height: 280px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}

/* 行情信息栏 */
.quote-bar {
  background: #fff;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.quote-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.quote-date {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.quote-index-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.idx-label {
  color: #999;
}

.idx-val {
  color: #333;
  font-weight: 500;
}

.idx-amount {
  color: #999;
}

.price-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.price-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.p-label {
  font-size: 12px;
  color: #999;
  margin-bottom: 2px;
}

.p-val {
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.data-row-compact {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
}

/* 账户信息栏 */
.account-bar {
  display: flex;
  background: #fff;
  padding: 8px 16px;
}

.account-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid #f0f0f0;
}

.account-item:last-child {
  border-right: none;
}

.account-label {
  display: block;
  font-size: 12px;
  color: #999;
  margin-bottom: 4px;
}

.account-value {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

/* 净值重置提示 */
.reset-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff7e6;
  padding: 6px 16px;
  border-bottom: 1px solid #ffd591;
}

.reset-text {
  font-size: 13px;
  color: #d48806;
}

.reset-btn {
  background: #faad14;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

/* 操作区 */
.action-bar {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
}

.action-btn {
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:active {
  transform: scale(0.98);
}

.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-buy {
  background: #ff4d4f;
  color: #fff;
}

.btn-sell {
  background: #52c41a;
  color: #fff;
}

.btn-next {
  background: #1890FF;
  color: #fff;
}

/* 训练结果页 */
.result-container {
  padding: 16px;
  padding-bottom: 80px;
}

.result-header {
  text-align: center;
  margin-bottom: 20px;
}

.result-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
}

/* 股票揭秘卡片 */
.stock-reveal-card {
  background: linear-gradient(135deg, #1890FF 0%, #36cfc9 100%);
  border-radius: 12px;
  padding: 20px;
  color: #fff;
  text-align: center;
  margin-bottom: 16px;
}

.stock-name {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.stock-code {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 4px;
}

.stock-industry {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.stock-date {
  font-size: 12px;
  opacity: 0.7;
}

/* 成绩展示 */
.score-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.profit-big {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 8px;
}

.grade-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ffd700, #ffaa00);
  color: #fff;
  padding: 6px 20px;
  border-radius: 20px;
  font-size: 18px;
  font-weight: 600;
}

/* 统计数据网格 */
.stats-grid {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stats-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid #f0f0f0;
}

.stats-item:last-child {
  border-right: none;
}

.stats-value {
  display: block;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
}

.stats-label {
  font-size: 12px;
  color: #999;
}

/* 涨停统计 */
.limit-up-stats {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stats-title {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #666;
}

/* 新成就 */
.new-achievements {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.achievement-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

.achievement-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.achievement-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: #f6ffed;
  border-radius: 8px;
  border-left: 4px solid #52c41a;
}

.achievement-name {
  font-size: 14px;
  color: #333;
}

.achievement-exp {
  font-size: 13px;
  color: #52c41a;
  font-weight: 500;
}

/* 结果页操作按钮 */
.result-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.result-btn {
  flex: 1;
  padding: 14px;
}
