/* pages/cup.css - 杯赛页面 Premium */

/* 头部 */
.cup-header {
  text-align: center;
  padding: var(--sp-4) var(--sp-3);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-3);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.cup-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,215,0,0.08) 0%, transparent 60%);
  animation: cupGlow 4s ease-in-out infinite;
}
@keyframes cupGlow {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.2); opacity: 1; }
}
.cup-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  position: relative;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.cup-subtitle {
  font-size: 13px;
  color: rgba(255,255,255,0.6);
  margin-top: var(--sp-1);
  position: relative;
}

/* 杯赛列表 */
.cup-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* 杯赛卡片 */
.cup-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
}
.cup-card:not(.locked):not(.coming-soon) {
  cursor: pointer;
}
.cup-card:not(.locked):not(.coming-soon):hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.cup-card.locked {
  opacity: 0.65;
}
.cup-card.coming-soon {
  opacity: 0.8;
}
.cup-card.req-not-met {
  border-color: #ffab91;
}

/* 卡片头部 */
.cup-card-header {
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-4);
  gap: var(--sp-3);
}
.cup-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255,193,7,0.15);
}
.cup-icon.create-icon {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
}
.cup-title-group {
  flex: 1;
  min-width: 0;
}
.cup-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cup-format {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  display: block;
}

/* 状态徽章 */
.cup-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
}
.cup-status-badge.locked {
  background: var(--gray-100);
  color: var(--gray-500);
}
.cup-status-badge.coming-soon {
  background: #e8f5e9;
  color: #2e7d32;
}
.cup-status-badge.open {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #1b5e20;
}

/* 卡片主体 */
.cup-card-body {
  padding: 0 var(--sp-4) var(--sp-3);
}
.cup-info-row {
  display: flex;
  align-items: flex-start;
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-50);
  gap: var(--sp-2);
}
.cup-info-row:last-child {
  border-bottom: none;
}
.cup-info-label {
  font-size: 12px;
  color: var(--gray-400);
  white-space: nowrap;
  min-width: 56px;
  flex-shrink: 0;
}
.cup-info-value {
  font-size: 12px;
  color: var(--gray-700);
  font-weight: 500;
  line-height: 1.4;
}

/* ==================== 奖金标签 ==================== */
.cup-prize-row {
  flex-direction: column !important;
  align-items: stretch !important;
}
.cup-prize-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.prize-tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.prize-tag.champion {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  color: #e65100;
  border: 1px solid #ffd54f;
}
.prize-tag.runner-up {
  background: #f5f5f5;
  color: #616161;
  border: 1px solid #e0e0e0;
}
.prize-tag.third {
  background: #fbe9e7;
  color: #bf360c;
  border: 1px solid #ffab91;
}
.prize-rounds {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 500;
}

/* 卡片底部 */
.cup-card-footer {
  padding: var(--sp-2) var(--sp-4) var(--sp-3);
  display: flex;
  justify-content: flex-end;
}
.cup-lock-footer {
  padding: var(--sp-2) var(--sp-4) var(--sp-3);
  border-top: 1px dashed var(--gray-200);
}
.cup-lock-footer.coming-soon {
  border-top-color: #c8e6c9;
}
.lock-hint {
  font-size: 11px;
  color: var(--gray-400);
}

/* 创建杯赛卡片特殊样式 */
.create-cup-card {
  border: 2px dashed var(--gray-300);
  background: linear-gradient(135deg, #fafafa, #fff);
}
.create-cup-card:hover {
  border-color: var(--green-primary);
  background: linear-gradient(135deg, #f1f8e9, #fff);
}

/* 自建杯赛区域 */
.custom-cup-section {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.custom-cup-list {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.custom-cup-list .section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  margin: 0;
}

/* 空状态 */
.empty-state {
  padding: var(--sp-8) var(--sp-4);
  text-align: center;
}
.cup-empty-icon {
  font-size: 40px;
  margin-bottom: var(--sp-2);
  opacity: 0.5;
}
.empty-text {
  font-size: 14px;
  color: var(--gray-500);
  font-weight: 600;
  margin: 0 0 var(--sp-1);
}
.cup-empty-hint {
  font-size: 12px;
  color: var(--gray-400);
  margin: 0;
}

/* ==================== 杯赛详情页 ==================== */
.cup-detail-page {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.cup-detail-hero {
  text-align: center;
  padding: var(--sp-5) var(--sp-3);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}
.cup-detail-hero.nl-hero {
  background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}
.cup-detail-hero.cc-hero {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
}
.cup-detail-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
}
.cup-detail-icon {
  font-size: 36px;
  margin-bottom: var(--sp-2);
}
.cup-detail-hero h2 {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.cup-detail-status {
  margin-top: var(--sp-2);
}
.cup-detail-status .status-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-full);
}
.status-tag.active {
  background: rgba(76,175,80,0.3);
  color: #a5d6a7;
}
.status-tag.eliminated {
  background: rgba(244,67,54,0.3);
  color: #ef9a9a;
}
.status-tag.finished {
  background: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
}

/* 杯赛区块 */
.cup-section {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.cup-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-700);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
  margin: 0;
}

/* 积分榜 */
.cup-standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.cup-standings-table th {
  padding: 8px 6px;
  text-align: center;
  font-size: 11px;
  color: var(--gray-500);
  font-weight: 600;
  border-bottom: 1px solid var(--gray-100);
  background: var(--gray-50);
}
.cup-standings-table td {
  padding: 8px 6px;
  text-align: center;
  color: var(--gray-700);
  border-bottom: 1px solid var(--gray-50);
}
.cup-standings-table td:first-child {
  font-weight: 700;
  color: var(--gray-500);
}
.cup-standings-table td:nth-child(2) {
  text-align: left;
  font-weight: 600;
}
.cup-standings-table .user-row {
  background: rgba(59,130,246,0.08);
}
.cup-standings-table .user-row td:nth-child(2) {
  color: var(--blue-primary);
}
.cup-standings-table .qualification-zone td:first-child {
  color: var(--green-primary);
}
.cup-standings-table .points {
  font-weight: 800;
  color: var(--gray-800);
}

.cup-legend {
  padding: var(--sp-2) var(--sp-4);
  font-size: 11px;
  color: var(--gray-400);
  border-top: 1px solid var(--gray-50);
}
.legend-item.qualification::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--green-primary);
  margin-right: 4px;
  vertical-align: middle;
}

/* 赛程列表 */
.cup-fixtures-list {
  padding: var(--sp-2) var(--sp-3);
}

.fixture-row {
  display: flex;
  align-items: center;
  padding: 10px 8px;
  border-bottom: 1px solid var(--gray-50);
  gap: var(--sp-2);
  font-size: 13px;
}
.fixture-row:last-child {
  border-bottom: none;
}
.fixture-row.played {
  opacity: 0.85;
}
.fixture-row.user-fixture {
  background: rgba(59,130,246,0.04);
}
.fixture-round-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-400);
  min-width: 40px;
  text-align: center;
  flex-shrink: 0;
}
.fixture-team {
  flex: 1;
  font-weight: 500;
  color: var(--gray-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fixture-team.user-team {
  font-weight: 700;
  color: var(--blue-primary);
}
.fixture-score {
  font-weight: 800;
  color: var(--gray-800);
  min-width: 36px;
  text-align: center;
}
.fixture-row.upcoming .fixture-score {
  color: var(--gray-400);
  font-weight: 500;
}
.fixture-result-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.fixture-result-tag.win {
  background: #e8f5e9;
  color: #2e7d32;
}
.fixture-result-tag.draw {
  background: #fff3e0;
  color: #e65100;
}
.fixture-result-tag.loss {
  background: #ffebee;
  color: #c62828;
}

/* 进行中状态 */
.cup-status-badge.active {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #1b5e20;
}

/* 赛季总结中的杯赛战绩 */
.summary-cups {
  background: var(--gray-50);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  margin: var(--sp-2) 0;
}
.summary-cups h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-600);
  margin: 0 0 var(--sp-2);
}
.summary-cup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}
.summary-cup-item:last-child {
  border-bottom: none;
}
.cup-result {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.cup-result.win {
  background: #fff8e1;
  color: #e65100;
}
.cup-result.loss {
  background: #ffebee;
  color: #c62828;
}
.cup-result.draw {
  background: #f5f5f5;
  color: #616161;
}

/* ========== 足协杯历届战绩 ========== */
.fa-history-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.fa-history-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 10px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-100);
}
.fa-history-edition {
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-700);
  min-width: 50px;
}
.fa-history-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.fa-history-tag.champion {
  background: #fff8e1;
  color: #f9a825;
  border: 1px solid #ffcc02;
}
.fa-history-tag.runner-up {
  background: #eceff1;
  color: #78909c;
  border: 1px solid #b0bec5;
}
.fa-history-tag.eliminated {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}
.fa-history-round {
  font-size: 13px;
  color: var(--gray-500);
  margin-left: auto;
}
