/* ============================================
   西甲联赛官网 · 设计系统
   色彩：绯红 / 鎏金 / 暖炭黑 / 米白 —— 西班牙足球气质
   ============================================ */

:root {
  --bg: #14100d;
  --bg-elevated: #1d1713;
  --bg-card: #221a15;
  --border: #372c22;
  --foreground: #f3ece2;
  --muted: #a3937f;
  --primary: #d3222e;
  --primary-strong: #ef3a44;
  --gold: #e0b25c;
  --radius: 14px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

.page-bg { background: var(--bg); }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1180px, 92%); margin-inline: auto; }
.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.8rem; border-radius: 999px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.04em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #a5121d 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(211, 34, 46, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(211, 34, 46, 0.5); }
.btn-ghost {
  border: 1px solid rgba(243, 236, 226, 0.35); color: var(--foreground);
  backdrop-filter: blur(4px);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 16, 13, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 2rem; padding: 0.9rem 0; }
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-crest {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #7d0d16);
  color: #fff; font-weight: 900; font-size: 1.05rem; letter-spacing: -0.02em;
  box-shadow: inset 0 0 0 1.5px rgba(224, 178, 92, 0.7);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.12rem; letter-spacing: 0.08em; }
.brand-text small { color: var(--gold); font-size: 0.68rem; letter-spacing: 0.18em; }
.main-nav { display: flex; gap: 1.8rem; margin-left: auto; }
.main-nav a {
  font-size: 0.95rem; color: var(--muted); font-weight: 600;
  transition: color 0.2s ease;
}
.main-nav a:hover { color: var(--gold); }
.header-cta { padding: 0.55rem 1.3rem; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(105deg, rgba(20, 16, 13, 0.94) 0%, rgba(20, 16, 13, 0.72) 45%, rgba(20, 16, 13, 0.25) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 32%);
}
.hero-content { position: relative; z-index: 1; padding: 7rem 0 5rem; }
.hero-kicker {
  color: var(--gold); font-weight: 700; letter-spacing: 0.32em;
  font-size: 0.82rem; margin-bottom: 1.2rem; text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2.6rem, 6.5vw, 4.6rem);
  font-weight: 900; line-height: 1.12; letter-spacing: 0.01em;
}
.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, var(--primary-strong), var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 34rem; color: rgba(243, 236, 226, 0.82);
  margin-top: 1.4rem; font-size: 1.08rem; line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.2rem; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 3.6rem; padding-top: 2rem;
  border-top: 1px solid rgba(224, 178, 92, 0.25);
}
.hero-stats dt {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 900; color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.hero-stats dd { color: var(--muted); font-size: 0.86rem; letter-spacing: 0.06em; }

/* ---------- 通用 Section ---------- */
.section { padding: clamp(4rem, 8vw, 6.5rem) 0; }
.section-head { text-align: center; max-width: 40rem; margin: 0 auto 3rem; }
.section-kicker {
  color: var(--primary-strong); font-weight: 800; letter-spacing: 0.3em;
  font-size: 0.76rem; margin-bottom: 0.8rem; text-transform: uppercase;
}
.section-head h2, .about-copy h2 {
  font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.25;
}
.section-desc { color: var(--muted); margin-top: 0.8rem; }

/* ---------- 赛程中心 ---------- */
.fixtures { background: var(--bg-elevated); border-block: 1px solid var(--border); }

.date-nav {
  display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 1.4rem;
}
.date-pill {
  display: flex; flex-direction: column; align-items: center;
  min-width: 74px; padding: 0.55rem 0.9rem;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-card); transition: border-color 0.2s ease, background 0.2s ease;
}
.date-pill:hover { border-color: var(--gold); }
.date-pill.active {
  background: linear-gradient(135deg, var(--primary), #8d101a);
  border-color: transparent;
  box-shadow: 0 6px 20px rgba(211, 34, 46, 0.4);
}
.pill-week { font-size: 0.78rem; color: var(--muted); }
.date-pill.active .pill-week { color: rgba(255, 255, 255, 0.85); }
.pill-date { font-weight: 800; font-size: 1rem; font-variant-numeric: tabular-nums; }

.league-toggle { display: flex; justify-content: center; gap: 0.6rem; margin-bottom: 2.4rem; }
.toggle-btn {
  padding: 0.5rem 1.4rem; border-radius: 999px; font-size: 0.88rem; font-weight: 700;
  border: 1px solid var(--border); color: var(--muted);
  transition: all 0.2s ease;
}
.toggle-btn:hover { color: var(--foreground); border-color: var(--gold); }
.toggle-btn.active { background: var(--gold); border-color: var(--gold); color: #241a08; }

.notice {
  text-align: center; padding: 3rem 1.5rem; border-radius: var(--radius);
  background: var(--bg-card); border: 1px dashed var(--border); color: var(--muted);
}
.notice-error { border-color: rgba(211, 34, 46, 0.5); color: var(--primary-strong); }

.match-group { margin-bottom: 2.6rem; }
.group-title {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: 1.05rem; font-weight: 800; margin-bottom: 1.1rem;
  padding-left: 0.9rem; border-left: 3px solid var(--gold);
}
.group-title.live { border-left-color: var(--primary-strong); }
.group-count { color: var(--muted); font-size: 0.82rem; font-weight: 600; }

.match-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
}

.match-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem 0.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.match-card:hover {
  transform: translateY(-3px); border-color: rgba(224, 178, 92, 0.55);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.match-card.is-live { border-color: rgba(211, 34, 46, 0.55); }

.match-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.9rem; font-size: 0.78rem;
}
.match-league { color: var(--gold); font-weight: 700; letter-spacing: 0.04em; }
.match-state { color: var(--muted); }
.state-live { color: var(--primary-strong); font-weight: 800; animation: pulse 1.6s ease-in-out infinite; }
.state-done { color: var(--muted); }
@keyframes pulse { 50% { opacity: 0.55; } }

.match-body {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: start; gap: 0.6rem;
}
.team { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.4rem; }
.team img, .logo-fallback { width: 44px; height: 44px; object-fit: contain; }
.logo-fallback {
  display: grid; place-items: center; border-radius: 50%;
  background: var(--bg-elevated); border: 1px solid var(--border);
  font-weight: 800; color: var(--gold);
}
.team-name { font-size: 0.9rem; font-weight: 700; line-height: 1.3; }
.team-rank { font-size: 0.7rem; color: var(--muted); }

.match-score { display: flex; flex-direction: column; align-items: center; padding-top: 0.35rem; min-width: 84px; }
.score {
  font-size: 1.7rem; font-weight: 900; font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}
.score i { font-style: normal; color: var(--muted); padding-inline: 0.28rem; font-weight: 400; }
.half-score { font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }
.kickoff { font-size: 1.45rem; font-weight: 900; color: var(--gold); font-variant-numeric: tabular-nums; }
.vs { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.25em; margin-top: 0.1rem; }

.match-time {
  display: block; text-align: center; margin-top: 0.8rem; padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.72rem; color: var(--muted); font-variant-numeric: tabular-nums;
}

.live-watch-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  width: 100%; min-height: 44px; margin-top: 0.75rem; padding: 0.65rem 1rem;
  border-radius: 0.65rem; background: var(--primary); color: var(--foreground);
  font-size: 0.92rem; font-weight: 800; letter-spacing: 0.08em;
  box-shadow: 0 8px 24px rgba(211, 34, 46, 0.28);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.live-watch-btn:hover {
  transform: translateY(-1px); background: var(--primary-strong);
  box-shadow: 0 10px 28px rgba(211, 34, 46, 0.4);
}
.live-watch-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.live-watch-dot {
  width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--foreground);
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.14);
  animation: pulse 1.6s ease-in-out infinite;
}
.live-watch-arrow { margin-left: 0.1rem; font-size: 1.05rem; }

.data-note { text-align: center; color: var(--muted); font-size: 0.78rem; margin-top: 1rem; }

/* ---------- 联赛介绍 ---------- */
.about-grid {
  display: grid; grid-template-columns: 1.15fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem); align-items: center;
}
.about-copy h2 { margin: 0.6rem 0 1.4rem; }
.about-copy p { color: rgba(243, 236, 226, 0.78); margin-bottom: 1.1rem; }
.about-facts { display: grid; gap: 1rem; }
.about-facts li {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.15rem 1.35rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  transition: border-color 0.2s ease;
}
.about-facts li:hover { border-color: rgba(224, 178, 92, 0.5); }
.about-facts strong { color: var(--gold); font-size: 1rem; }
.about-facts span { color: var(--muted); font-size: 0.88rem; line-height: 1.55; }

/* ---------- 球队 ---------- */
.clubs { background: var(--bg-elevated); border-top: 1px solid var(--border); }
.club-grid {
  display: grid; gap: 1.1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.club-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.7rem 1.4rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.club-card:hover { transform: translateY(-4px); border-color: rgba(211, 34, 46, 0.55); }
.club-crest {
  display: grid; place-items: center; margin: 0 auto 1rem;
  width: 60px; height: 60px; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #34281e, #1a130e);
  border: 1.5px solid var(--gold);
  color: var(--gold); font-size: 1.5rem; font-weight: 900;
}
.club-card h3 { font-size: 1.06rem; font-weight: 800; }
.club-en { color: var(--muted); font-size: 0.78rem; letter-spacing: 0.06em; margin-top: 0.2rem; }
.club-stadium { color: var(--gold); font-size: 0.78rem; margin-top: 0.7rem; }

/* ---------- 页脚 ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.6rem 0; background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem; }
.footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.footer-brand p { color: var(--muted); font-size: 0.8rem; }
.footer-nav { display: flex; gap: 1.4rem; margin-left: auto; }
.footer-nav a { color: var(--muted); font-size: 0.86rem; }
.footer-nav a:hover { color: var(--gold); }
.copyright { width: 100%; color: var(--muted); font-size: 0.76rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .hero { min-height: 78vh; }
  .footer-nav { margin-left: 0; }
}
