/* 拳手报名参赛样式 - Vibrant & Block-based 风格 */
/* 基于 ui-ux-pro-max 设计系统 */

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&display=swap");

.tournament-signup-container {
  --fighter-primary: var(--primary-color, #4f7cff);
  --fighter-primary-dark: var(--primary-dark, #3c68e0);
  --fighter-primary-light: var(--primary-light, #7fa2ff);
  --fighter-gold: #f5b942;
  --fighter-gold-light: #ffd978;
  --fighter-bg: rgba(79, 124, 255, 0.08);
  --fighter-bg-strong: rgba(79, 124, 255, 0.14);
  --fighter-text: var(--text-primary, #f3f4f6);
  --fighter-text-muted: var(--text-secondary, #9ca3af);
  --fighter-border: var(--border-color, rgba(148, 163, 184, 0.24));
  --fighter-success: #34d399;
  --fighter-warning: #f59e0b;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-6);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  color: var(--fighter-text);
}

.fighter-league-data,
.available-tournaments,
.signup-history {
  margin-bottom: var(--space-8);
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.78),
    rgba(15, 23, 42, 0.88)
  );
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.22);
}

.fighter-league-data h3,
.available-tournaments h2,
.signup-history h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--fighter-text);
  margin: 0 0 var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.fighter-league-data h3::before,
.available-tournaments h2::before,
.signup-history h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 26px;
  background: linear-gradient(
    180deg,
    var(--fighter-primary),
    var(--fighter-gold)
  );
  border-radius: var(--radius-sm);
}

#league-data-container {
  display: grid;
  gap: var(--space-4);
}

#league-data-container .event-card {
  background: linear-gradient(
    180deg,
    rgba(20, 27, 45, 0.92),
    rgba(17, 24, 39, 0.96)
  );
  border: 1px solid var(--fighter-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: 0 10px 28px rgba(3, 7, 18, 0.22);
}

#league-data-container .event-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

#league-data-container .event-header h4 {
  margin: 0;
  color: var(--fighter-text);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
}

#league-data-container .event-total {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

#league-data-container .total-record,
#league-data-container .total-points {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--fighter-bg);
  color: var(--fighter-text);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

#league-data-container .total-points {
  color: var(--fighter-gold-light);
  background: rgba(245, 185, 66, 0.12);
}

#league-data-container .weight-classes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}

#league-data-container .weight-class-item {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

#league-data-container .weight-class-item h5 {
  margin: 0 0 var(--space-2) 0;
  color: var(--fighter-text);
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

#league-data-container .weight-class-stats {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  color: var(--fighter-text-muted);
  font-size: var(--text-sm);
}

.no-tournaments,
.empty-state {
  color: var(--fighter-text-muted);
  text-align: center;
  padding: var(--space-8) var(--space-6);
}

.no-tournaments p,
.empty-state {
  color: var(--fighter-text-muted);
}

.no-tournaments i {
  color: var(--fighter-primary-light) !important;
  opacity: 0.9;
}

.no-tournaments p {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.7;
}

/* ===== 页面头部 ===== */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-4);
}

.page-header h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--fighter-text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.available-tournaments .page-header {
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.page-header h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 28px;
  background: linear-gradient(
    180deg,
    var(--fighter-primary),
    var(--fighter-gold)
  );
  border-radius: var(--radius-sm);
}

.fighter-qualification {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qualification-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(
    135deg,
    rgba(220, 38, 38, 0.1),
    rgba(251, 191, 36, 0.1)
  );
  border: 1px solid var(--fighter-primary);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
}

.qualification-badge .badge-label {
  color: var(--fighter-text-muted);
  font-weight: 500;
}

.qualification-badge .badge-value {
  color: var(--fighter-primary);
  font-weight: 700;
}

.qualification-levels {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.level-chip {
  padding: var(--space-1) var(--space-3);
  background: var(--bg-secondary);
  border: 1px solid var(--fighter-border);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--fighter-text);
  font-weight: 500;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.level-chip:hover {
  border-color: var(--fighter-primary);
  background: rgba(220, 38, 38, 0.05);
}

/* ===== 拳手信息卡片 ===== */
.fighter-info-card {
  background: var(--bg-primary);
  border: none;
  border-radius: var(--radius-2xl);
  padding: var(--space-6);
  margin-bottom: var(--space-8);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.fighter-info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--fighter-primary),
    var(--fighter-gold)
  );
}

.fighter-header {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding: var(--space-5);
  background: linear-gradient(135deg, var(--fighter-bg), var(--bg-primary));
  border-radius: var(--radius-xl);
  border: 1px solid var(--fighter-border);
  position: relative;
  overflow: hidden;
}

.fighter-header::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220, 38, 38, 0.05));
  pointer-events: none;
}

.fighter-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: linear-gradient(
    135deg,
    var(--fighter-primary),
    var(--fighter-primary-dark)
  );
  padding: 3px;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
  flex-shrink: 0;
}

.fighter-photo img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 3px solid var(--bg-primary);
}

.fighter-details {
  flex: 1;
}

.fighter-details h2 {
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--fighter-text);
  margin: 0 0 var(--space-3) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.fighter-details h2::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--fighter-success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fighter-stats {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.stat-item {
  font-size: var(--text-sm);
  color: var(--fighter-text-muted);
  background: var(--bg-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--fighter-border);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  transition: all var(--transition-fast);
}

.stat-item:hover {
  border-color: var(--fighter-primary);
  transform: translateY(-1px);
}

.stat-item strong {
  color: var(--fighter-text);
  font-weight: var(--font-semibold);
}

.fighter-eligibility {
  display: flex;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--fighter-border);
  margin-top: var(--space-4);
  flex-wrap: wrap;
}

.eligibility-status,
.medical-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  background: var(--bg-primary);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  font-weight: 500;
}

.eligibility-status svg,
.medical-status svg {
  width: 16px;
  height: 16px;
}

.text-success {
  color: var(--fighter-success);
}

.text-danger {
  color: var(--fighter-primary);
}

/* ===== 筛选器 ===== */
.tournaments-filters {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin-bottom: var(--space-6);
  padding: var(--space-4) var(--space-5);
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.94),
    rgba(20, 27, 45, 0.94)
  );
  border-radius: var(--radius-xl);
  border: 1px solid var(--fighter-border);
  box-shadow: 0 10px 24px rgba(3, 7, 18, 0.16);
  position: relative;
  overflow: hidden;
}

.tournaments-filters::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(
    180deg,
    var(--fighter-primary),
    var(--fighter-gold)
  );
  opacity: 0.95;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 0;
  flex: 1 1 240px;
}

.filter-prefix {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--fighter-text-muted);
  letter-spacing: 0.02em;
}

.filter-group select {
  width: 100%;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  border: 2px solid var(--fighter-border);
  border-radius: var(--radius-lg);
  background: rgba(15, 23, 42, 0.9);
  color: var(--fighter-text);
  transition: all var(--transition-fast);
  cursor: pointer;
  min-height: 44px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--fighter-text-muted) 50%),
    linear-gradient(135deg, var(--fighter-text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}

.filter-group select:hover {
  border-color: rgba(127, 162, 255, 0.55);
  background-color: rgba(20, 31, 56, 0.96);
}

.filter-group select:focus {
  outline: none;
  border-color: var(--fighter-primary);
  box-shadow: 0 0 0 4px rgba(79, 124, 255, 0.16);
}

/* ===== 赛事卡片网格 ===== */
.tournaments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-10);
}

.tournament-card {
  background: linear-gradient(
    160deg,
    rgba(18, 25, 41, 0.98),
    rgba(15, 23, 42, 0.96)
  );
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  padding: var(--space-6);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 18px 40px rgba(2, 6, 23, 0.26);
}

.tournament-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fighter-border);
  transition: all var(--transition-fast);
}

.tournament-card:hover {
  border-color: rgba(127, 162, 255, 0.48);
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 24px 48px rgba(2, 6, 23, 0.32);
}

.tournament-card:hover::before {
  background: linear-gradient(
    90deg,
    var(--fighter-primary),
    var(--fighter-gold)
  );
}

.tournament-card.featured {
  border-color: var(--fighter-gold);
  background: linear-gradient(
    135deg,
    rgba(20, 27, 45, 0.98),
    rgba(245, 185, 66, 0.1)
  );
}

.tournament-card.featured::before {
  background: var(--fighter-gold);
}

.tournament-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
}

.tournament-header-main {
  flex: 1;
  min-width: 0;
}

.tournament-header-top {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-3);
}

.tournament-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--fighter-text);
  margin: 0;
  line-height: 1.45;
}

.tournament-type-badge {
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.tournament-type-badge.ranking {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

.tournament-type-badge.championship {
  background: rgba(220, 38, 38, 0.1);
  color: var(--fighter-primary);
}

.tournament-type-badge.challenge {
  background: rgba(251, 191, 36, 0.1);
  color: #b45309;
}

.tournament-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tournament-level-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.14);
  color: #dbe7ff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-ranking {
  background: rgba(79, 124, 255, 0.14);
  color: #a8c1ff;
}

.badge-championship {
  background: rgba(220, 38, 38, 0.14);
  color: #fda4af;
}

.badge-challenge {
  background: rgba(245, 185, 66, 0.14);
  color: #fcd34d;
}

.deadline-pill {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 52px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

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

.deadline-pill .deadline-value {
  margin-top: 4px;
  color: var(--fighter-text);
  font-size: 1rem;
  font-weight: 700;
}

.deadline-pill.soon {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.deadline-pill.urgent {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.08);
}

.tournament-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: var(--space-4);
}

.meta-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.meta-item.wide {
  grid-column: span 2;
}

.meta-label {
  display: block;
  margin-bottom: 8px;
  color: var(--fighter-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.meta-value {
  color: var(--fighter-text);
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.tournament-summary-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: var(--space-4);
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(79, 124, 255, 0.08);
  border: 1px solid rgba(79, 124, 255, 0.18);
}

.summary-chip-label {
  color: var(--fighter-text-muted);
  font-size: 12px;
  font-weight: 600;
}

.summary-chip-value {
  color: #dbe7ff;
  font-size: 13px;
  font-weight: 700;
}

.tournament-weight-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--space-4);
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(148, 163, 184, 0.14);
}

.weight-select-label {
  flex-shrink: 0;
  color: var(--fighter-text-muted);
  font-size: 13px;
  font-weight: 700;
}

.weight-class-select {
  flex: 1;
  min-width: 0;
  min-height: 44px;
}

.tournament-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.stat-item-small {
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.14);
  text-align: center;
}

.stat-item-small.emphasis {
  background: linear-gradient(
    135deg,
    rgba(79, 124, 255, 0.16),
    rgba(79, 124, 255, 0.08)
  );
  border-color: rgba(79, 124, 255, 0.26);
}

.stat-value-small {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f8fafc;
}

.stat-item-small.emphasis .stat-value-small {
  color: #dbe7ff;
}

.stat-label-small {
  margin-top: 6px;
  font-size: 12px;
  color: var(--fighter-text-muted);
}

.tournament-actions {
  display: flex;
  gap: var(--space-3);
}

.tournament-actions .btn {
  flex: 1;
  justify-content: center;
  min-height: 44px;
}

/* ===== 按钮样式 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--fighter-primary),
    var(--fighter-primary-dark)
  );
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(79, 124, 255, 0.24);
}

.btn.is-disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary.is-disabled,
.btn-primary:disabled {
  background: linear-gradient(
    135deg,
    rgba(71, 85, 105, 0.9),
    rgba(51, 65, 85, 0.9)
  );
  color: rgba(226, 232, 240, 0.92);
}

.btn-outline {
  background: transparent;
  color: var(--fighter-text);
  border: 2px solid var(--fighter-border);
}

.btn-outline:hover {
  border-color: var(--fighter-primary);
  color: var(--fighter-primary);
  background: rgba(220, 38, 38, 0.05);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
}

/* ===== 报名历史 ===== */
.signup-history {
  margin-top: var(--space-10);
}

.signup-history h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--fighter-text);
  margin: 0 0 var(--space-5) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.signup-history h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 24px;
  background: linear-gradient(
    180deg,
    var(--fighter-primary),
    var(--fighter-gold)
  );
  border-radius: var(--radius-sm);
}

.history-table {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.history-table table {
  width: 100%;
  border-collapse: collapse;
}

.history-table th,
.history-table td {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.history-table th {
  background: var(--bg-light);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.history-table td {
  font-size: var(--text-sm);
  color: var(--text-primary);
  line-height: 1.6;
}

.history-table tr:last-child td {
  border-bottom: none;
}

.history-table tbody tr {
  transition:
    background-color var(--transition-fast),
    transform var(--transition-fast);
}

.history-table tr:hover {
  background: var(--bg-light);
}

.history-table tbody tr:hover td {
  color: var(--text-primary);
}

#signup-history-body .empty-state,
#signup-history-body td.empty-state {
  padding: var(--space-8);
  text-align: center;
  color: var(--fighter-text-muted);
  background: transparent;
  border: none;
  min-height: 0;
  display: table-cell;
}

#signup-history-body td.empty-state {
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
}

.status-badge.pending {
  background: rgba(251, 191, 36, 0.1);
  color: #b45309;
}

.status-badge.approved {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.status-badge.rejected {
  background: rgba(220, 38, 38, 0.1);
  color: var(--fighter-primary);
}

.status-badge.completed {
  background: rgba(30, 64, 175, 0.1);
  color: #1e40af;
}

/* ===== 模态框样式 ===== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-modal);
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(4px);
  overflow: hidden;
  box-sizing: border-box;
}

.modal.active {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-2xl);
  width: 100%;
  max-width: 500px;
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  animation: slideUp 0.3s ease-out;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--fighter-border);
  background: var(--fighter-bg);
}

.modal-header h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--fighter-text);
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--text-2xl);
  color: var(--fighter-text-muted);
  cursor: pointer;
  padding: var(--space-1);
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--fighter-primary);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
}

/* 报名信息 */
.signup-info h4 {
  margin: 0 0 var(--space-4) 0;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--fighter-text);
}

.info-grid {
  display: grid;
  gap: var(--space-4);
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--fighter-bg);
  border-radius: var(--radius-lg);
}

.wide-info-item {
  grid-column: 1 / -1;
}

.info-item .label {
  font-size: var(--text-sm);
  color: var(--fighter-text-muted);
}

.info-item .value {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--fighter-text);
}

/* 条款协议 */
.terms-agreement,
.medical-declaration {
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--fighter-bg);
  border-radius: var(--radius-lg);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--fighter-text);
  line-height: 1.5;
}

.checkbox-label input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--fighter-primary);
  cursor: pointer;
}

.checkbox-label a {
  color: var(--fighter-primary);
  text-decoration: underline;
}

/* 支付模态框 */
.payment-info {
  text-align: center;
  padding: var(--space-6);
  background: var(--fighter-bg);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-5);
}

.amount-due {
  margin-bottom: var(--space-2);
}

.amount-due .label {
  font-size: var(--text-sm);
  color: var(--fighter-text-muted);
}

.amount-due .amount {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--fighter-primary);
  display: block;
}

.payment-tournament-name {
  font-size: var(--text-base);
  color: var(--fighter-text);
  font-weight: 500;
}

.payment-methods h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fighter-text);
  margin: 0 0 var(--space-4) 0;
}

.payment-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.payment-option {
  display: flex;
  align-items: center;
  padding: var(--space-4);
  border: 2px solid var(--fighter-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.payment-option:hover {
  border-color: var(--fighter-primary);
  background: rgba(220, 38, 38, 0.02);
}

.payment-option input[type="radio"] {
  width: 20px;
  height: 20px;
  margin-right: var(--space-3);
  accent-color: var(--fighter-primary);
}

.payment-icon {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  color: var(--fighter-text);
}

.payment-qr-panel {
  margin-top: var(--space-5);
  padding: var(--space-5);
  background: var(--fighter-bg);
  border: 1px solid var(--fighter-border);
  border-radius: var(--radius-xl);
  text-align: center;
}

.payment-qr-card {
  width: 220px;
  height: 220px;
  margin: 0 auto var(--space-4);
  padding: var(--space-3);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.payment-qr-card img {
  width: 100%;
  height: 100%;
  display: block;
}

.payment-qr-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fighter-text);
}

.payment-qr-subtitle {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--fighter-text-muted);
}

/* 条款模态框 */
.terms-modal-content {
  max-width: 800px;
}

.terms-body {
  max-height: 60vh;
  overflow-y: auto;
}

.terms-section {
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--fighter-border);
}

.terms-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.terms-section h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fighter-primary);
  margin: 0 0 var(--space-3) 0;
}

.terms-section p {
  font-size: var(--text-sm);
  color: var(--fighter-text-muted);
  margin: var(--space-2) 0;
  line-height: 1.6;
}

/* 赛事详情模态框 */
.tournament-details-modal-content {
  max-width: 900px;
}

.detail-section {
  margin-bottom: var(--space-5);
}

.detail-section h4 {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--fighter-primary);
  margin: 0 0 var(--space-3) 0;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.detail-label {
  font-size: var(--text-xs);
  color: var(--fighter-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-value {
  font-size: var(--text-sm);
  color: var(--fighter-text);
  font-weight: 500;
}

.tournament-signup-notification {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  z-index: calc(var(--z-modal) + 20);
  min-width: 280px;
  max-width: min(88vw, 480px);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 18px 40px rgba(2, 6, 23, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tournament-signup-notification.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tournament-signup-notification.error {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(69, 10, 10, 0.96);
}

.tournament-signup-notification.success {
  border-color: rgba(52, 211, 153, 0.26);
  background: rgba(6, 46, 33, 0.96);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .tournament-signup-container {
    padding: var(--space-4);
  }

  .fighter-league-data,
  .available-tournaments,
  .signup-history {
    padding: var(--space-4);
    border-radius: var(--radius-xl);
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .fighter-header {
    flex-direction: column;
    text-align: center;
  }

  .fighter-stats {
    justify-content: center;
  }

  .tournaments-filters {
    padding: var(--space-4);
    gap: var(--space-3);
  }

  .filter-group {
    width: 100%;
    flex-direction: row;
  }

  .filter-prefix {
    min-width: 64px;
  }

  .tournaments-grid {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  .tournament-header {
    flex-direction: column;
  }

  .deadline-pill {
    width: 100%;
    align-items: flex-start;
  }

  .tournament-meta {
    grid-template-columns: 1fr;
  }

  .meta-item.wide {
    grid-column: span 1;
  }

  .tournament-weight-row {
    flex-direction: column;
    align-items: stretch;
  }

  .tournament-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tournament-actions {
    flex-direction: column;
  }

  .history-table {
    overflow-x: auto;
  }

  .history-table th,
  .history-table td {
    padding: var(--space-3);
    font-size: var(--text-xs);
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
