/* 发发发体育 - 深色运动风（参考稳狗体育视觉风格） */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
    --bg: #0f172a;
    --bg-soft: #1e293b;
    --bg-card: #16213a;
    --text: #e2e8f0;
    --text-dim: #94a3b8;
    --text-faint: #64748b;
    --accent: #22c55e;
    --accent-2: #38bdf8;
    --warn: #f59e0b;
    --danger: #ef4444;
    --line: rgba(148, 163, 184, .16);
    --radius: 14px;
}
html { scroll-behavior: smooth; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }

/* ===== 顶栏 ===== */
.site-app-header {
    background: rgba(15, 23, 42, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    position: sticky; top: 0; z-index: 50;
}
.site-app-header-inner {
    max-width: 1080px; margin: 0 auto; padding: 12px 16px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-box { width: 44px; height: 44px; flex: none; }
.logo-box svg { width: 100%; height: 100%; }
.logo-title { font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.logo-title .fa { color: var(--accent); }
.logo-sub { font-size: 11px; color: var(--text-faint); }
.site-app-header-status { text-align: right; }
.hero-kicker { font-size: 11px; color: var(--text-faint); }
.hero-badge {
    display: inline-block; margin-top: 2px;
    background: var(--bg-soft); border: 1px solid var(--line);
    color: var(--accent); font-size: 12px; font-weight: 700;
    padding: 3px 12px; border-radius: 999px;
}

/* ===== 布局 ===== */
.app { max-width: 1080px; margin: 0 auto; padding: 18px 16px 60px; }
.section-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin: 34px 2px 14px;
}
.section-head h3 { font-size: 17px; font-weight: 800; letter-spacing: .5px; }
.section-more { font-size: 13px; color: var(--accent); }

/* ===== Hero 看板 ===== */
.hero-app {
    background: linear-gradient(160deg, #16213a 0%, #0f172a 65%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
}
.hero-summary { font-size: 15px; font-weight: 600; }
.hero-refresh { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.home-guide-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 10px; margin-top: 16px;
}
.home-guide-card {
    background: rgba(30, 41, 59, .7);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 2px;
    transition: transform .15s, border-color .15s;
}
.home-guide-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.home-guide-card span { font-size: 12px; color: var(--text-dim); }
.home-guide-card strong { font-size: 20px; font-weight: 800; color: var(--text); }
.home-guide-card small { font-size: 11px; color: var(--text-faint); }

.home-leagues-entry {
    display: flex; align-items: center; gap: 14px;
    margin-top: 16px; padding: 14px 16px;
    background: rgba(34, 197, 94, .08);
    border: 1px solid rgba(34, 197, 94, .3);
    border-radius: 12px;
    transition: background .15s;
}
.home-leagues-entry:hover { background: rgba(34, 197, 94, .16); }
.home-leagues-icon { color: var(--accent); flex: none; }
.home-leagues-copy { flex: 1; }
.home-leagues-copy strong { display: block; font-size: 15px; }
.home-leagues-copy small { font-size: 12px; color: var(--text-dim); }
.home-leagues-arrow { color: var(--text-faint); }

/* ===== 风险观察 ===== */
.upset-board {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px;
}
.upset-board-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.upset-board-tabs { display: flex; gap: 8px; }
.upset-tab {
    background: var(--bg-soft); border: 1px solid var(--line); color: var(--text-dim);
    font-size: 12px; padding: 5px 14px; border-radius: 999px; cursor: pointer;
}
.upset-tab.active { background: var(--accent); color: #062818; font-weight: 700; border-color: transparent; }
.upset-board-date { font-size: 12px; color: var(--text-faint); }
.upset-board-list { display: grid; gap: 8px; }
.upset-card {
    display: flex; align-items: center; gap: 14px;
    background: rgba(30, 41, 59, .55);
    border: 1px solid var(--line);
    border-radius: 10px; padding: 12px 14px;
}
.upset-card.is-loading { opacity: .6; }
.upset-rank {
    width: 34px; height: 34px; flex: none;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg-soft); color: var(--warn);
    font-weight: 800; font-size: 14px; border-radius: 8px;
}
.upset-card[data-risk="high"] .upset-rank { color: var(--danger); }
.upset-main { flex: 1; min-width: 0; }
.upset-main strong { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upset-main span { display: block; font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upset-tags { display: flex; gap: 6px; flex: none; }
.upset-tag {
    font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 6px;
    background: rgba(245, 158, 11, .15); color: var(--warn);
}
.upset-tag.high { background: rgba(239, 68, 68, .15); color: var(--danger); }
.upset-tag.league { background: rgba(56, 189, 248, .15); color: var(--accent-2); }

/* ===== 工具网格 ===== */
.tools {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.tool {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px; padding: 16px;
    display: flex; flex-direction: column; gap: 8px;
    transition: transform .15s, border-color .15s;
}
.tool:hover { transform: translateY(-2px); }
.tool-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #0f172a; }
.tool-green .tool-icon { background: var(--accent); }
.tool-blue .tool-icon { background: var(--accent-2); }
.tool-red .tool-icon { background: var(--danger); }
.tool-purple .tool-icon { background: #a78bfa; }
.tool-orange .tool-icon { background: var(--warn); }
.tool:hover.tool-green { border-color: var(--accent); }
.tool:hover.tool-blue { border-color: var(--accent-2); }
.tool:hover.tool-red { border-color: var(--danger); }
.tool:hover.tool-purple { border-color: #a78bfa; }
.tool:hover.tool-orange { border-color: var(--warn); }
.tool-title-row { font-size: 14px; font-weight: 700; }
.tool small { font-size: 11px; color: var(--text-faint); line-height: 1.5; }

/* ===== 文章 ===== */
.article-list { display: grid; gap: 10px; }
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 12px; padding: 14px 16px;
    display: flex; flex-direction: column; gap: 4px;
    transition: border-color .15s;
}
.article-card:hover { border-color: var(--accent-2); }
.article-card.is-loading { opacity: .6; }
.article-card strong { font-size: 14px; }
.article-card span { font-size: 12px; color: var(--text-dim); }
.article-card .art-meta { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.art-tag { font-size: 11px; font-weight: 700; color: var(--accent-2); background: rgba(56,189,248,.12); padding: 2px 8px; border-radius: 5px; }

/* ===== 页脚 ===== */
.site-footer {
    margin-top: 50px; padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex; flex-direction: column; gap: 14px;
}
.footer-brand strong { font-size: 16px; }
.footer-brand strong .fa { color: var(--accent); }
.footer-brand span { display: block; font-size: 12px; color: var(--text-faint); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { font-size: 13px; color: var(--text-dim); }
.footer-links a:hover { color: var(--accent); }
.footer-note { font-size: 11px; color: var(--text-faint); line-height: 1.7; }

/* ===== 通用列表页 ===== */
.page-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.page-head .back { font-size: 13px; color: var(--text-dim); }
.page-head h2 { font-size: 20px; font-weight: 800; }
.page-head .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.match-list { display: grid; gap: 8px; }
.match-card {
    background: var(--bg-card); border: 1px solid var(--line);
    border-radius: 10px; padding: 12px 14px;
    display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center;
}
.match-league { font-size: 12px; font-weight: 700; color: var(--accent-2); }
.match-teams { min-width: 0; }
.match-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.match-line .team { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.match-line .team.home { text-align: right; }
.match-score { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 48px; text-align: center; color: var(--text); }
.match-score.live { color: var(--accent); }
.match-sub { font-size: 11px; color: var(--text-faint); display: flex; gap: 10px; margin-top: 3px; }
.match-right { text-align: right; }
.match-time { font-size: 12px; color: var(--text-dim); }
.match-status {
    font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin-top: 4px;
    display: inline-block;
}
.match-status.pre { background: rgba(148,163,184,.15); color: var(--text-dim); }
.match-status.in { background: rgba(34,197,94,.15); color: var(--accent); }
.match-status.post { background: rgba(56,189,248,.15); color: var(--accent-2); }
.match-status.warn { background: rgba(239,68,68,.15); color: var(--danger); }
.score-line { display: flex; align-items: center; gap: 10px; }
.score-bar { width: 120px; height: 6px; background: var(--bg-soft); border-radius: 3px; overflow: hidden; flex: none; }
.score-bar > i { display: block; height: 100%; background: var(--accent-2); }

.empty { text-align: center; color: var(--text-faint); padding: 40px 0; font-size: 14px; }
.loading-more { text-align: center; color: var(--text-faint); padding: 16px; font-size: 13px; }

/* 联赛页 */
.league-group { margin-bottom: 20px; }
.league-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 800; margin: 18px 0 10px;
    padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.league-title .badge { font-size: 11px; font-weight: 700; background: var(--bg-soft); color: var(--text-dim); padding: 2px 8px; border-radius: 5px; }

@media (max-width: 720px) {
    .home-guide-grid { grid-template-columns: repeat(2, 1fr); }
    .tools { grid-template-columns: repeat(2, 1fr); }
    .match-card { grid-template-columns: 1fr; }
    .match-right { text-align: left; }
    .site-app-header-status .hero-kicker { display: none; }
}
