:root {
    --bg: #0a0f1f;
    --surface: #121a2f;
    --text: #f4f6fb;
    --muted: #a8b0c4;
    --primary: #1d428a;
    --accent: #c8102e;
    --line: rgba(255, 255, 255, 0.12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.wrap { width: min(1200px, 92%); margin: 0 auto; }
.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(8, 13, 24, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}
.topbar-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.06em; flex-shrink: 0; }
.brand img { width: 30px; height: 30px; border-radius: 6px; }
.nav-toggle { position: absolute; left: -999px; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.menu-toggle span { display: block; height: 2px; margin: 5px 0; background: #fff; }
.nav-list, .sub-nav { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; gap: 18px; }
.nav-item { position: relative; }
.nav-item > a { display: inline-block; padding: 8px 0; color: var(--muted); white-space: nowrap; }
.nav-item > a:hover, .nav-item > a.on { color: #fff; }
.sub-nav {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 148px;
    z-index: 30;
    background: rgba(12, 20, 36, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 8px 0;
}
.sub-nav a { display: block; padding: 8px 14px; color: #dce3f6; }
.sub-nav a:hover { background: rgba(255, 255, 255, 0.06); }
.nav-item:hover > .sub-nav { display: block; }
.league-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
}
.league-tab {
    flex: 0 0 auto;
    min-width: 64px;
    text-align: center;
    padding: 6px 12px;
    border-radius: 2px;
    font-size: 14px;
    color: #fff;
    background: #15253f;
}
.league-tab:hover { background: #1e3150; }
.league-tab.is-hot, .league-tab.is-on { background: var(--accent); font-weight: 700; }
main.wrap { padding-bottom: 28px; }
.hero, .panel, .match-panel, .about, .faq, .league-block {
    background: rgba(13, 21, 40, 0.56);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 16px;
}
.hero { margin-top: 18px; }
.badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
}
.hero h1, h1 { margin: 10px 0 6px; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.2; }
h2 { margin: 0; font-size: 1.25rem; }
.hero-lead, .lead, .note, .empty { color: var(--muted); }
.hero-actions, .lines { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.room-btn, .lines .btn, .btn {
    display: inline-block;
    text-align: center;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    background: var(--accent);
    color: #fff;
}
.room-ghost, .btn-ghost { background: transparent; border: 1px solid var(--line); }
.section { margin: 16px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.section-head a { color: #d6ddf1; font-size: 14px; }
.day-heading, .datebar { display: flex; align-items: center; gap: 10px; color: #e3e9fa; font-weight: 600; margin-bottom: 8px; }
.datebar { justify-content: space-between; }
.datebar a { color: #d6ddf1; }
.match-list, .card-list, .news-list { display: grid; gap: 8px; }
.match-row {
    display: grid;
    grid-template-columns: 100px 72px minmax(0, 1fr) 62px minmax(0, 1fr) 72px 90px;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(20, 30, 54, 0.58);
    border: 1px solid var(--line);
    border-radius: 12px;
}
.league-cell { display: flex; align-items: center; min-width: 0; }
.league-name, .team-home, .team-away {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.match-time, .score, .row-status { margin: 0; }
.match-time { color: #d6ddf1; font-size: 13px; }
.team-pair { display: flex; align-items: center; gap: 6px; min-width: 0; }
.team-pair-home { justify-content: flex-end; }
.score { text-align: center; font-weight: 700; letter-spacing: 0.04em; }
.row-status { text-align: center; font-size: 13px; font-weight: 600; }
.row-status a { color: inherit; }
.row-status.is-live, .row-status.is-live a { color: #ff6278; }
.row-status.is-soon, .row-status.is-soon a { color: #f5c361; }
.row-status.is-end, .row-status.is-end a { color: #8a96b5; }
.match-row .room-btn { padding: 7px 8px; }
.team-logo, .match-row img, .avatar {
    width: 28px; height: 28px; object-fit: contain; border-radius: 50%; background: #1b2838; flex: none;
}
.avatar { display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; color: #f6e7c1; }
.league-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.league-card {
    display: flex; flex-direction: column; gap: 4px; padding: 14px;
    border-radius: 12px; border: 1px solid var(--line); background: rgba(20, 30, 54, 0.58);
}
.league-card span { color: var(--muted); font-size: 13px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.text-card, .news-card {
    display: flex; gap: 12px; padding: 12px 14px;
    background: rgba(20, 30, 54, 0.58); border: 1px solid var(--line); border-radius: 12px;
}
.text-card { flex-direction: column; }
.text-card span, .news-card em { color: var(--muted); font-style: normal; }
.news-card img { width: 120px; height: 80px; object-fit: cover; border-radius: 8px; flex: none; }
.news-card span { display: flex; flex-direction: column; gap: 4px; }
.news-card small { color: var(--muted); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 16px 0; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.sb-team img, .sb-team .avatar { width: 64px; height: 64px; font-size: 22px; }
.sb-score { text-align: center; }
.sb-score b { display: block; font-size: 34px; }
.sb-score small, .sb-score em { display: block; color: var(--muted); font-style: normal; }
.cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 12px; }
.content p { margin: 0 0 14px; }
.content img { border-radius: 12px; }
.crumb, .crumb a { color: var(--muted); }
.crumb a:hover { color: #fff; }
.pager { display: flex; gap: 14px; justify-content: center; align-items: center; margin: 16px 0 28px; }
.pager a { color: #ffd0d6; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 700; }
.site-foot { border-top: 1px solid var(--line); margin-top: 12px; padding: 22px 0 32px; color: var(--muted); text-align: center; }
.site-foot p { margin: 4px 0; }
.league-block { margin: 12px 0; }
.league-block h2 { margin-bottom: 10px; font-size: 18px; }
.league-block h2 a { color: #fff; }
@media (max-width: 980px) {
    .menu-toggle { display: block; margin-left: auto; }
    .main-nav {
        display: none;
        position: absolute;
        left: 0; right: 0; top: calc(100% + 8px);
        padding: 8px;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: rgba(10, 16, 30, 0.98);
        max-height: 70vh;
        overflow: auto;
    }
    .nav-toggle:checked ~ .main-nav { display: block; }
    .nav-list { display: block; }
    .nav-item > a { display: block; padding: 12px 10px; border-bottom: 1px solid var(--line); color: #dce3f6; }
    .sub-nav { display: block; position: static; border: 0; background: transparent; padding: 0 0 6px 12px; }
    .match-row {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        grid-template-areas: "league league league time time time" "home home score score away away" ". status status room room .";
        padding: 12px;
    }
    .match-row .league-cell { grid-area: league; }
    .match-row .match-time { grid-area: time; justify-self: end; }
    .match-row .team-pair-home { grid-area: home; justify-self: start; }
    .match-row .score { grid-area: score; }
    .match-row .team-pair-away { grid-area: away; justify-self: end; }
    .match-row .row-status { grid-area: status; }
    .match-row .room-btn { grid-area: room; justify-self: center; }
    .league-grid, .split { grid-template-columns: 1fr 1fr; }
    .news-card { flex-direction: column; }
    .news-card img { width: 100%; height: 160px; }
}
@media (max-width: 640px) {
    .league-grid, .split { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
