/* ===== 设计令牌 ===== */
:root {
  --bg: #0a0f1e;
  --surface: #111a2e;
  --surface-2: #18233c;
  --line: #223050;
  --text: #e9eef8;
  --muted: #8b96b0;
  --amber: #f0a63c;
  --radius: 14px;
  --font-display: "Arial Black", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "Menlo", "Consolas", monospace;
}

/* ===== 基础 ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.7; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; letter-spacing: 0.01em; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ===== 页头 ===== */
.site-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: rgba(10, 15, 30, 0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 0.05em; text-transform: uppercase; }
.brand-mark { color: var(--amber); }
.site-nav { display: flex; gap: 6px; }
.site-nav a { padding: 6px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; transition: color 0.15s ease, background 0.15s ease; }
.site-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.site-nav a[aria-current="page"] { color: var(--amber); background: rgba(240, 166, 60, 0.12); }

/* ===== 首页英雄区：球场计分板 ===== */
.hero { position: relative; overflow: hidden; max-width: 1080px; margin: 0 auto; padding: 72px 24px 56px; text-align: center; }
.hero::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 79px, rgba(255, 255, 255, 0.045) 79px 80px), repeating-linear-gradient(0deg, transparent 0 79px, rgba(255, 255, 255, 0.045) 79px 80px); -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); pointer-events: none; }
.hero::after { content: ""; position: absolute; left: 50%; top: 20px; width: 420px; height: 420px; transform: translateX(-50%); border: 2px solid rgba(240, 166, 60, 0.26); border-radius: 50%; pointer-events: none; }
.hero > * { position: relative; }
.eyebrow { font-family: var(--font-mono); color: var(--amber); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.78rem; }
.hero h1 { font-size: clamp(2.2rem, 6vw, 4.2rem); margin: 18px 0; text-wrap: balance; }
.hero-lead { max-width: 640px; margin: 0 auto 28px; color: var(--muted); font-size: 1.05rem; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { display: inline-block; padding: 12px 22px; border-radius: 999px; font-weight: 700; transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(135deg, var(--amber), #ff8a4c); color: #140f07; box-shadow: 0 8px 24px rgba(240, 166, 60, 0.28); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ===== 通用段落 ===== */
.section { max-width: 1080px; margin: 0 auto; padding: 56px 24px; }
.section h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 14px; }
.section > p { color: var(--muted); max-width: 720px; }
.page-head { max-width: 1080px; margin: 0 auto; padding: 48px 24px 8px; text-align: center; }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 10px 0; }
.page-head p:last-child { color: var(--muted); }

/* ===== 统计条 ===== */
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 32px 0; }
.stat { background: linear-gradient(160deg, var(--surface), var(--surface-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-align: center; animation: rise 0.4s ease both; }
.stat-number { display: block; font-family: var(--font-mono); font-size: 2rem; color: var(--amber); font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-size: 0.9rem; }

/* ===== 入口卡片 ===== */
.entry-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 28px; }
.entry-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.entry-card h3 { margin-bottom: 8px; }
.entry-card p { color: var(--muted); }
.entry-card:hover { transform: translateY(-3px); border-color: var(--amber); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35); }

/* ===== 筛选栏 ===== */
.filters { max-width: 1080px; margin: 0 auto; padding: 24px 24px 8px; display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 0.9rem; transition: all 0.15s ease; }
.chip:hover { color: var(--text); border-color: var(--amber); }
.chip.is-active { background: var(--amber); border-color: var(--amber); color: #140f07; font-weight: 700; }
.sort-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 0.9rem; }
#sortSelect { background: var(--surface); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 7px 10px; }

/* ===== 球队卡片：球衣挂牌 ===== */
.teams-grid { max-width: 1200px; margin: 0 auto; padding: 16px 24px 56px; display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.team-card { position: relative; display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; cursor: pointer; overflow: hidden; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; animation: rise 0.4s ease both; }
.team-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--team-color); }
.team-card:hover, .team-card:focus-visible { transform: translateY(-3px); border-color: var(--team-color); box-shadow: 0 10px 30px color-mix(in srgb, var(--team-color) 35%, transparent); }
.team-badge { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-size: 1rem; color: #fff; background: linear-gradient(145deg, var(--team-color), var(--team-accent)); box-shadow: inset 0 -4px 10px rgba(0, 0, 0, 0.35), 0 4px 14px color-mix(in srgb, var(--team-color) 45%, transparent); text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45); }
.team-card-meta h2 { font-size: 1.05rem; margin-bottom: 2px; }
.team-card-meta p { color: var(--muted); font-size: 0.85rem; }
.team-titles strong { font-family: var(--font-mono); color: var(--amber); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.empty-state { max-width: 1080px; margin: 0 auto; padding: 40px 24px; text-align: center; color: var(--muted); }

/* ===== 弹窗 ===== */
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5, 8, 16, 0.74); backdrop-filter: blur(4px); }
.modal-panel { position: relative; width: min(560px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 28px; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5); animation: rise 0.22s ease both; }
.modal-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.modal-close:hover { color: var(--text); border-color: var(--amber); }
.modal-badge { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); color: #fff; background: linear-gradient(145deg, var(--team-color), var(--team-accent)); box-shadow: 0 8px 24px color-mix(in srgb, var(--team-color) 50%, transparent); margin-bottom: 14px; }
.modal-panel h2 { font-size: 1.5rem; }
.modal-panel h3 { font-size: 1rem; margin: 18px 0 6px; color: var(--amber); }
.team-facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 18px 0; }
.team-facts div { border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.team-facts dt { color: var(--muted); font-size: 0.8rem; }
.team-facts dd { margin: 0; font-weight: 600; }
.modal-panel p { color: var(--muted); }
body.modal-open { overflow: hidden; }

/* ===== 维护公告弹窗 ===== */
.notice-modal .modal-panel { max-width: 460px; text-align: center; border-top: 3px solid var(--amber); padding-top: 34px; }
.notice-modal .eyebrow { margin-bottom: 8px; }
.notice-modal h2 { font-size: 1.25rem; margin: 0; }

/* ===== 历史时间线：比赛时钟 ===== */
.timeline-wrap { max-width: 860px; margin: 0 auto; padding: 32px 24px 72px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 12px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--amber), var(--line)); }
.timeline-item { position: relative; padding: 0 0 32px 44px; animation: rise 0.4s ease both; }
.timeline-item::before { content: ""; position: absolute; left: 6px; top: 10px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--amber); box-shadow: 0 0 0 4px rgba(240, 166, 60, 0.18); }
.timeline-year { font-family: var(--font-mono); color: var(--amber); font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.timeline-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: transform 0.18s ease, border-color 0.18s ease; }
.timeline-item:hover .timeline-body { transform: translateX(4px); border-color: var(--amber); }
.timeline-body h2 { font-size: 1.15rem; margin: 4px 0 8px; }
.timeline-body p { color: var(--muted); }
.timeline-tags { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.timeline-tags span { font-size: 0.72rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--amber); }

/* ===== 页脚 ===== */
.footer { border-top: 1px solid var(--line); padding: 28px 24px 22px; text-align: center; color: var(--muted); font-size: 0.85rem; }
.footer footer { max-width: 1080px; margin: 0 auto; }
.footer-box-1 { margin-bottom: 18px; }
.footer-box-1 h5, .footer-box-2 h5 { font-family: var(--font-display); font-size: 0.95rem; color: var(--text); margin: 0 0 8px; }
.lianjie a { color: var(--amber); margin: 0 8px; }
.lianjie a:hover, .footer-box-2 a:hover { color: var(--text); }
.shengming p { margin: 0 auto; line-height: 1.8; }
.shengming .nowrap { white-space: nowrap; }
.footer-box-2 p { margin: 0; }
.footer-copy { margin-top: 10px; }
.footer-box-2 a { color: var(--amber); }

/* ===== 动效 ===== */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ===== 响应式 ===== */
@media (max-width: 900px) { .stat-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .site-header { flex-direction: column; padding: 12px 16px; }
  .site-nav { width: 100%; justify-content: center; }
  .hero { padding-top: 48px; }
  .hero::after { width: 280px; height: 280px; }
  .teams-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding: 12px 16px 48px; }
  .section, .page-head, .filters, .timeline-wrap { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 480px) { .team-facts { grid-template-columns: 1fr; } }
@media (min-width: 1500px) { .teams-grid { max-width: 1440px; grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ===== 无障碍：减少动效 ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .team-card:hover, .entry-card:hover, .btn:hover, .timeline-item:hover .timeline-body { transform: none; }
}
