:root {
  --bg0: #07111f;
  --bg1: #0d1b2e;
  --bg2: #132744;
  --panel: rgba(18, 36, 64, 0.78);
  --panel-solid: #143055;
  --line: rgba(120, 190, 255, 0.18);
  --text: #e8f2ff;
  --muted: #9bb4d0;
  --accent: #3de0c4;
  --accent2: #4f8cff;
  --warn: #ffb347;
  --danger: #ff5d7a;
  --radius: 16px;
  --shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --container: 1320px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 224, 196, 0.16), transparent 55%),
    radial-gradient(900px 500px at 90% 0%, rgba(79, 140, 255, 0.18), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 45%, #0a1628);
  min-height: 100vh;
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.container {
  width: min(var(--container), calc(100% - 28px));
  margin: 0 auto;
}

.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 17, 31, 0.88);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); flex-shrink: 0; }
.brand img {
  width: 44px; height: 44px; border-radius: 12px;
  box-shadow: 0 8px 20px rgba(61, 224, 196, 0.22), inset 0 0 0 1px rgba(255,255,255,.15);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.2rem; letter-spacing: 0.03em; }
.brand-text em {
  font-style: normal; font-size: 0.78rem; color: var(--muted);
  max-width: 280px; white-space: normal;
}

.main-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 999px;
  border: 1px solid transparent; transition: .25s ease; white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(61,224,196,.18), rgba(79,140,255,.2));
  border-color: var(--line);
}

.nav-toggle {
  display: none; background: transparent; border: 0; width: 42px; height: 42px;
  flex-direction: column; justify-content: center; gap: 6px; cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px; background: var(--text); margin: 0 auto;
}

.site-main { padding: 22px 0 56px; }

.hero-3d {
  position: relative; overflow: hidden;
  border-radius: 22px; padding: 28px 28px 26px;
  background:
    linear-gradient(135deg, rgba(20,48,85,.92), rgba(12,28,52,.88)),
    radial-gradient(circle at 85% 15%, rgba(61,224,196,.22), transparent 42%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-3d::before {
  content: ""; position: absolute; inset: auto -10% -50% 55%; height: 80%;
  background: radial-gradient(circle, rgba(79,140,255,.28), transparent 60%);
  filter: blur(8px); pointer-events: none;
}
.hero-title {
  position: relative; z-index: 1;
  margin: 0 0 10px; font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: 0.02em; line-height: 1.35;
}
.hero-desc {
  position: relative; z-index: 1;
  margin: 0 0 16px; max-width: 920px; color: var(--muted); font-size: 1rem;
}
.hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 18px; border-radius: 12px; font-weight: 600; border: 1px solid transparent;
  transition: .25s ease;
}
.btn-primary {
  background: linear-gradient(135deg, #3de0c4, #2bb8ff);
  color: #041018; box-shadow: 0 10px 22px rgba(61,224,196,.28);
}
.btn-primary:hover { color: #041018; transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255,255,255,.05); color: var(--text); border-color: var(--line);
}
.btn-ghost:hover { background: rgba(255,255,255,.09); color: var(--text); }

.section { margin-top: 32px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0; font-size: 1.35rem; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }

.league-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.league-chip {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 8px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: var(--shadow); color: var(--text);
  transition: transform .2s ease, box-shadow .2s ease;
  text-align: center;
}
.league-chip span {
  font-size: .92rem; font-weight: 600; line-height: 1.3;
  white-space: normal; word-break: break-word;
}
.league-chip img {
  width: 44px; height: 44px; object-fit: contain;
  filter: drop-shadow(0 6px 10px rgba(0,0,0,.35));
}
.league-chip:hover { transform: translateY(-2px); box-shadow: 0 16px 28px rgba(61,224,196,.14); }

/* 赛程卡片：更宽、队名完整换行显示 */
.match-list { display: flex; flex-direction: column; gap: 10px; }
.match-card {
  display: grid;
  grid-template-columns: minmax(168px, 210px) minmax(0, 1fr) minmax(96px, 120px);
  gap: 14px 18px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20,48,85,.9), rgba(12,28,52,.82));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.match-card:hover {
  border-color: rgba(61, 224, 196, 0.35);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
}
.match-meta {
  color: var(--muted); font-size: .86rem; line-height: 1.45;
  min-width: 0;
}
.match-meta .league {
  display: flex; align-items: flex-start; gap: 6px; color: var(--accent);
  margin-bottom: 6px; font-weight: 600; line-height: 1.35;
  white-space: normal; word-break: break-word;
}
.match-meta .league img {
  width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px;
}
.match-meta .time {
  color: var(--muted);
  white-space: normal;
  word-break: break-word;
}
.match-teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.team {
  display: flex; align-items: center; gap: 10px; min-width: 0;
}
.team.away { flex-direction: row-reverse; text-align: right; }
.team img {
  width: 40px; height: 40px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 5px 8px rgba(0,0,0,.35));
}
.team span {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}
.vs {
  font-size: .85rem; color: var(--muted); text-align: center;
  padding: 6px 8px; border-radius: 10px; background: rgba(255,255,255,.05);
  justify-self: center; min-width: 58px;
}
.vs.score { color: var(--text); font-weight: 700; font-size: 1.05rem; }
.match-action {
  text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.badge-live { background: rgba(255,93,122,.18); color: var(--danger); }
.badge-upcoming { background: rgba(61,224,196,.15); color: var(--accent); }
.badge-finished { background: rgba(155,180,208,.15); color: var(--muted); }

.depth-card, .news-card, .faq-item, .about-box {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* 新闻：完整标题与摘要 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.news-card { overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.news-card:hover { transform: translateY(-2px); border-color: rgba(79,140,255,.35); }
.news-card a { color: inherit; display: block; height: 100%; }
.news-card .cover {
  min-height: 88px; padding: 16px 18px;
  background: linear-gradient(135deg, #1a3a62, #0f243f);
  display: flex; align-items: center;
  color: var(--accent); font-size: .88rem; font-weight: 600;
}
.news-card .body { padding: 16px 18px 18px; }
.news-card h3 {
  margin: 0 0 10px; font-size: 1.08rem; line-height: 1.45;
  white-space: normal; word-break: break-word;
}
.news-card p {
  margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.65;
  white-space: normal; word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}
.news-card .meta { margin-top: 12px; font-size: .8rem; color: #7f97b3; }

.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { padding: 16px 18px; }
.faq-item h3 { margin: 0 0 8px; font-size: 1.02rem; color: var(--accent); line-height: 1.4; }
.faq-item p { margin: 0; color: var(--muted); line-height: 1.7; white-space: normal; }

.about-box { padding: 24px 26px; }
.about-box h2, .about-box h1 { margin-top: 0; line-height: 1.35; }
.about-box h3 { margin: 20px 0 8px; color: var(--accent2); }
.about-box p, .about-box li {
  color: var(--muted); line-height: 1.75; word-break: break-word;
}
.about-box ul { padding-left: 1.2em; }

.article {
  max-width: 980px; margin: 0 auto;
  padding: 28px 30px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(20,48,85,.94), rgba(10,22,40,.9));
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.article h1 {
  margin-top: 0; font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.4; word-break: break-word;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  color: var(--muted); font-size: .86rem; margin-bottom: 18px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.article-meta span { word-break: break-all; }
.article-content {
  color: #d8e8f8; font-size: 1.05rem; line-height: 1.85;
  word-break: break-word; overflow-wrap: anywhere;
}
.article-content p { margin: 0 0 1.05em; }
.article-content img {
  margin: 12px auto; border-radius: 12px;
  max-width: 100%; height: auto;
}
.article-content table {
  width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem;
}
.article-content td, .article-content th {
  border: 1px solid var(--line); padding: 8px 10px; word-break: break-word;
}
.article-nav {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line);
}
.article-nav > div { min-width: 0; }
.article-nav a {
  color: var(--text); display: block; line-height: 1.45;
  word-break: break-word;
}
.article-nav a:hover { color: var(--accent); }

.page-title {
  margin: 0 0 18px; font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  line-height: 1.35; word-break: break-word;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: rgba(4, 10, 18, .75);
  padding: 26px 0 34px;
  color: var(--muted); font-size: .9rem;
}
.footer-about { margin-bottom: 12px; line-height: 1.7; }
.friend-links { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 10px; }
.friend-links a { color: #8fb0d4; }
.copyright { margin: 0; opacity: .8; }

.empty {
  padding: 28px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
}

/* 列表页可展示更多行 */
.page-live .match-list,
.page-replay .match-list,
.page-nba .match-list,
.page-league .match-list {
  gap: 8px;
}

@media (max-width: 980px) {
  .match-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .match-action {
    text-align: left;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .match-teams {
    grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr);
  }
}

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .header-inner { position: relative; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; padding: 12px;
    background: rgba(10, 20, 36, .97); border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow); z-index: 60;
  }
  .main-nav.open { display: flex; }
  .hero-3d { padding: 22px 18px; }
  .brand-text em { max-width: 160px; font-size: .7rem; }
  .news-grid { grid-template-columns: 1fr; }
  .article { padding: 22px 16px; }
  .article-nav { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .container { width: calc(100% - 20px); }
  .match-teams {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .team.away { flex-direction: row; text-align: left; }
  .vs { justify-self: start; }
  .league-row { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .league-chip { padding: 10px 4px; }
  .league-chip span { font-size: .8rem; }
  .team span { font-size: .95rem; }
  .news-card p { -webkit-line-clamp: 5; }
}
