/* === PC28 开奖网 - 全局样式 === */
:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #dfe5ec;
    --text: #1f2937;
    --muted: #64748b;
    --red: #d81e06;
    --green: #07a35a;
    --blue: #1685d9;
    --ink: #0f172a;
    --shadow: 0 8px 24px rgba(15,23,42,0.08);
}

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* === Header === */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.header-inner, .page-shell {
    width: min(1180px, calc(100vw - 28px));
    margin: 0 auto;
}
.header-inner {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 178px;
}
.brand-mark {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: conic-gradient(from 140deg, var(--red), #f7b731, var(--green), var(--blue), var(--red));
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px var(--line);
}
.brand-name {
    font-size: 18px;
    font-weight: 800;
    color: var(--ink);
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 10px 0;
}
.site-nav a {
    border-radius: 8px;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    padding: 9px 14px;
    white-space: nowrap;
    transition: all 0.15s;
}
.site-nav a:hover, .site-nav a.active {
    background: #fff1ef;
    color: var(--red);
}
.status-pill {
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    font-size: 13px;
    padding: 7px 10px;
    white-space: nowrap;
}

/* === Page Shell === */
.page-shell { padding: 18px 0 32px; }

/* === Latest Panel === */
.latest-panel, .content-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.latest-panel {
    display: grid;
    grid-template-columns: minmax(180px,1fr) minmax(260px,1.4fr) minmax(150px,0.7fr);
    gap: 16px;
    align-items: center;
    padding: 18px;
    margin-bottom: 16px;
}
.eyebrow { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.issue { color: var(--ink); font-size: 23px; font-weight: 800; }
.countdown { color: var(--red); font-size: 25px; font-weight: 800; }

/* === Balls & Tags === */
.draw-line {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}
.ball, .tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.ball {
    width: 40px; height: 40px;
    border-radius: 50%;
    color: #fff;
}
.ball.small { width: 30px; height: 30px; font-size: 13px; }
.ball.num { background: var(--blue); }
.ball.sum-red { background: var(--red); }
.ball.sum-green { background: var(--green); }
.ball.sum-blue { background: var(--blue); }
.ball.sum-gray { background: #7b8794; }
.tag {
    min-width: 36px; height: 30px;
    border-radius: 15px;
    color: #fff;
    font-size: 13px;
    padding: 0 10px;
}
.tag.red { background: var(--red); }
.tag.green { background: var(--green); }
.equal { color: var(--ink); font-size: 22px; font-weight: 800; }
.operator { color: var(--ink); font-size: 18px; font-weight: 900; }
.draw-expression { color: var(--ink); font-weight: 900; white-space: nowrap; }
.combo-badges { display: inline-flex; gap: 6px; align-items: center; }

/* === Shape Tags === */
.shape-tag {
    border: 1px solid var(--line);
    border-radius: 14px;
    display: inline-flex;
    font-size: 13px; font-weight: 800;
    min-width: 42px; padding: 5px 10px;
}
.shape-mixed { background: #fff; color: var(--ink); }
.shape-pair { background: #fff8d7; border-color: #f1d767; color: #b58900; }
.shape-straight { background: #e9fff4; border-color: #8fe5bd; color: #0a9a64; }
.shape-leopard { background: #fff0f0; border-color: #f3a1a1; color: var(--red); }

/* === Content Panel === */
.content-panel { padding: 18px; }
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 12px; margin-bottom: 14px;
}
.section-title { color: var(--ink); font-size: 20px; font-weight: 800; }
.section-meta { color: var(--muted); font-size: 13px; }

/* === Metrics === */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.metric {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}
.metric-label { color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.metric-value { color: var(--ink); font-size: 20px; font-weight: 800; }

/* === Table === */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td {
    border-bottom: 1px solid var(--line);
    padding: 10px 8px;
    text-align: center;
}
.data-table th { background: var(--surface-soft); color: var(--muted); font-weight: 800; }
.data-table tbody tr:hover { background: #fbfdff; }

/* === Pagination === */
.pagination-bar {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; padding-top: 16px; flex-wrap: wrap;
}
.pagination-bar:empty { display: none; }
.page-controls { display: flex; align-items: center; gap: 10px; }
.page-size-control { display: flex; align-items: center; gap: 10px; }
.page-btn {
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 800;
    min-width: 82px; padding: 8px 14px;
}
.page-btn:not(:disabled):hover { border-color: var(--blue); color: var(--blue); }
.page-btn:disabled { color: #a8b2bf; cursor: not-allowed; }
.page-info { color: var(--muted); font-size: 13px; font-weight: 800; }
.page-size-label { color: var(--muted); font-size: 13px; font-weight: 800; }
.page-size-btn {
    background: #fff; border: 1px solid var(--line); border-radius: 8px;
    color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 900;
    min-width: 42px; padding: 7px 9px;
}
.page-size-btn:hover, .page-size-btn.active { border-color: var(--blue); color: var(--blue); }
.page-size-btn.active { background: #eaf7ff; }

/* === Trend === */
.trend-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.bar-list {
    background: var(--surface-soft); border: 1px solid var(--line);
    border-radius: 8px; padding: 14px;
}
.bar-row {
    display: grid; grid-template-columns: 42px 1fr 52px;
    gap: 10px; align-items: center; margin: 8px 0;
}
.bar-label, .bar-count { color: var(--muted); font-size: 13px; }
.bar-track { height: 10px; background: #e7edf3; border-radius: 8px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); }
.trend-matrix { border-collapse: collapse; table-layout: fixed; }
.trend-matrix th { background: #08aabc; color: #fff; font-size: 17px; padding: 9px 6px; }
.trend-matrix td {
    background: #fbfbfb; border-bottom: 1px dashed #e2e7ec;
    color: #687381; font-size: 15px; font-weight: 800;
    height: 40px; padding: 6px 4px;
}
.trend-issue { color: #687381; font-family: "Consolas","Courier New",monospace; font-size: 16px; }
.trend-value { font-family: "Consolas","Courier New",monospace; font-size: 17px; font-weight: 900; }
.trend-value-red { color: #ff1d2f !important; }
.trend-value-green { color: #57c985 !important; }
.trend-value-blue { color: #1f87e8 !important; }
.trend-value-gray { color: #687381 !important; }
.trend-mark {
    border-radius: 8px; color: #fff; display: inline-flex;
    font-size: 13px; font-weight: 900; min-width: 22px;
    padding: 5px 7px; justify-content: center;
}
.trend-mark.red { background: #f70000; }
.trend-mark.blue { background: #00a9bd; }

/* === Omission === */
.omission-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.omission-card {
    background: var(--surface-soft); border: 1px solid var(--line);
    border-radius: 8px; padding: 14px;
}
.omission-strip {
    background: var(--surface-soft); border: 1px solid var(--line);
    border-radius: 8px; margin-bottom: 16px; padding: 14px;
}
.omission-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.omission-grid-horizontal { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.omission-item {
    background: #fff; border: 1px solid var(--line);
    border-radius: 8px; padding: 10px; text-align: center;
}
.omission-name { color: var(--muted); font-size: 13px; }
.omission-count { color: var(--red); font-size: 18px; font-weight: 800; margin-top: 4px; }

/* === Dragon === */
.dragon-summary {
    align-items: center; background: #f5fcff; border: 1px solid #cdeeff;
    border-radius: 8px; color: #344256; display: flex;
    font-size: 15px; font-weight: 700; gap: 10px;
    margin-bottom: 12px; padding: 14px 16px;
}
.summary-dot { background: #63c8ed; border-radius: 50%; display: inline-block; height: 7px; width: 7px; }
.dragon-grid { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dragon-card {
    background: #fff; border: 1px solid #e3ecf3;
    border-radius: 8px; box-shadow: 0 2px 8px rgba(25,46,74,0.05); overflow: hidden;
}
.dragon-card.active { background: #f0fff6; border-color: #80e2ad; }
.dragon-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 16px 8px; }
.dragon-title-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dragon-icon {
    align-items: center; background: #eef3f8; border-radius: 8px;
    color: #53606d; display: inline-flex; font-size: 18px; font-weight: 900;
    height: 36px; width: 36px; justify-content: center;
}
.dragon-title { color: var(--ink); font-size: 20px; font-weight: 900; }
.dragon-status { background: #eef5f8; border-radius: 14px; color: #1f4058; font-size: 12px; font-weight: 800; padding: 5px 9px; }
.dragon-card.active .dragon-status { background: #16d980; color: #fff; }
.dragon-meta { display: flex; align-items: center; gap: 6px; padding: 0 16px 10px; }
.dragon-kind, .dragon-count { border-radius: 14px; font-size: 12px; font-weight: 900; padding: 5px 9px; }
.dragon-kind { color: #fff; }
.dragon-count { background: #fff; border: 1px solid #d4e0e8; color: #111827; }
.dragon-green { background: #05c56d; color: #fff; }
.dragon-blue { background: #2f7df6; color: #fff; }
.dragon-purple { background: #a33df3; color: #fff; }
.dragon-orange { background: #ff6b1a; color: #fff; }
.dragon-progress { background: #c8f0fb; border-radius: 999px; height: 8px; margin: 0 16px 10px; overflow: hidden; }
.dragon-progress span { background: #9aa7b7; display: block; height: 100%; }
.dragon-card.active .dragon-progress span { background: #07c96f; }
.dragon-sequence {
    background: #fafcfd; border-top: 1px solid #dce6ed;
    display: flex; flex-wrap: wrap; gap: 6px; min-height: 54px; padding: 12px 16px;
}
.dragon-token { border-radius: 5px; font-size: 13px; font-weight: 800; padding: 5px 8px; }
.dragon-token.red { background: #ffe0e0; color: #ff1d2f; }
.dragon-token.blue { background: #e1efff; color: #136fff; }
.dragon-token.gray { background: #e9edf2; color: #53606d; }
.dragon-foot {
    align-items: center; background: #f8fafc; display: flex;
    justify-content: space-between; gap: 10px; padding: 12px 16px;
}
.dragon-foot strong { color: #334155; font-size: 13px; font-weight: 900; }
.dragon-foot span { color: var(--muted); font-size: 12px; font-weight: 800; }

/* === Prediction (dyj-28 style) === */
.prediction-tabs {
    display: flex; gap: 14px; justify-content: center; margin-bottom: 18px;
}
.prediction-tab {
    background: #e9eef4; border: 0; border-radius: 16px;
    color: #3f4856; cursor: pointer; font-size: 18px; font-weight: 900;
    min-width: 108px; padding: 16px 20px; transition: all 0.2s;
}
.prediction-tab.active { background: #08aeea; box-shadow: 0 6px 18px rgba(8,174,234,0.32); color: #fff; }
.prediction-tab:hover:not(.active) { background: #d1dbe6; }
.prediction-layout {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
    gap: 14px; margin-bottom: 14px;
}
.prediction-main, .prediction-side, .prediction-card {
    border: 1px solid var(--line); border-radius: 8px;
}
.prediction-main {
    background: linear-gradient(135deg, #fff7f5 0%, #eef8ff 100%);
    padding: 20px;
}
.prediction-side { background: var(--surface-soft); display: grid; gap: 10px; padding: 14px; }
.prediction-eyebrow { color: var(--muted); font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.prediction-issue { color: var(--ink); font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.prediction-combo { color: var(--red); font-size: 44px; font-weight: 900; line-height: 1; margin-bottom: 14px; }
.prediction-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; align-items: center; }
.prediction-confidence {
    background: var(--ink); border-radius: 16px; color: #fff;
    display: inline-flex; font-size: 13px; font-weight: 800; padding: 7px 12px;
}
.prediction-note { color: var(--muted); font-size: 13px; line-height: 1.7; }
.signal-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.signal-label { color: var(--muted); font-size: 12px; margin-bottom: 5px; }
.signal-value { color: var(--ink); font-size: 20px; font-weight: 900; line-height: 1.25; }
.signal-desc { color: var(--muted); font-size: 12px; margin-top: 5px; }
.prediction-cards { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 14px; }
.prediction-card { background: var(--surface-soft); padding: 14px; }
.prediction-card h2 { color: var(--ink); font-size: 16px; margin: 0 0 8px; }
.prediction-card p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.prediction-table-wrap { border: 1px solid #e5eef5; border-radius: 8px; overflow: hidden; }
.prediction-table { border-collapse: separate; border-spacing: 0; }
.prediction-table th { background: #f0f5f9; color: #3b4450; font-size: 16px; padding: 16px 10px; }
.prediction-table td { border-bottom: 1px solid #e8f2f7; font-size: 16px; font-weight: 800; padding: 14px 10px; text-align: center; }
.prediction-row:nth-child(odd) td { background: #f2fbff; }
.prediction-row.pending td { background: #eefbff; }
.prediction-row.hit td:first-child { box-shadow: inset 5px 0 #16cf88; }
.prediction-row.miss td:first-child { box-shadow: inset 5px 0 #f05a7a; }
.prediction-pill {
    background: #08aeea; border-radius: 18px; color: #fff;
    display: inline-flex; font-size: 16px; font-weight: 900;
    min-width: 42px; padding: 9px 12px; justify-content: center;
}
.prediction-number { color: #3f4856; }
.prediction-result { color: #111827; }
.hit-icon {
    align-items: center; border-radius: 50%; display: inline-flex;
    font-size: 17px; font-weight: 900; height: 28px; width: 28px; justify-content: center;
}
.hit-icon.yes { border: 3px solid #19d188; color: #19d188; }
.hit-icon.no { border: 3px solid #ff1d2f; color: #ff1d2f; }
.hit-icon.pending { border: 3px solid #687381; color: #687381; }

/* === Empty State === */
.empty-state { color: var(--muted); padding: 28px; text-align: center; }
.loading { text-align: center; padding: 40px; color: var(--muted); }

/* === Algorithm Engine UI === */
.algo-main-card {
    background: var(--surface);
    border: 2px solid #e8e0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(120, 60, 200, 0.06);
}
.algo-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.algo-badge {
    font-size: 20px;
    font-weight: 900;
}
.algo-confidence {
    font-size: 18px;
    font-weight: 800;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 6px 16px;
}
.algo-predictions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    padding: 20px;
}
.algo-item {
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}
.algo-label {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
    font-weight: 700;
}
.algo-value {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 6px;
}
.algo-value.size-大 { color: #f70000; }
.algo-value.size-小 { color: #00a9bd; }
.algo-value.parity-单 { color: #f70000; }
.algo-value.parity-双 { color: #00a9bd; }
.algo-conf {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}
.algo-bar {
    height: 6px;
    background: #e7edf3;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
}
.bar-big { background: #f70000; display: block; height: 100%; }
.bar-small { background: #00a9bd; display: block; height: 100%; }
.bar-odd { background: #f70000; display: block; height: 100%; }
.bar-even { background: #00a9bd; display: block; height: 100%; }
.algo-combo-item { display: flex; flex-direction: column; justify-content: center; }
.algo-combo {
    font-size: 38px;
    font-weight: 900;
    color: #764ba2;
    margin-bottom: 6px;
}
.algo-zone {
    font-size: 13px;
    color: var(--muted);
}
.algo-zone strong { color: var(--ink); }
.algo-sums {
    padding: 0 20px 16px;
}
.algo-sum-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.algo-sum-tag {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 18px;
    font-weight: 900;
    min-width: 44px;
    text-align: center;
}
.algo-reasons {
    padding: 0 20px 16px;
}
.algo-reason {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.8;
    padding: 2px 0;
}
.algo-accuracy {
    background: #f8fafc;
    border-top: 1px solid var(--line);
    padding: 16px 20px;
}
.algo-tracker {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text);
}
.algo-tracker b {
    color: var(--green);
    font-size: 16px;
}
.algo-tracker-hint {
    color: var(--muted);
    font-size: 13px;
}
@media (max-width: 860px) {
    .algo-predictions { grid-template-columns: 1fr; }
    .algo-header { flex-direction: column; text-align: center; }
    .algo-tracker { flex-direction: column; gap: 6px; }
}

/* === Footer === */
.site-footer {
    text-align: center; padding: 20px; color: var(--muted);
    font-size: 12px; border-top: 1px solid var(--line); margin-top: 32px;
}

/* === Responsive === */
@media (max-width: 860px) {
    .header-inner { flex-direction: column; gap: 4px; padding: 12px 0; align-items: flex-start; }
    .status-pill { display: none; }
    .latest-panel, .trend-summary, .omission-groups, .prediction-layout, .prediction-cards, .dragon-grid { grid-template-columns: 1fr; }
    .omission-grid-horizontal { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .prediction-tabs { flex-wrap: wrap; }
    .prediction-tab { flex: 1; min-width: 80px; font-size: 15px; padding: 12px 14px; }
}
@media (max-width: 560px) {
    .header-inner, .page-shell { width: min(100vw - 18px, 1180px); }
    .brand-mark { width: 32px; height: 32px; }
    .brand-name { font-size: 17px; }
    .site-nav { width: 100%; gap: 4px; }
    .site-nav a { flex: 1; font-size: 13px; padding: 8px 4px; text-align: center; }
    .latest-panel, .content-panel { padding: 12px; }
    .ball { width: 34px; height: 34px; }
    .prediction-combo { font-size: 34px; }
    .dragon-grid { grid-template-columns: 1fr; }
    .issue { font-size: 18px; }
    .countdown { font-size: 19px; }
}
