/* ========================================
   冠军竞猜样式
   ======================================== */

/* ---------- 阶段 Tab ---------- */
.champion-stage-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 4px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.06);
}

.stage-tab {
  flex: 1;
  text-align: center;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: calc(var(--radius-md) - 2px);
  cursor: pointer;
  transition: all 0.25s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.stage-tab:active {
  transform: scale(0.97);
}

.stage-tab.active {
  background: linear-gradient(135deg, rgba(0,212,255,0.2), rgba(123,47,255,0.2));
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,212,255,0.15);
}

/* ---------- 页面标题区 ---------- */
.champion-hero {
  text-align: center;
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.champion-hero .hero-title {
  font-size: 26px;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

.champion-hero .hero-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ---------- 倒计时区域 ---------- */
.champion-countdown-wrap {
  margin-top: var(--spacing-md);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(0,212,255,0.08), rgba(123,47,255,0.08));
  border: 1px solid rgba(0,212,255,0.15);
  text-align: center;
}

.champion-countdown-wrap.urgent {
  background: linear-gradient(135deg, rgba(255,82,82,0.15), rgba(255,82,82,0.05));
  border-color: rgba(255,82,82,0.3);
}

.champion-countdown-wrap .cd-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.champion-countdown-wrap .cd-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-blue);
}

.champion-countdown-wrap.urgent .cd-timer {
  color: var(--color-error);
}

.champion-countdown-wrap .cd-block {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 38px;
  padding: 4px 6px;
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
}

.champion-countdown-wrap .cd-block small {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-tertiary);
  margin-top: 1px;
}

.champion-countdown-wrap .cd-sep {
  opacity: 0.4;
  font-size: 16px;
}

/* ---------- 球队网格 ---------- */
.champion-section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: var(--spacing-lg) 0 var(--spacing-sm);
}

.champion-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* ---------- 球队卡片 ---------- */
.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px 14px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1.5px solid rgba(255,255,255,0.06);
  cursor: pointer;
  transition: all 0.25s ease;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.team-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(135deg, rgba(0,212,255,0.06), rgba(123,47,255,0.06));
  transition: opacity 0.25s;
}

.team-card:active {
  transform: scale(0.97);
}

/* 选中态 */
.team-card.selected {
  border-color: transparent;
  background: linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
              linear-gradient(135deg, #00d4ff, #7b2fff) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 0 18px rgba(0,212,255,0.25), 0 0 40px rgba(123,47,255,0.12);
}

.team-card.selected::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(123,47,255,0.1));
}

/* 选中角标 */
.team-card .check-mark {
  position: absolute;
  top: 0;
  right: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s ease;
  background: linear-gradient(135deg, #00d4ff, #7b2fff);
  border-radius: 0 var(--radius-md) 0 var(--radius-md);
}

.team-card.selected .check-mark {
  opacity: 1;
  transform: scale(1);
}

/* 国旗 */
.team-card .team-flag {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}

/* 球队名 */
.team-card .team-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

/* 赔率 */
.team-card .team-odds {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-blue);
  line-height: 1;
  transition: color 0.3s;
}

.team-card .team-odds.odds-flash {
  animation: oddsFlash 0.6s ease;
}

/* 趋势箭头 */
.team-card .team-trend {
  font-size: 11px;
  margin-top: 3px;
  font-weight: 500;
}

.team-card .team-trend.trend-up {
  color: var(--color-success);
}

.team-card .team-trend.trend-down {
  color: var(--color-error);
}

.team-card .team-trend.trend-stable {
  color: var(--text-tertiary);
}

/* ---------- 投注区域 ---------- */
.champion-bet-section {
  margin-top: var(--spacing-lg);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.04);
}

.bet-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-sm);
}

.bet-section-header .bet-title {
  font-size: 15px;
  font-weight: 600;
}

.bet-section-header .bet-balance {
  font-size: 13px;
  color: var(--text-secondary);
}

.bet-section-header .bet-balance span {
  color: var(--accent-blue);
  font-weight: 600;
}

.champion-input-wrap {
  margin-bottom: var(--spacing-sm);
}

.champion-input-wrap .form-input {
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  letter-spacing: 1px;
}

.champion-quick-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.champion-quick-btns .quick-amount-btn {
  height: 38px;
  font-size: 13px;
}

/* ---------- 预计收益 ---------- */
.champion-profit {
  text-align: center;
  padding: 14px 0;
  margin-bottom: var(--spacing-md);
  border-radius: var(--radius-md);
  background: rgba(0,0,0,0.2);
}

.champion-profit .profit-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.champion-profit .profit-value {
  font-size: 28px;
  font-weight: 800;
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

/* ---------- 确认投注按钮 ---------- */
.champion-submit-btn {
  width: 100%;
  height: 52px;
  border-radius: var(--radius-xl);
  background: var(--gradient-primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3);
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.champion-submit-btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}

.champion-submit-btn.btn-disabled,
.champion-submit-btn:disabled {
  background: var(--bg-tertiary) !important;
  color: var(--text-tertiary) !important;
  box-shadow: none !important;
  pointer-events: none;
  opacity: 0.6;
}

/* ---------- 底部提示 ---------- */
.champion-tip {
  text-align: center;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
}

/* ---------- 动画 ---------- */
@keyframes oddsFlash {
  0%   { opacity: 1; transform: scale(1); }
  30%  { opacity: 0.4; transform: scale(1.15); color: #ffc107; }
  60%  { opacity: 1; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.team-card {
  animation: cardEnter 0.4s ease backwards;
}

.team-card:nth-child(1) { animation-delay: 0.03s; }
.team-card:nth-child(2) { animation-delay: 0.06s; }
.team-card:nth-child(3) { animation-delay: 0.09s; }
.team-card:nth-child(4) { animation-delay: 0.12s; }
.team-card:nth-child(5) { animation-delay: 0.15s; }
.team-card:nth-child(6) { animation-delay: 0.18s; }
.team-card:nth-child(7) { animation-delay: 0.21s; }
.team-card:nth-child(8) { animation-delay: 0.24s; }
