:root {
  --primary: #003478;
  --primary-dark: #00204e;
  --secondary: #ff6b35;
  --gold: #d4af37;
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --surface-tint: #d8e3fb;
  --text: #111c2d;
  --muted: #5d6675;
  --border: #cfd6e4;
  --line: #e2e8f0;
  --success: #16a34a;
  --warning: #ca8a04;
  --shadow: 0 10px 30px rgba(17, 28, 45, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

body.menu-open {
  overflow: hidden;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(16px);
}

.nav-shell,
.container {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: 30px;
  color: var(--primary-dark);
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  background: var(--primary);
  font-size: 18px;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.desktop-nav a {
  position: relative;
  padding: 30px 0 27px;
  color: #3c4658;
}

.desktop-nav a[aria-current="page"],
.desktop-nav a:hover {
  color: var(--primary);
}

.desktop-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 2px;
  background: var(--secondary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.search {
  position: relative;
}

.search input {
  width: 260px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px 12px 42px;
  background: #e8eefb;
  color: var(--text);
  outline: none;
}

.search span {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--primary-dark);
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--surface-soft);
}

.mobile-menu {
  display: none;
}

.hero {
  margin-top: 28px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--primary-dark);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 48px;
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 32, 78, 0.96), rgba(0, 52, 120, 0.88));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.eyebrow,
.chip,
.status,
.mini-label {
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: 12px;
  line-height: 1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 12px;
  border-radius: 999px;
  color: #ffe9b2;
  background: rgba(212, 175, 55, 0.16);
  border: 1px solid rgba(212, 175, 55, 0.42);
}

.hero h1,
.page-title h1 {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.03;
}

.hero p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions,
.toolbar,
.tabs,
.filter-row,
.language-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.language-strip,
.fixture-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}

.language-strip a,
.fixture-pill,
.mini-standing,
.tool-card,
.quick-links a {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.language-strip a {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.language-strip a.active,
.language-strip a:hover {
  color: var(--primary-dark);
  background: #fff;
}

.section-head.compact {
  margin-top: 24px;
}

.fixture-pill {
  flex: 0 0 min(300px, 82vw);
  display: grid;
  gap: 6px;
  padding: 16px;
  color: var(--primary-dark);
  background: var(--surface);
  border-color: var(--border);
}

.fixture-pill:hover,
.mini-standing:hover,
.tool-card:hover,
.quick-links a:hover {
  transform: translateY(-2px);
  border-color: var(--secondary);
  box-shadow: var(--shadow);
}

.fixture-pill span,
.fixture-pill small,
.tool-card span,
.mini-standing span {
  color: var(--muted);
}

.group-overview,
.tools-grid {
  align-items: stretch;
}

.mini-standing,
.tool-card,
.quick-links a {
  display: grid;
  gap: 8px;
  padding: 18px;
  color: var(--primary-dark);
  background: var(--surface);
  border-color: var(--border);
}

.quick-links {
  display: grid;
  gap: 12px;
}

.tool-card strong,
.mini-standing strong {
  font-family: Inter, Arial, sans-serif;
  font-size: 20px;
}

.tool-panel select {
  width: 100%;
  max-width: 360px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.timezone-output {
  margin: 16px 0 0;
  padding: 0;
  max-height: 360px;
  overflow: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 18px;
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.btn.primary {
  color: #fff;
  background: var(--secondary);
}

.btn.secondary {
  color: #fff;
  background: var(--primary);
}

.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
}

.hero-media {
  position: relative;
  min-height: 420px;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 10px;
  max-width: 440px;
}

.countdown div {
  padding: 14px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  text-align: center;
}

.countdown strong {
  display: block;
  font-family: Inter, Arial, sans-serif;
  font-size: 30px;
}

.countdown span {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
}

.section {
  padding: 44px 0 0;
}

.section-head,
.page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section h2,
.page-title h1 {
  margin: 0;
  color: var(--primary-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.12;
}

.section-head p,
.page-title p {
  margin: 8px 0 0;
  max-width: 720px;
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  gap: 24px;
}

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

.grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.layout > *,
.grid > *,
.side-stack,
.side-stack > *,
.panel,
.card,
.match-card,
.table-scroll {
  min-width: 0;
}

.card,
.panel,
.ad-slot,
.match-card,
.team-card,
.venue-card,
.tool-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(17, 28, 45, 0.04);
}

.card,
.panel,
.tool-panel {
  padding: 24px;
}

.match-card {
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(260px, 1fr) 168px;
  align-items: center;
  gap: 24px;
  padding: 24px;
  overflow: hidden;
}

.match-card + .match-card {
  margin-top: 16px;
}

.match-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 24px;
  bottom: 24px;
  width: 4px;
  background: var(--secondary);
}

.match-meta {
  color: var(--muted);
  line-height: 1.5;
}

.match-time {
  display: block;
  margin-top: 4px;
  font-family: Inter, Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--primary-dark);
}

.scoreline {
  display: grid;
  grid-template-columns: 96px minmax(90px, 1fr) 96px;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.team-badge {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin: 0 auto 10px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--primary-dark);
  overflow: hidden;
}

.team-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score {
  font-family: Inter, Arial, sans-serif;
  font-size: 56px;
  line-height: 1;
  font-weight: 800;
  color: var(--text);
}

.prediction {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--secondary);
}

.status.muted {
  color: var(--primary-dark);
  background: var(--surface-tint);
}

.status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.match-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.tabs {
  border-bottom: 1px solid var(--border);
}

.tab {
  border: 0;
  background: transparent;
  padding: 14px 20px;
  color: var(--muted);
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.tab.is-active {
  color: var(--primary);
  border-color: var(--secondary);
}

.filter-card {
  padding: 24px;
}

.filter-row {
  justify-content: space-between;
}

.filter-row select,
.tool-panel select,
.tool-panel input,
.toolbar input {
  border: 0;
  border-radius: var(--radius);
  padding: 12px 14px;
  background: var(--surface-soft);
  color: var(--text);
  outline: none;
  max-width: 100%;
}

.date-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 18px 0 2px;
}

.date-pill {
  min-width: 92px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}

.date-pill strong {
  display: block;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.date-pill.active {
  color: #b7c9f4;
  background: var(--primary);
  box-shadow: var(--shadow);
}

.date-pill.active strong {
  color: #fff;
}

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

th,
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: var(--surface-soft);
  color: #475569;
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  text-transform: uppercase;
}

td.num,
th.num {
  text-align: center;
}

tbody tr.qualifier {
  background: #ecfdf3;
}

tbody tr.bubble {
  background: #fffbea;
}

.ad-slot {
  display: grid;
  place-items: center;
  min-height: 250px;
  background: #dae5fb;
  color: #4b5563;
  text-align: center;
  font-family: Inter, Arial, sans-serif;
}

.ad-slot.banner {
  min-height: 90px;
  margin-top: 24px;
}

.side-stack {
  display: grid;
  gap: 24px;
}

.side-stack .match-card {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
}

.side-stack .scoreline {
  grid-template-columns: 1fr;
}

.side-stack .team-badge {
  width: 58px;
  height: 58px;
  font-size: 16px;
}

.side-stack .score {
  font-size: 34px;
}

.side-stack .match-actions {
  align-items: stretch;
}

.team-card,
.venue-card {
  overflow: hidden;
}

.team-card a,
.venue-card a {
  display: block;
  padding: 18px;
}

.team-card:hover,
.venue-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.flag-tile {
  display: grid;
  place-items: center;
  height: 112px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #dbeafe, #ffffff);
  border: 1px solid var(--border);
  color: var(--primary-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: 30px;
  font-weight: 800;
  overflow: hidden;
}

.flag-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 14px 0 8px;
  color: var(--primary-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: 20px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.mini-label,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
}

.chip {
  color: var(--primary);
  background: var(--surface-soft);
}

.chip.gold {
  color: #4e3d00;
  background: #f7dc76;
}

.profile-header {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px;
}

.profile-main {
  display: flex;
  align-items: center;
  gap: 24px;
}

.profile-header .flag-tile {
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
}

.profile-header h1 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: 52px;
  line-height: 1;
}

.form-line {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.form-line span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius);
  background: var(--surface-tint);
  color: var(--primary-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
}

.form-line span.w {
  color: #fff;
  background: var(--secondary);
}

.form-line span.l {
  color: #fff;
  background: #dc2626;
}

.timeline {
  position: relative;
  display: grid;
  gap: 18px;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -23px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold);
}

.venue-media {
  height: 150px;
  background: var(--surface-soft);
  overflow: hidden;
}

.venue-media.large {
  height: 260px;
  border-radius: var(--radius);
  margin-bottom: 24px;
}

.venue-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stats-list {
  display: grid;
  gap: 14px;
}

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

.stat-row {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  gap: 12px;
  align-items: center;
}

.track {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.news-list {
  display: grid;
  gap: 16px;
}

.news-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.news-thumb {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--primary);
  font-family: Inter, Arial, sans-serif;
  font-weight: 800;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tools-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

.tool-panel form {
  display: grid;
  gap: 14px;
}

.footer {
  margin-top: 56px;
  padding: 44px 0 72px;
  color: #cbd5e1;
  background: #0f1b2d;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 32px;
}

.footer h2,
.footer h3 {
  margin: 0 0 14px;
  color: #fff;
  font-family: Inter, Arial, sans-serif;
}

.footer a {
  display: block;
  margin: 10px 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bottom-tabs {
  display: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1040px) {
  .desktop-nav,
  .search {
    display: none;
  }

  .mobile-menu {
    position: fixed;
    inset: 78px 16px auto;
    z-index: 50;
    display: none;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  body.menu-open .mobile-menu {
    display: grid;
  }

  .mobile-menu a {
    padding: 14px;
    border-radius: var(--radius);
    font-weight: 800;
    color: var(--primary-dark);
  }

  .mobile-menu a:hover {
    background: var(--surface-soft);
  }

  .hero,
  .layout,
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 2;
  }

  .match-card {
    grid-template-columns: 1fr;
  }

  .match-actions {
    align-items: stretch;
  }

  .side-stack {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .nav-shell,
  .container {
    width: min(100% - 32px, 1280px);
  }

  .brand {
    font-size: 21px;
  }

  .hero {
    min-height: 0;
    margin-top: 18px;
  }

  .hero-copy {
    padding: 28px 20px;
  }

  .hero p {
    font-size: 16px;
  }

  .countdown {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .footer-grid,
  .side-stack {
    grid-template-columns: 1fr;
  }

  .section-head,
  .page-title,
  .profile-header,
  .profile-main {
    display: grid;
    align-items: start;
  }

  .profile-header h1 {
    font-size: 40px;
  }

  .profile-header .flag-tile {
    width: 104px;
    height: 104px;
  }

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

  .score {
    font-size: 46px;
  }

  table {
    min-width: 620px;
  }

  .news-item {
    grid-template-columns: 1fr;
  }

  .bottom-tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
  }

  .bottom-tabs a {
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 58px;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 800;
  }

  .footer {
    padding-bottom: 112px;
  }
}

/* H5 移动端深度适配与表格防溢出调优 */
@media (max-width: 760px) {
  .table-scroll {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important; /* 强制 iOS 丝滑滚动 */
    margin-bottom: 16px;
    border-radius: var(--radius);
  }
  table {
    min-width: 520px !important; /* 确保列数据在窄屏下不被过分压缩 */
  }
  .match-card {
    padding: 16px !important;
    gap: 14px !important;
  }
  .score {
    font-size: 38px !important;
  }
}
