:root {
  --bg: #0b0d14;
  --card: #171a26;
  --card-hover: #1d2130;
  --border: #262b3d;
  --text: #e8eaf0;
  --muted: #8a8fa3;
  --primary: #3b6cff;
  --live: #d4382c;
  --upcoming: #2a3f5f;
  --upcoming-text: #7fb2ff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 24px;
  height: 56px;
  background: rgba(11, 13, 20, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #5b8cff, #a06bff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-icon {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.topnav { display: flex; gap: 20px; }
.topnav a { color: var(--muted); font-size: 14px; transition: color .15s; }
.topnav a:hover { color: #fff; }
.topnav a.active { color: #fff; font-weight: 600; }

.container { max-width: 960px; margin: 0 auto; padding: 20px 16px 60px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  margin: 28px 4px 14px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, #5b8cff, #a06bff);
}
.section-title .more {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}
.section-title .more:hover { color: #fff; }

/* ---------- 宣传海报轮播 ---------- */
.hero {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  height: 260px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 48px;
  opacity: 0;
  transition: opacity .6s;
  pointer-events: none;
}
.hero-slide.active { opacity: 1; pointer-events: auto; }

.hero-slide::before {
  content: '';
  position: absolute;
  right: -80px;
  top: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
}
.hero-slide::after {
  content: '';
  position: absolute;
  right: 60px;
  bottom: -120px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}

.hero-worlds { background: linear-gradient(115deg, #1a1440 0%, #4a2b8f 55%, #7b4fd0 100%); }
.hero-msi { background: linear-gradient(115deg, #04282e 0%, #0b5c66 55%, #19a08a 100%); }
.hero-lpl { background: linear-gradient(115deg, #330d0d 0%, #8f1d1d 55%, #d04a2b 100%); }

/* 图片海报：背景图铺满，去掉装饰圆 */
.hero-img {
  background-size: cover;
  background-position: center;
}
.hero-slide.hero-img::before,
.hero-slide.hero-img::after { display: none; }

.hero-kicker {
  font-size: 13px;
  letter-spacing: 4px;
  color: rgba(255, 255, 255, .65);
  margin-bottom: 10px;
}
.hero-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 2px;
  color: #fff;
  text-shadow: 0 4px 24px rgba(0, 0, 0, .35);
}
.hero-sub {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, .8);
}
.hero-cta {
  margin-top: 22px;
  display: inline-block;
  width: fit-content;
  padding: 9px 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #14161f;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform .15s;
}
.hero-cta:hover { transform: scale(1.04); }

.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 48px;
  display: flex;
  gap: 8px;
  z-index: 2;
}
.hero-dot {
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .3);
  cursor: pointer;
  transition: background .2s;
}
.hero-dot.active { background: #fff; }

/* ---------- 横向滚动容器：隐藏原生滚动条（Windows 默认白底滚动条在深色主题下很突兀） ---------- */
.live-strip { scrollbar-width: none; -ms-overflow-style: none; }
.live-strip::-webkit-scrollbar { display: none; }

/* ---------- 直播横条 ---------- */
.live-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;              /* 锁死纵向，hover 上浮不触发滚动条 */
  padding-bottom: 6px;
  padding-top: 4px;                /* 给 hover 上浮预留空间，避免溢出裁剪 */
  margin-top: -4px;                /* 视觉上不占位 */
}
.live-card {
  flex: 0 0 300px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.live-card:hover { transform: translateY(-3px); border-color: var(--live); }
.live-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #ff6f64;
}
.live-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  animation: pulse 1.4s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
/* 两行式比分卡：队标 + 简称一行一队，比分右对齐，领先方高亮 */
.live-row { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.live-row .team-logo { width: 22px; height: 22px; font-size: 10px; }
.live-row .t {
  flex: 1 1 0;
  min-width: 0;
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-row .s { font-size: 20px; font-weight: 800; color: var(--muted); min-width: 22px; text-align: right; }
.live-row .s.win { color: #ff8f87; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.muted { color: var(--muted); font-size: 12px; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 11px;
  white-space: nowrap;
}
.tag-live { background: var(--live); color: #fff; }
.tag-upcoming { background: var(--upcoming); color: var(--upcoming-text); }
.tag-finished { background: #262a38; color: var(--muted); }

/* ---------- 首页分类 ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cat-item {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.cat-item:not(.disabled):hover { transform: translateY(-3px); border-color: var(--primary); }
.cat-icon {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
}
.cat-esports { background: linear-gradient(135deg, #3b6cff, #7b4fd0); }
.cat-racing { background: linear-gradient(135deg, #d04a2b, #e8a02d); }
.cat-sports { background: linear-gradient(135deg, #19a08a, #3b6cff); }
.cat-lol { background: linear-gradient(135deg, #c8a24a, #8f6b1d); }
.cat-dota2 { background: linear-gradient(135deg, #a83232, #5f1d1d); }
.cat-cs2 { background: linear-gradient(135deg, #e8a02d, #8f5f1d); }
.cat-valorant { background: linear-gradient(135deg, #e83a5f, #8f1d35); }
.cat-kpl { background: linear-gradient(135deg, #7b4fd0, #3b2b8f); }

.cat-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.disabled { opacity: .45; cursor: default; }

/* ---------- 赛程页 ---------- */
/* 联赛筛选用多行 pill（参考主流赛事站做法），不换行硬挤成横向滚动 */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 12px; }
.tab {
  padding: 7px 18px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  font-size: 13px;
  transition: all .15s;
}
.tab:hover { color: #fff; }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.status-tabs { display: flex; gap: 22px; margin-bottom: 10px; }
.status-tab {
  color: var(--muted);
  cursor: pointer;
  padding-bottom: 6px;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  transition: color .15s;
}
.status-tab:hover { color: #fff; }
.status-tab.active { color: #fff; border-bottom-color: var(--primary); }

.date-label { color: var(--muted); font-size: 12px; margin: 18px 4px 8px; }

.match {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  transition: transform .15s, border-color .15s;
}
.match::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--league-accent, var(--primary));
}
.match:hover { transform: translateY(-2px); background: var(--card-hover); }
.match-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 8px; }
.match-body { display: flex; align-items: center; }
.team { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.team-home { justify-content: flex-end; }
.team-logo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #232738;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  overflow: hidden;
  flex-shrink: 0;
}
.team-logo img { width: 100%; height: 100%; object-fit: contain; }
.team-name { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score { font-size: 20px; font-weight: 800; min-width: 24px; text-align: center; }
.vs { width: 110px; text-align: center; flex-shrink: 0; }
.vs .time { font-size: 13px; }
.vs .countdown { font-size: 11px; color: var(--upcoming-text); }
.vs .vs-text { font-size: 11px; color: var(--muted); }

/* 赛事制卡片（羽毛球等，无主客队） */
.match-event { cursor: default; }
.match-event:hover { transform: none; background: var(--card); }
.event-body { justify-content: space-between; gap: 12px; }
.event-title { font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.hint { text-align: center; color: var(--muted); padding: 48px 0; }
.retry {
  display: inline-block;
  margin-top: 12px;
  padding: 6px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- 详情页 ---------- */
.detail-hero {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 22px 24px 26px;
  margin-bottom: 16px;
  background: linear-gradient(120deg, #171a26 0%, #1d2440 100%);
  border: 1px solid var(--border);
}
/* 联赛主题色光晕 */
.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 220px at 50% -80px, color-mix(in srgb, var(--accent, #3b6cff) 32%, transparent), transparent 72%);
}
.detail-hero > * { position: relative; }
.head-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 8px; }
.head-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.team-block {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.team-block .team-logo { width: 64px; height: 64px; font-size: 17px; border-radius: 14px; }
.team-block .team-name { font-size: 16px; font-weight: 700; }
.head-center { flex: 0 0 150px; text-align: center; }
.score-line { font-size: 42px; font-weight: 900; letter-spacing: 2px; }
.score-line .score-sep { color: var(--muted); margin: 0 10px; font-size: 30px; }
.score-line .score-vs { font-size: 32px; color: var(--muted); }
.vs-sub { color: var(--muted); font-size: 12px; margin-top: 8px; }

.games-card { padding: 8px 16px; }
.game-row {
  display: grid;
  grid-template-columns: 64px 1fr 16px 1fr 64px;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.game-row:last-child { border-bottom: none; }
.game-row .g-res { text-align: center; color: var(--muted); }
.game-row .g-res.win { color: #fff; font-weight: 700; }
.game-row .g-sep { text-align: center; }

/* 直播源链接 */
.stream-list { display: flex; flex-wrap: wrap; gap: 10px; }
.stream-link {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--primary);
  color: #9db9ff;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.stream-link:hover { background: var(--primary); color: #fff; }

/* ---------- 战队详情页 ---------- */
.team-hero .team-logo { width: 72px; height: 72px; font-size: 20px; border-radius: 16px; }
.team-hero-main { display: flex; align-items: center; gap: 16px; }
.team-hero-name { font-size: 24px; font-weight: 900; }
.team-link { cursor: pointer; transition: transform .15s; }
.team-link:hover { transform: translateY(-2px); }
.team-link:hover .team-name { color: #9db9ff; }
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 12px;
}
.player-card {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
}
.player-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #232738;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: var(--muted);
}
.player-name { font-weight: 700; font-size: 14px; margin-top: 8px; }
.player-sub { font-size: 12px; margin-top: 2px; }
.player-link { cursor: pointer; transition: transform .15s, border-color .15s; }
.player-link:hover { transform: translateY(-2px); border-color: var(--primary); }

/* ---------- 队员详情页 ---------- */
.player-hero-main { display: flex; align-items: center; gap: 18px; }
.player-hero-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  background: #232738;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--muted);
  flex-shrink: 0;
}
.player-hero-name { font-size: 26px; font-weight: 900; }
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px 24px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.info-row { display: flex; gap: 10px; font-size: 13px; }
.info-row .muted { flex: 0 0 40px; }
.team-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color .15s;
}
.team-link-card:hover { border-color: var(--primary); }
.team-link-card .team-logo { width: 44px; height: 44px; }

/* ---------- 职业生涯区块 ---------- */
.career-box {
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.career-winnings { font-size: 14px; margin-bottom: 8px; }
.career-winnings b { color: #ffd76f; font-size: 18px; margin-left: 6px; }
.career-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px dashed var(--border);
}
.career-row:last-of-type { border-bottom: none; }
.career-date { color: var(--muted); font-style: italic; }
.career-team { font-weight: 700; }
.achievement-list { display: flex; flex-wrap: wrap; gap: 8px; }
.achievement {
  font-size: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 215, 111, .12);
  border: 1px solid rgba(255, 215, 111, .35);
  color: #ffd76f;
}

.comment-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.comment-name { font-weight: 600; color: var(--upcoming-text); font-size: 13px; }
.comment-content { line-height: 1.6; }

.input-bar { display: flex; gap: 10px; margin-top: 16px; }
.input-bar input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 11px 20px;
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.input-bar input:focus { border-color: var(--primary); }
.send-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 26px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: opacity .15s;
}
.send-btn:hover { opacity: .85; }
.send-btn:disabled { opacity: .5; cursor: default; }

.back-link { color: var(--muted); font-size: 13px; cursor: pointer; }
.back-link:hover { color: #fff; }

/* ---------- 页脚 ---------- */
.footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

/* ---------- F1 赛历 ---------- */
.race-card {
  display: flex;
  align-items: center;
  gap: 16px;
}
.race-round {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: linear-gradient(135deg, #d04a2b, #e8a02d);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.race-info { flex: 1; min-width: 0; }
.race-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.race-name .tag { margin-left: 8px; }
.race-time { text-align: right; font-size: 13px; }
.race-time .tag { margin-top: 4px; }
.race-next { border-color: #d04a2b; }

@media (max-width: 600px) {
  .hero { height: 200px; }
  .hero-slide { padding: 0 28px; }
  .hero-title { font-size: 28px; }
  .hero-dots { left: 28px; }
  .vs { width: 80px; }
  .team-name { font-size: 13px; }
  .score { font-size: 17px; }
}
