:root {
  --bg0: #f6efe2;
  --bg1: #efe2cf;
  --ink: #2a1f18;
  --muted: #7a6454;
  --crimson: #b33a2b;
  --crimson-deep: #8c2418;
  --gold: #c9a45c;
  --gold-soft: #e6d3a3;
  --panel: rgba(255, 250, 240, 0.92);
  --line: rgba(139, 70, 50, 0.22);
  --radius: 10px;
  --shadow: 0 10px 24px rgba(70, 40, 20, 0.1);
  --font: "Noto Serif SC", "Songti SC", "Source Han Serif SC", serif;
  --display: "Ma Shan Zheng", "ZCOOL XiaoWei", "Noto Serif SC", cursive;
  --title: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(180deg, #f8f1e4 0%, #efe0c8 45%, #e8d5b8 100%);
  min-height: 100vh;
  line-height: 1.75;
  font-size: 16px;
  position: relative;
}

.ink-bg {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 700px 420px at 12% 0%, rgba(179, 58, 43, 0.08), transparent 60%),
    radial-gradient(ellipse 600px 380px at 90% 8%, rgba(201, 164, 92, 0.14), transparent 55%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 38px,
      rgba(139, 70, 50, 0.03) 39px
    );
  opacity: 1;
}

a { color: var(--crimson); text-decoration: none; }
a:hover { color: var(--crimson-deep); }
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(12px);
  background: rgba(248, 241, 228, 0.92);
  border-bottom: 2px solid rgba(179, 58, 43, 0.18);
  box-shadow: 0 4px 18px rgba(70, 40, 20, 0.06);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.brand img {
  width: 48px; height: 48px; border-radius: 8px;
  box-shadow: 0 6px 14px rgba(140, 36, 24, 0.25);
  border: 2px solid var(--gold-soft);
  object-fit: cover; background: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong {
  font-family: var(--display);
  font-size: 1.55rem; letter-spacing: 0.06em; color: var(--crimson-deep); font-weight: 400;
}
.brand-text em {
  font-style: normal; font-size: 0.8rem; color: var(--muted);
  font-family: var(--title);
}

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 4px;
  border: 1px solid transparent; transition: .22s ease; white-space: nowrap;
  font-family: var(--title);
}
.main-nav a:hover, .main-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep));
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(140, 36, 24, 0.25);
}

.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(--crimson-deep); margin: 0 auto;
  border-radius: 2px;
}

.site-main { padding: 24px 0 56px; }

.hero-panel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  padding: 36px 32px 38px;
  background:
    linear-gradient(135deg, rgba(255,252,245,.96), rgba(244,228,200,.9)),
    radial-gradient(circle at 92% 12%, rgba(201,164,92,.28), transparent 42%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-panel::before,
.hero-panel::after {
  content: "";
  position: absolute;
  width: 72px; height: 72px;
  border: 2px solid rgba(179, 58, 43, 0.28);
  pointer-events: none;
}
.hero-panel::before { top: 12px; left: 12px; border-right: 0; border-bottom: 0; }
.hero-panel::after { right: 12px; bottom: 12px; border-left: 0; border-top: 0; }
.hero-ornament {
  position: absolute; right: -20px; top: -30px;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(179,58,43,.12), transparent 68%);
  pointer-events: none;
}
.hero-brand {
  position: relative; z-index: 2;
  margin: 0 0 6px;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--crimson-deep);
  letter-spacing: 0.08em;
  line-height: 1.2;
}
.hero-title {
  position: relative; z-index: 2;
  margin: 0 0 12px;
  font-family: var(--title);
  font-size: clamp(1.35rem, 2.6vw, 1.75rem);
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.hero-desc {
  position: relative; z-index: 2;
  margin: 0 0 20px; max-width: 860px; color: var(--muted); font-size: 1rem;
}
.hero-actions {
  position: relative; z-index: 3;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 22px; border-radius: 4px; font-weight: 700; border: 1px solid transparent;
  transition: .22s ease; line-height: 1.2; cursor: pointer;
  font-family: var(--title); min-height: 44px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--crimson), var(--crimson-deep));
  color: #fff !important;
  border-color: var(--gold);
  box-shadow: 0 8px 18px rgba(140, 36, 24, 0.28);
}
.btn-primary:hover { filter: brightness(1.06); color: #fff !important; }
.btn-ghost {
  background: rgba(255,252,245,.8); color: var(--ink) !important;
  border-color: rgba(201,164,92,.65);
}
.btn-ghost:hover { background: #fff; color: var(--crimson-deep) !important; }

.section { margin-top: 34px; }
.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(179, 58, 43, 0.15);
}
.section-head h2 {
  margin: 0; font-size: 1.4rem; font-family: var(--display);
  color: var(--crimson-deep); font-weight: 400; letter-spacing: 0.04em;
}
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.more-link {
  color: var(--crimson); font-family: var(--title); white-space: nowrap;
}

.league-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(108px, 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(--ink);
  transition: transform .2s ease, border-color .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;
  font-family: var(--title);
}
.league-chip img {
  width: 44px; height: 44px; object-fit: contain;
}
.league-chip:hover {
  transform: translateY(-2px);
  border-color: rgba(179, 58, 43, 0.4);
}

.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(255,252,245,.96), rgba(245,230,205,.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.match-card:hover {
  border-color: rgba(179, 58, 43, 0.4);
  box-shadow: 0 14px 28px rgba(70, 40, 20, 0.12);
}
.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(--crimson);
  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-meta .sub-title {
  margin-top: 4px; color: #9a7a5a; font-size: .8rem; 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;
}
.detail-teams { margin: 24px 0; max-width: 520px; }
.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;
}
.team span {
  font-weight: 600; font-size: 1rem; line-height: 1.35;
  white-space: normal; word-break: break-word;
}
.vs {
  font-size: .85rem; color: var(--muted); text-align: center;
  padding: 6px 8px; border-radius: 4px; background: rgba(179,58,43,.08);
  justify-self: center; min-width: 58px; font-family: var(--title);
}
.vs.score { color: var(--crimson-deep); 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: 3px;
  font-size: .75rem; font-weight: 700; font-family: var(--title);
}
.badge-live { background: rgba(179,58,43,.14); color: var(--crimson-deep); }
.badge-upcoming { background: rgba(201,164,92,.22); color: #8a6a2e; }
.badge-finished { background: rgba(122,100,84,.12); color: var(--muted); }

.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(179,58,43,.35); }
.news-card a { color: inherit; display: block; height: 100%; }
.news-card .cover {
  min-height: 84px; padding: 16px 18px;
  background: linear-gradient(135deg, #c25545, #8c2418);
  display: flex; align-items: center;
  color: #ffe9c8; font-size: .88rem; font-weight: 600;
  font-family: var(--title);
  position: relative;
}
.news-card .cover::after {
  content: "";
  position: absolute; right: 14px; top: 14px;
  width: 28px; height: 28px; border: 1px solid rgba(255,233,200,.45);
  border-radius: 2px; transform: rotate(12deg);
}
.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: #9a7a5a; }

.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(--crimson);
  line-height: 1.4; font-family: var(--title);
}
.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; font-family: var(--display);
  color: var(--crimson-deep); font-weight: 400;
}
.about-box h3 { margin: 20px 0 8px; color: #9a6230; font-family: var(--title); }
.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: 12px;
  background: linear-gradient(160deg, rgba(255,252,245,.97), rgba(245,230,205,.94));
  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; color: var(--crimson-deep);
  font-family: var(--title);
}
.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 dashed rgba(179,58,43,.25);
}
.article-meta span { word-break: break-all; }
.article-content {
  color: var(--ink); 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: 8px; 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(--ink); display: block; line-height: 1.45; word-break: break-word; }
.article-nav a:hover { color: var(--crimson); }

.page-title {
  margin: 0 0 18px; font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  line-height: 1.35; word-break: break-word;
  font-family: var(--display); color: var(--crimson-deep); font-weight: 400;
}
.league-head-inner {
  display: flex; align-items: center; gap: 12px;
}
.league-head-inner p { margin: 4px 0 0; color: var(--muted); }

.site-footer {
  border-top: 2px solid rgba(179, 58, 43, 0.16);
  background: rgba(244, 232, 210, .9);
  padding: 28px 0 36px;
  color: var(--muted); font-size: .9rem;
  position: relative;
}
.footer-seal {
  width: 54px; height: 54px;
  border: 2px solid var(--crimson);
  color: var(--crimson);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-size: 1.1rem;
  border-radius: 4px; transform: rotate(-8deg);
  margin-bottom: 12px;
  background: rgba(255, 245, 230, .7);
}
.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: #9a6230; }
.copyright { margin: 0; opacity: .85; }

.empty {
  padding: 28px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: rgba(255,252,245,.7);
}

@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: 72px;
    flex-direction: column; padding: 12px;
    background: rgba(248, 241, 228, .98); border: 1px solid var(--line);
    border-radius: 10px; box-shadow: var(--shadow); z-index: 60;
  }
  .main-nav.open { display: flex; }
  .main-nav a { text-align: center; }
  .hero-panel { padding: 24px 18px; }
  .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; }
  .brand-text strong { font-size: 1.3rem; }
}
