* { box-sizing: border-box; }

:root {
    --bg: #f4f7fb;
    --card: #fff;
    --text: #162235;
    --muted: #738096;
    --line: #e7ecf3;
    --blue: #2f6bea;
    --red: #ef4548;
    --green: #22a47a;
    --orange: #d47a17;
    --shadow: 0 5px 20px rgba(35, 55, 85, .045);
}

html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}
body.dark {
    --bg: #101521;
    --card: #171e2c;
    --text: #f2f5fb;
    --muted: #9aa6b9;
    --line: #283244;
    --shadow: 0 5px 20px rgba(0, 0, 0, .18);
}
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }

.site-header {
    height: 72px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 50;
}
.header-inner {
    width: min(1180px, calc(100% - 28px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 10px;
}
.menu-btn {
    width: 42px;
    height: 42px;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    flex: 0 0 auto;
}
.menu-btn span { width: 30px; height: 3px; border-radius: 4px; background: var(--text); }
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-logo {
    width: 43px;
    height: 43px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    background: linear-gradient(145deg, #3b8cf5, #1767db);
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -1px;
    border: 2px solid #e8f1ff;
    box-shadow: 0 3px 9px rgba(47, 107, 234, .16);
}
.brand-logo span { color: #ffe45e; }
.brand-name { font-size: 22px; font-weight: 800; white-space: nowrap; letter-spacing: 0; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.theme-btn, .header-btn {
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.theme-btn { width: 42px; font-size: 25px; line-height: 1; }
.header-btn { padding: 0 13px; font-size: 16px; font-weight: 600; white-space: nowrap; }
.login-btn { min-width: 54px; }
.register-btn { min-width: 58px; background: var(--blue); color: #fff; border-color: var(--blue); }

.mobile-menu {
    position: fixed;
    inset: 72px auto 0 0;
    width: min(300px, 82vw);
    z-index: 45;
    background: var(--card);
    border-right: 1px solid var(--line);
    box-shadow: 8px 0 28px rgba(20,35,60,.12);
    transform: translateX(-105%);
    transition: transform .22s ease;
    overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-inner { width: 100%; margin: 0; padding: 14px 12px 20px; display: flex; flex-direction: column; gap: 5px; }
.mobile-menu a { padding: 14px 16px; border-radius: 12px; font-weight: 700; font-size: 16px; }
.mobile-menu a:hover { background: var(--bg); }

.page { width: min(1120px, calc(100% - 28px)); margin: 14px auto 35px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }

.countdown-card { padding: 26px 30px 20px; }
.countdown-top, .countdown-bottom { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 18px; }
.countdown-top strong { color: var(--muted); font-size: 20px; font-weight: 600; }
.countdown-value { margin: 20px 0 17px; text-align: center; font-size: 58px; line-height: 1; font-weight: 800; letter-spacing: 1px; }
.countdown-bottom { font-size: 16px; }
.countdown-bottom b { font-weight: 500; color: var(--muted); }
.progress-track { height: 7px; margin-top: 18px; background: #edf1f7; border-radius: 8px; overflow: hidden; }
body.dark .progress-track { background: #293244; }
.progress-bar { width: 0; height: 100%; background: var(--blue); border-radius: inherit; transition: width .35s linear; }

.latest-card { margin-top: 14px; padding: 25px 30px 22px; }
.section-heading { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--muted); font-size: 18px; font-weight: 500; white-space: nowrap; }
.section-heading strong { color: var(--muted); font-weight: 600; }
.latest-main { margin-top: 24px; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 14px; flex-wrap: nowrap; min-width: 0; }
.numbers { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; flex: 0 0 auto; }
.number, .sum-box {
    width: 68px;
    height: 68px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #f7f9fc;
    border: 1px solid #edf1f6;
    font-size: 34px;
    font-weight: 800;
    box-shadow: 0 3px 10px rgba(30, 50, 80, .035);
    flex: 0 0 auto;
}
body.dark .number, body.dark .sum-box { background: #1d2636; border-color: #2b3546; }
.plus, .equals { font-size: 20px; color: #8b97aa; font-weight: 600; flex: 0 0 auto; }
.sum-box { width: 78px; background: var(--red); border-color: var(--red); color: #fff; }
.result-tags { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: nowrap; white-space: nowrap; flex: 0 0 auto; }
.tag { min-width: 64px; height: 58px; padding: 0 12px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-size: 24px; font-weight: 800; flex: 0 0 auto; }
.tag-red { background: var(--red); }
.tag-blue { background: var(--blue); }

.latest-meta {
    margin-top: 19px;
    padding-top: 15px;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}
.meta-item { display: flex; align-items: center; justify-content: center; gap: 8px; min-width: 0; color: var(--muted); font-size: 15px; }
.meta-item + .meta-item { border-left: 1px solid var(--line); }
.meta-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 30px; padding: 0 9px; border-radius: 9px; font-size: 14px; font-weight: 800; }
.meta-shape.meta-orange { background: #fff4df; color: var(--orange); }
.meta-shape.meta-green { background: #e8f8f2; color: var(--green); }
.meta-shape.meta-gray { background: #eef1f5; color: #68758a; }
.meta-span { background: #edf4ff; color: var(--blue); }
.meta-dragon.meta-red { background: #fff0f0; color: var(--red); }
.meta-dragon.meta-blue { background: #edf4ff; color: var(--blue); }
.meta-dragon.meta-gray { background: #eef1f5; color: #68758a; }
body.dark .meta-shape.meta-orange, body.dark .meta-shape.meta-green, body.dark .meta-shape.meta-gray, body.dark .meta-span, body.dark .meta-dragon.meta-red, body.dark .meta-dragon.meta-blue, body.dark .meta-dragon.meta-gray { background: #263143; }

.history-card { margin-top: 14px; padding: 28px 18px 22px; }
.history-title { display: flex; justify-content: space-between; align-items: center; padding: 0 3px 18px; }
.history-title h2 { margin: 0; font-size: 27px; }
.history-title p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.refresh-btn { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 11px; padding: 10px 18px; cursor: pointer; font-size: 15px; }
.table-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.col-issue { width: 17%; }
.col-time { width: 15%; }
.col-number { width: 31%; }
.col-combo { width: 15%; }
.col-shape { width: 12%; }
.col-dragon { width: 10%; }
th, td { height: 70px; padding: 0 5px; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
th { background: #f8fafc; color: #68758a; font-size: 15px; font-weight: 700; }
body.dark th { background: #1d2636; }
tbody tr:last-child td { border-bottom: 0; }
td { font-size: 15px; font-weight: 600; }
.issue { font-weight: 800; }
.draw-number { font-weight: 800; letter-spacing: 0; }
.table-tag { display: inline-block; padding: 7px 8px; border-radius: 8px; font-weight: 800; margin: 0 1px; font-size: 13px; }
.table-red { background: #fff0f0; color: var(--red); }
.table-blue { background: #edf4ff; color: var(--blue); }
.table-green { background: #ebfaf5; color: var(--green); }
.table-orange { background: #fff6ea; color: var(--orange); }
.table-gray { background: #f0f2f5; color: #68758a; }
body.dark .table-red { background: rgba(239,69,72,.15); }
body.dark .table-blue { background: rgba(47,107,234,.16); }
body.dark .table-green { background: rgba(34,164,122,.15); }
body.dark .table-orange { background: rgba(212,122,23,.15); }
body.dark .table-gray { background: #273143; color: #aab4c5; }
.loading, .error { color: var(--muted); padding: 24px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 17px; }
.pagination button { min-width: 84px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--card); color: var(--text); font-size: 14px; cursor: pointer; }
.pagination button:disabled { opacity: .42; cursor: default; }
.pagination span { min-width: 65px; text-align: center; color: var(--muted); font-size: 14px; }
.site-footer { width: min(1120px, calc(100% - 28px)); margin: 0 auto 28px; color: var(--muted); font-size: 12px; text-align: center; }

@media (max-width: 760px) {
    .site-header { height: 64px; }
    .header-inner { width: calc(100% - 18px); gap: 6px; }
    .menu-btn { width: 38px; height: 38px; }
    .menu-btn span { width: 27px; height: 3px; }
    .brand { gap: 7px; }
    .brand-logo { width: 40px; height: 40px; font-size: 13px; }
    .brand-name { font-size: 19px; }
    .header-actions { gap: 5px; }
    .theme-btn, .header-btn { height: 40px; border-radius: 12px; }
    .theme-btn { width: 40px; font-size: 23px; }
    .header-btn { padding: 0 10px; font-size: 15px; }
    .login-btn { min-width: 49px; }
    .register-btn { min-width: 51px; }
    .mobile-menu { inset: 64px auto 0 0; width: min(290px, 82vw); }
    .mobile-menu-inner { width: 100%; padding: 12px 10px 18px; }
    .mobile-menu a { padding: 13px 14px; font-size: 15px; }
    .page { width: calc(100% - 18px); margin-top: 9px; }
    .countdown-card { padding: 22px 16px 17px; border-radius: 20px; }
    .countdown-top { font-size: 16px; }
    .countdown-top strong { font-size: 17px; }
    .countdown-value { margin: 20px 0 18px; font-size: 52px; }
    .countdown-bottom { font-size: 14px; }
    .progress-track { margin-top: 15px; height: 6px; }
    .latest-card { padding: 21px 12px 17px; border-radius: 20px; }
    .section-heading { gap: 5px; font-size: 16px; }
    .latest-main { margin-top: 20px; gap: 9px; width: 100%; }
    .numbers { gap: 5px; width: auto; }
    .number, .sum-box { width: 52px; height: 52px; border-radius: 12px; font-size: 27px; }
    .sum-box { width: 60px; }
    .plus, .equals { font-size: 16px; }
    .result-tags { gap: 5px; }
    .tag { min-width: 54px; height: 44px; border-radius: 11px; font-size: 19px; }
    .latest-meta { margin-top: 16px; padding-top: 13px; }
    .meta-item { gap: 5px; font-size: 13px; }
    .meta-badge { min-width: 34px; height: 29px; padding: 0 7px; font-size: 13px; }
    .history-card { padding: 25px 5px 18px; border-radius: 20px; }
    .history-title { padding: 0 7px 17px; }
    .history-title h2 { font-size: 26px; }
    .history-title p { font-size: 14px; }
    .refresh-btn { padding: 9px 16px; font-size: 14px; }
    .table-wrap { border-radius: 14px; }
    th, td { height: 70px; padding: 0 2px; }
    th { font-size: 14px; }
    td { font-size: 14px; }
    .table-tag { padding: 6px 5px; font-size: 12px; border-radius: 7px; }
    .draw-number { font-size: 14px; letter-spacing: 0; }
    .pagination { gap: 12px; padding-top: 15px; }
    .pagination button { min-width: 78px; height: 36px; }
}

@media (max-width: 430px) {
    .brand-name { font-size: 17px; }
    .header-actions { gap: 3px; }
    .theme-btn { width: 36px; }
    .header-btn { padding: 0 7px; font-size: 14px; }
    .login-btn { min-width: 44px; }
    .register-btn { min-width: 47px; }
    .latest-card { padding-left: 9px; padding-right: 9px; }
    .latest-main { gap: 4px; }
    .numbers { gap: 2px; }
    .number, .sum-box { width: 40px; height: 40px; font-size: 22px; border-radius: 10px; }
    .sum-box { width: 46px; }
    .plus, .equals { font-size: 12px; }
    .result-tags { gap: 3px; }
    .tag { min-width: 45px; height: 40px; padding: 0 7px; font-size: 17px; border-radius: 10px; }
    .meta-item { gap: 3px; font-size: 12px; }
    .meta-badge { min-width: 31px; padding: 0 6px; font-size: 12px; }
    .col-issue { width: 18%; }
    .col-time { width: 15%; }
    .col-number { width: 31%; }
    .col-combo { width: 15%; }
    .col-shape { width: 12%; }
    .col-dragon { width: 10%; }
    th, td { font-size: 12px; }
    .table-tag { font-size: 11px; padding: 5px 4px; }
    .draw-number { font-size: 12px; }
}

/* 实时分析大厅 */
.analysis-card { margin-top: 14px; padding: 25px 18px 20px; }
.analysis-title { display: flex; align-items: center; justify-content: space-between; padding: 0 3px 17px; }
.analysis-title h2 { margin: 0; font-size: 27px; }
.analysis-title p { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.analysis-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.analysis-tabs button { height: 42px; border: 1px solid var(--line); background: var(--card); color: var(--muted); border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; }
.analysis-tabs button.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.analysis-list { display: grid; gap: 10px; }
.analysis-item { border: 1px solid var(--line); border-radius: 14px; padding: 15px 16px; background: var(--card); }
.analysis-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.analysis-algorithm { font-size: 16px; font-weight: 800; }
.analysis-issue { color: var(--muted); font-size: 13px; }
.analysis-main { display: flex; align-items: center; gap: 9px; margin-top: 12px; flex-wrap: wrap; }
.analysis-label { color: var(--muted); font-size: 13px; }
.analysis-value { display: inline-flex; align-items: center; min-height: 31px; padding: 0 10px; border-radius: 8px; background: #edf4ff; color: var(--blue); font-size: 14px; font-weight: 800; }
.analysis-value.red { background: #fff0f0; color: var(--red); }
.analysis-value.orange { background: #fff6ea; color: var(--orange); }
.analysis-value.green { background: #ebfaf5; color: var(--green); }
.analysis-exclude { color: var(--red); background: #fff0f0; }
.analysis-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 13px; }
.analysis-stat { min-width: 0; padding: 9px 5px; border-radius: 9px; background: #f7f9fc; text-align: center; }
body.dark .analysis-stat { background: #1d2636; }
.analysis-stat span { display: block; color: var(--muted); font-size: 11px; }
.analysis-stat b { display: block; margin-top: 3px; font-size: 14px; }
.analysis-method { margin-top: 10px; color: var(--muted); font-size: 12px; }
.analysis-status { display: inline-flex; align-items: center; padding: 4px 7px; border-radius: 7px; font-size: 11px; font-weight: 700; }
.analysis-status.pending { background: #edf4ff; color: var(--blue); }
.analysis-status.hit { background: #ebfaf5; color: var(--green); }
.analysis-status.miss { background: #fff0f0; color: var(--red); }
.analysis-loading, .analysis-empty { color: var(--muted); text-align: center; padding: 28px 10px; }
.analysis-note { margin-top: 13px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }
.analysis-pagination{display:flex;align-items:center;justify-content:center;gap:14px;padding:14px 0 2px}.analysis-pagination button{min-width:76px;height:36px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--text);font-size:13px;font-weight:700;cursor:pointer}.analysis-pagination button:disabled{opacity:.4;cursor:default}.analysis-pagination span{min-width:82px;text-align:center;color:var(--muted);font-size:13px}

@media (max-width: 760px) {
    .analysis-card { padding: 24px 8px 18px; border-radius: 20px; }
    .analysis-title { padding: 0 6px 16px; }
    .analysis-title h2 { font-size: 26px; }
    .analysis-title p { font-size: 13px; }
    .analysis-tabs { gap: 5px; }
    .analysis-tabs button { height: 40px; font-size: 14px; }
    .analysis-item { padding: 14px 12px; }
    .analysis-algorithm { font-size: 15px; }
    .analysis-stats { gap: 5px; }
}

.analysis-page-card { margin-top: 0; min-height: 60vh; }
@media (max-width: 760px) { .analysis-page-card { margin-top: 0; } }

/* 算法大厅 v2 */
.analysis-sort{margin:-5px 2px 13px;color:var(--muted);font-size:12px}
.analysis-item{padding:15px 16px}
.analysis-item.top-algo{border-color:#dce7fb;box-shadow:0 4px 16px rgba(47,107,234,.06)}
.analysis-code-wrap{display:flex;align-items:center;gap:10px;min-width:0}
.analysis-rank{width:26px;height:26px;border-radius:8px;background:#f0f3f8;color:#64738a;display:grid;place-items:center;font-size:12px;font-weight:800;flex:0 0 auto}
.analysis-item.top-algo .analysis-rank{background:var(--blue);color:#fff}
.analysis-name{margin-top:3px;color:var(--muted);font-size:11px}
.favorite-btn{width:36px;height:36px;padding:0;border:1px solid var(--line);background:var(--card);color:#8a96a8;border-radius:10px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:20px;line-height:1;flex:0 0 auto}.favorite-btn.active{color:#e3a11b;border-color:#f0d28a;background:#fff9e9}.favorite-btn:active{transform:scale(.96)}
body.dark .favorite-btn.active{background:#2d291f;border-color:#66501f}
.analysis-issue-row{display:flex;justify-content:space-between;align-items:center;margin-top:9px;color:var(--muted);font-size:12px}
.rate-bars{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:12px}
.rate-line{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--muted)}
.rate-line b{font-size:15px;color:var(--text);margin-left:auto}.rate-line em{font-style:normal;font-size:10px;color:var(--muted)}
.rate-track{height:6px;background:#edf1f6;border-radius:99px;overflow:hidden;margin-top:6px}.rate-track i{display:block;height:100%;background:var(--blue);border-radius:99px}
.analysis-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}
.detail-btn{height:33px;padding:0 13px;border:0;border-radius:9px;background:var(--blue);color:#fff;font-size:12px;font-weight:700;cursor:pointer}.detail-btn.secondary{background:#f1f4f8;color:#506077}.analysis-exclude{background:#fff0f0;color:var(--red)}
body.dark .detail-btn.secondary{background:#252e3e;color:#aeb8c8}
.rate-number{font-size:15px!important}.rate-number.excellent{color:#2f6bea!important}.rate-number.good{color:#3b78d8!important}.rate-number.normal{color:var(--text)!important}.rate-number.low{color:#d17a17!important}.rate-number.neutral{color:var(--muted)!important}.analysis-stat.stat-positive{background:#edf9f4}.analysis-stat.stat-positive b{color:#229c78}.analysis-stat.stat-warning{background:#fff4ee}.analysis-stat.stat-warning b{color:#d46f31}.analysis-stat.stat-highlight{background:#fff8e8}.analysis-stat.stat-highlight b{color:#c58a18}.analysis-stat.stat-neutral b{color:var(--text)}body.dark .analysis-stat.stat-positive{background:#20352f}body.dark .analysis-stat.stat-warning{background:#392b25}body.dark .analysis-stat.stat-highlight{background:#39321f}.analysis-pagination{display:flex;align-items:center;justify-content:center;gap:7px;padding:16px 0 3px;flex-wrap:wrap}.analysis-pagination button{height:34px;min-width:38px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--text);font-size:12px;font-weight:700;cursor:pointer}.analysis-pagination .page-arrow{padding:0 11px}.analysis-pagination button:disabled{opacity:.38;cursor:default}.analysis-pagination .page-number.active{background:var(--blue);border-color:var(--blue);color:#fff}.page-numbers{display:flex;gap:5px}
.algo-modal{position:fixed;inset:0;background:rgba(13,22,36,.52);z-index:100;display:none;align-items:center;justify-content:center;padding:16px}.algo-modal.open{display:flex}
.algo-modal-box{width:min(760px,100%);max-height:min(88vh,760px);overflow:auto;background:var(--card);border:1px solid var(--line);border-radius:18px;box-shadow:0 20px 60px rgba(0,0,0,.2)}
.algo-modal-head{display:flex;justify-content:space-between;align-items:center;padding:17px 18px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--card);z-index:2}.algo-modal-head h3{margin:0;font-size:18px}.algo-modal-head p{margin:4px 0 0;color:var(--muted);font-size:11px}.algo-modal-close{width:34px;height:34px;border:0;border-radius:9px;background:#f0f3f7;color:#66748a;font-size:23px;cursor:pointer}
.detail-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:15px 18px}.detail-summary>div{background:#f7f9fc;border-radius:10px;text-align:center;padding:10px 5px}.detail-summary span,.detail-summary em{display:block;color:var(--muted);font-size:10px;font-style:normal}.detail-summary b{display:block;font-size:18px;margin:3px 0}
body.dark .detail-summary>div{background:#1d2636}
.detail-table-wrap{padding:0 18px 18px;overflow:auto}.detail-table{width:100%;border-collapse:collapse}.detail-table th,.detail-table td{height:46px;border-bottom:1px solid var(--line);text-align:center;padding:0 7px;white-space:nowrap;font-size:12px}.detail-table th{background:#f7f9fc;color:var(--muted)}body.dark .detail-table th{background:#1d2636}
@media(max-width:760px){.analysis-item-head{align-items:flex-start}.favorite-btn{width:36px;height:36px;font-size:19px}.rate-bars{gap:10px}.detail-summary{grid-template-columns:repeat(2,1fr)}.algo-modal{padding:8px}.algo-modal-box{max-height:92vh;border-radius:15px}.detail-table-wrap{padding-left:10px;padding-right:10px}.analysis-actions{margin-top:10px}.analysis-page-card{padding-left:9px;padding-right:9px}}
/* 详情弹窗与卡片统一统计色彩 */
.detail-summary>div.excellent b,.detail-summary>div.good b{color:#2f6bea}
.detail-summary>div.low b{color:#d17a17}
.detail-summary>div.stat-positive{background:#edf9f4}
.detail-summary>div.stat-positive b{color:#229c78}
.detail-summary>div.stat-warning{background:#fff4ee}
.detail-summary>div.stat-warning b{color:#d46f31}
.detail-summary>div.stat-highlight{background:#fff8e8}
.detail-summary>div.stat-highlight b{color:#c58a18}
body.dark .detail-summary>div.stat-positive{background:#20352f}
body.dark .detail-summary>div.stat-warning{background:#392b25}
body.dark .detail-summary>div.stat-highlight{background:#39321f}
.detail-summary>div.excellent,.detail-summary>div.good{background:#f1f6ff}
.detail-summary>div.low{background:#fff7ed}
body.dark .detail-summary>div.excellent,body.dark .detail-summary>div.good{background:#202d45}
body.dark .detail-summary>div.low{background:#382c23}

/* 算法历史回测 */
.bt-card{margin-top:14px;padding:24px 18px 28px}.bt-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.bt-head h1{margin:0;font-size:26px}.bt-head p{margin:7px 0 0;color:var(--muted);font-size:13px}.bt-back{display:inline-flex;height:38px;padding:0 13px;align-items:center;border:1px solid var(--line);border-radius:10px;color:var(--text);text-decoration:none;font-size:13px;font-weight:700}.bt-algo{margin-top:18px;padding:13px 14px;border:1px solid var(--line);border-radius:12px;background:#f7f9fc;color:var(--text);font-size:14px}.bt-algo span{display:block;margin-top:5px;color:var(--muted);font-size:11px}.bt-form{display:grid;grid-template-columns:repeat(5,1fr);gap:10px;margin-top:14px}.bt-form label{display:flex;flex-direction:column;gap:6px;color:var(--muted);font-size:12px}.bt-form input,.bt-form select{height:40px;padding:0 10px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--text);font-size:13px;outline:none}.bt-help{margin-top:10px;color:var(--muted);font-size:11px;line-height:1.6}.bt-run{margin-top:14px;height:43px;padding:0 24px;border:0;border-radius:10px;background:var(--blue);color:#fff;font-size:14px;font-weight:800;cursor:pointer}.bt-run:disabled{opacity:.6}.bt-error{min-height:18px;margin-top:8px;color:var(--red);font-size:12px}.bt-result{margin-top:18px}.bt-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.bt-summary>div{padding:13px 8px;background:#f7f9fc;border-radius:10px;text-align:center}.bt-summary span{display:block;color:var(--muted);font-size:11px}.bt-summary b{display:block;margin-top:5px;font-size:17px}.bt-positive{color:#229c78!important}.bt-negative{color:#d46f31!important}.bt-section-title{margin:18px 0 9px;font-size:14px;font-weight:800}.bt-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px}.bt-table{width:100%;border-collapse:collapse}.bt-table th,.bt-table td{height:42px;border-bottom:1px solid var(--line);padding:0 9px;text-align:center;white-space:nowrap;font-size:11px}.bt-table th{background:#f7f9fc;color:var(--muted)}body.dark .bt-algo,body.dark .bt-summary>div,body.dark .bt-table th{background:#1d2636}@media(max-width:760px){.bt-card{padding:22px 10px}.bt-head{align-items:center}.bt-head h1{font-size:23px}.bt-head p{font-size:12px}.bt-form{grid-template-columns:repeat(2,1fr)}.bt-form label:last-child{grid-column:1/-1}.bt-summary{grid-template-columns:repeat(2,1fr)}.bt-run{width:100%}}

.analysis-head-actions{display:flex;align-items:center;gap:10px;flex-wrap:nowrap;white-space:nowrap;flex:0 0 auto}.favorite-page-btn{display:inline-flex;align-items:center;justify-content:center;height:36px;padding:0 13px;border:1px solid var(--line);border-radius:9px;background:var(--card);color:var(--text);text-decoration:none;font-size:13px;font-weight:700}.favorite-page-btn:hover{border-color:#c9d2ff;color:#4f46e5;background:#f7f8ff}@media(max-width:560px){.analysis-head-actions{gap:8px;flex-wrap:nowrap}.favorite-page-btn{height:34px;padding:0 10px;font-size:12px;white-space:nowrap}.analysis-title{gap:8px}.analysis-title>div:first-child{min-width:0}.analysis-title h2{white-space:nowrap}}