/* ===========================
   赛事页面 — 深色玻璃态
=========================== */

/* ---- 顶部区域（Tab + 联赛栏） ---- */
.event-tabs {
  display: flex; gap:0;
  background: rgba(11,20,38,0.92);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: fixed; top:0; left:50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: var(--z-sticky);
  box-sizing: border-box;
}
.event-tab {
  flex:1; text-align: center; padding: 15px 0;
  font-size: var(--fs-sm); font-weight: 700;
  color: var(--text-muted); cursor: pointer; position: relative;
  transition: all 0.2s; -webkit-tap-highlight-color: transparent;
}
.event-tab.active { color: var(--text-main); }
.event-tab.active::after {
  content: ''; position: absolute; bottom:0; left:25%; right:25%;
  height: 3px; background: var(--primary);
  border-radius: 2px; box-shadow: 0 2px 8px rgba(0,230,138,0.3);
}

/* ---- 联赛横滚筛选栏 ---- */
.evt-league-bar-wrap {
  position: fixed;
  top: 50px; /* Tab 栏高度 */
  left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  z-index: calc(var(--z-sticky) - 1);
  background: rgba(9,16,32,0.95);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-sizing: border-box;
  overflow: hidden;
}
#evtLeagueBar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
}
#evtLeagueBar::-webkit-scrollbar { display: none; }

.evt-league-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  scroll-snap-align: start;
  transition: all 0.18s;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.evt-league-item.active {
  background: rgba(0,230,138,0.12);
  border-color: rgba(0,230,138,0.35);
}
.evt-league-item:active { transform: scale(0.95); }

.evt-league-logo {
  width: 20px; height: 20px;
  border-radius: 50%;
  object-fit: contain;
}
.evt-league-logo-placeholder {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--primary); opacity: 0.7;
}
.evt-league-name {
  font-size: 12px; font-weight: 600;
  color: var(--text-muted);
}
.evt-league-item.active .evt-league-name {
  color: var(--primary);
}

/* 联赛栏加载占位 */
.evt-league-loading {
  padding: 10px 18px;
  color: var(--text-muted);
  font-size: 14px;
  animation: evtSpin 1s linear infinite;
}
@keyframes evtSpin { to { transform: rotate(360deg); } }

/* ---- 内容区留白 ---- */
#eventContent {
  padding-top: 70px; /* Tab(50) + 联赛栏(约46) + 间距 */
}

/* ---- 比赛卡片列表 ---- */
.evt-match-list {
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ---- 比赛卡片 ---- */
.evt-match-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.18s, border-color 0.18s;
  box-shadow: 0 4px 18px rgba(0,0,0,0.16);
  -webkit-tap-highlight-color: transparent;
}
.evt-match-card:active {
  transform: scale(0.985);
  box-shadow: 0 2px 10px rgba(0,0,0,0.24);
}
.evt-match-card:hover {
  border-color: rgba(0,230,138,0.2);
  box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}

/* 卡片顶部：轮次 + 状态 + 时间 */
.evt-match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.evt-match-league-info {
  display: flex; align-items: center; gap: 6px;
}
.evt-match-round {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.evt-match-time-info {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

/* 状态徽章 */
.evt-match-status-badge {
  font-size: 10px; font-weight: 800;
  padding: 2px 8px; border-radius: 8px;
  display: inline-block;
}
.evt-match-status-badge.upcoming {
  background: rgba(0,230,138,0.08);
  color: var(--primary);
  border: 1px solid rgba(0,230,138,0.18);
}
.evt-match-status-badge.live {
  background: var(--accent-red-soft, rgba(255,107,107,0.12));
  color: var(--accent-red, #FF6B6B);
  border: 1px solid rgba(255,107,107,0.25);
  animation: evtLivePulse 1.5s ease-in-out infinite;
}
.evt-match-status-badge.finished {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.08);
}
@keyframes evtLivePulse {
  0%, 100% { opacity:1; }
  50% { opacity:0.55; }
}

/* 卡片中部：主队 VS 客队 */
.evt-match-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.evt-team {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.evt-team.away {
  flex-direction: row-reverse;
  justify-content: flex-start;
}
.evt-team-logo {
  width: clamp(28px,9vw,36px);
  height: clamp(28px,9vw,36px);
  border-radius: 50%;
  object-fit: contain;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
}
.evt-team-logo-ph {
  width: clamp(28px,9vw,36px);
  height: clamp(28px,9vw,36px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  font-size: 14px; color: var(--text-muted);
  flex-shrink: 0;
}
.evt-team-info {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.evt-team-name {
  font-size: 13px; font-weight: 700;
  color: var(--text-main);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.evt-team.away .evt-team-info {
  justify-content: flex-end;
}
.evt-team.away .evt-team-name {
  text-align: right;
}
.evt-team-tag {
  font-size: 9px; font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(0,230,138,0.1);
  color: var(--primary);
  border: 1px solid rgba(0,230,138,0.2);
  flex-shrink: 0;
  line-height: 1.2;
}

/* 比分 / VS */
.evt-score-wrap {
  flex-shrink: 0;
  min-width: 54px;
  text-align: center;
}
.evt-score {
  font-family: var(--font-display, monospace);
  font-size: 20px; font-weight: 800;
  color: var(--text-main);
  letter-spacing: 1px;
}
.evt-score.live {
  color: var(--accent-red, #FF6B6B);
  text-shadow: 0 0 10px rgba(255,107,107,0.4);
}
.evt-vs {
  font-family: var(--font-display, monospace);
  font-size: 13px; font-weight: 800;
  color: var(--primary);
  padding: 4px 10px;
  background: rgba(0,230,138,0.07);
  border-radius: 8px;
  border: 1px solid rgba(0,230,138,0.12);
  opacity: 0.85;
}

/* 赔率行 */
.evt-odds-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.evt-odds-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.evt-odds-btn:active {
  background: rgba(0,230,138,0.1);
  border-color: rgba(0,230,138,0.3);
}
.evt-odds-btn.selected {
  background: rgba(0,230,138,0.15);
  border-color: rgba(0,230,138,0.45);
  box-shadow: 0 0 0 2px rgba(0,230,138,0.15);
}
.evt-odds-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.evt-odds-val {
  font-size: 14px;
  color: var(--primary);
  font-weight: 800;
}

/* 底部投注栏 */
.evt-match-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.evt-bet-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 0;
  background: linear-gradient(135deg, rgba(0,230,138,0.15), rgba(0,230,138,0.05));
  border: 1px solid rgba(0,230,138,0.25);
  border-radius: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.evt-bet-btn:active {
  background: linear-gradient(135deg, rgba(0,230,138,0.25), rgba(0,230,138,0.12));
  transform: scale(0.97);
}
.evt-more-link {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 7px 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.evt-more-link:hover,
.evt-more-link:active {
  color: var(--primary);
}
.evt-more-link i {
  font-size: 10px;
}

/* ---- 空状态 ---- */
.evt-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 12px;
}
.evt-empty-icon {
  font-size: 40px;
  color: var(--text-muted);
  opacity: 0.45;
}
.evt-empty-text {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ---- 加载状态 ---- */
.evt-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  gap: 12px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
}
.evt-spin {
  font-size: 28px;
  animation: evtSpin 0.8s linear infinite;
  display: inline-block;
}

/* ---- 分页 ---- */
.evt-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 0 24px;
}
.evt-page-btn {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.evt-page-btn:active { transform: scale(0.92); }
.evt-page-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
}
.evt-page-info {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  font-weight: 600;
  min-width: 54px;
  text-align: center;
}

/* ---- 旧样式兼容保留（live/finished group 视图） ---- */
.event-group { padding:0 18px; }
.event-group-title {
  font-size: var(--fs-sm); color: var(--text-muted); font-weight: 700;
  padding: 18px 4px 12px; letter-spacing: 0.5px; text-transform: uppercase;
}
.event-match {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: space-between;
}
