@charset "UTF-8";

/* ------------------------------------------------------------------
   新香港彩 · 前台主题层
   只做展示：不改动模板结构、data-* 契约与后台数据模型。
   保留原有全部类名，新增 CSS 变量与响应式栅格。
   ------------------------------------------------------------------ */

:root {
    --brand: #5b2be0;
    --brand-deep: #2c1668;
    --brand-soft: #f1ecff;
    --accent: #ff7a45;
    --ink: #17142a;
    --ink-2: #565064;
    --ink-3: #8d879c;
    --line: #e8e5f1;
    --bg: #f4f3fa;
    --card: #ffffff;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(23, 20, 42, .06), 0 4px 14px rgba(23, 20, 42, .05);
    --shadow-md: 0 10px 30px rgba(23, 20, 42, .10);
    --shell: 860px;
    --nav-h: 62px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background-color: var(--bg); background-repeat: no-repeat; background-position: top center; background-attachment: fixed; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; color: var(--ink); font: 15px/1.75 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; border: 0; }
button, input, select, textarea { font: inherit; }
::selection { color: #fff; background: var(--brand); }

.site-shell {
    position: relative;
    width: var(--shell);
    max-width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: calc(var(--nav-h) + 24px);
    background: rgba(255, 255, 255, .94);
    -webkit-backdrop-filter: saturate(140%) blur(6px);
    backdrop-filter: saturate(140%) blur(6px);
    box-shadow: 0 0 0 1px rgba(23, 20, 42, .04), var(--shadow-md);
}

/* ---------- 顶栏 / 广告 ---------- */
.hero-ad { width: 100%; overflow: hidden; background: transparent; }
.hero-ad img { width: 100%; height: auto; }

.top-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px 7px;
    width: calc(100% + 16px);
    margin-left: -8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, .88);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid var(--line);
}
.top-nav a {
    height: 32px;
    line-height: 32px;
    overflow: hidden;
    color: var(--brand-deep);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    background: var(--brand-soft);
    border: 1px solid rgba(91, 43, 224, .1);
    border-radius: 999px;
    transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.top-nav a:hover { color: #fff; background: var(--brand); box-shadow: 0 6px 14px rgba(91, 43, 224, .28); transform: translateY(-1px); }
.top-nav a.hot { color: #fff; background: linear-gradient(135deg, #ff9a5b, #f0522f); border-color: transparent; box-shadow: 0 4px 12px rgba(240, 82, 47, .3); }

.site-intro { padding: 10px 16px; color: var(--ink-2); font-size: 13px; line-height: 1.7; text-align: center; background: #fff; border-bottom: 1px solid var(--line); }
.site-intro:before { content: "ⓘ"; margin-right: 5px; color: var(--brand); font-weight: 700; }

.notice-ad { display: block; max-height: 164px; overflow: hidden; background: #0d0a1a; }
.notice-ad img { width: 100%; }

.domain-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    margin: 10px 12px;
    padding: 0 14px;
    overflow: hidden;
    color: var(--brand-deep);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .2px;
    text-align: center;
    background: linear-gradient(90deg, #fff3ec, #f5efff);
    border: 1px solid rgba(91, 43, 224, .12);
    border-radius: 999px;
}

/* ---------- 开奖面板 ---------- */
.result-panel {
    position: relative;
    margin: 12px;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(120% 120% at 12% 0%, #3b2a86 0%, #241a56 45%, #150f33 100%);
    border-radius: 20px;
    box-shadow: 0 14px 34px rgba(28, 18, 76, .28);
}
.result-panel:after { content: ""; position: absolute; top: -70px; right: -40px; width: 220px; height: 220px; background: radial-gradient(circle, rgba(139, 92, 246, .45), transparent 65%); pointer-events: none; }
.result-panel > h2 { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; margin: 0; padding: 16px 18px 4px; color: #fff; font-size: 19px; font-weight: 800; letter-spacing: .5px; background: none; }
.result-panel > h2:before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: linear-gradient(180deg, #a78bfa, #6d3ef2); }

.game-tabs { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 14px 6px; padding: 5px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-radius: 999px; }
.game-tabs button { height: 33px; padding: 0 4px; color: rgba(255, 255, 255, .72); font-size: 14px; font-weight: 700; border: 0; border-radius: 999px; background: transparent; cursor: pointer; transition: color .15s ease, background .15s ease; }
.game-tabs button:hover { color: #fff; }
.game-tabs button.active { color: var(--brand-deep); background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .24); }

.draw-card { display: none; padding: 4px 14px 16px; min-height: 153px; }
.draw-card.active { display: block; }
.draw-heading { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 30px; margin: 6px 0 4px; font-size: 15px; font-weight: 700; }
.draw-heading strong { color: #c7b7ff; }
.draw-heading b { color: #ffd166; font-size: 17px; }
.draw-heading span { color: rgba(255, 255, 255, .5); font-weight: 500; }
.draw-heading a { padding: 2px 10px; color: #fff; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .16); border-radius: 999px; transition: background .15s ease; }
.draw-heading a:hover { background: rgba(255, 255, 255, .3); }

.ball-line { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 80px; padding: 6px 0 4px; }
.ball-line [hidden] { display: none !important; }
.ball {
    position: relative;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    overflow: hidden;
    color: #fff;
    text-align: center;
    border: 0;
    border-radius: 50%;
    background: #3a3358;
    box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .28), inset 0 6px 12px rgba(255, 255, 255, .18), 0 6px 14px rgba(0, 0, 0, .26);
}
.ball:before { content: ""; position: absolute; top: 8px; left: 50%; width: 26px; height: 12px; margin-left: -13px; background: radial-gradient(ellipse at center, rgba(255, 255, 255, .55), transparent 70%); pointer-events: none; }
.ball strong { position: relative; display: block; height: auto; color: #fff; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.5px; text-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.ball small { position: relative; display: block; height: auto; color: rgba(255, 255, 255, .88); font-size: 10px; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.ball.waiting { background: #322c4c; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.ball.waiting strong { color: rgba(255, 255, 255, .82); }
.ball.waiting small { color: rgba(255, 255, 255, .35); }
.ball.red { background: radial-gradient(circle at 32% 26%, #ff8a8a, #e62a2d 62%, #a80f16 100%); }
.ball.blue { background: radial-gradient(circle at 32% 26%, #86c8ff, #278fe1 62%, #175ba8 100%); }
.ball.green { background: radial-gradient(circle at 32% 26%, #7ef0a4, #14a931 62%, #0a7421 100%); }
.ball-line > .ball:last-of-type { box-shadow: inset 0 -6px 14px rgba(0, 0, 0, .28), inset 0 6px 12px rgba(255, 255, 255, .18), 0 0 0 3px rgba(255, 209, 102, .85), 0 6px 18px rgba(255, 209, 102, .35); }
.plus { width: 12px; color: rgba(255, 255, 255, .5); font-size: 22px; font-weight: 900; text-align: center; }

.next-draw { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; margin-top: 8px; padding: 6px 10px; color: rgba(255, 255, 255, .82); font-size: 13px; font-weight: 600; line-height: 1.6; text-align: center; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; }
.next-draw b { color: #ffd166; }
.next-draw span { color: #fff; }
.next-draw button { margin-left: 6px; padding: 3px 12px; color: var(--brand-deep); font-size: 12px; font-weight: 700; line-height: 22px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #ffe08a, #ffb340); cursor: pointer; }
.next-draw button:hover { filter: brightness(1.05); }
.empty-draw { padding: 30px 15px; color: rgba(255, 255, 255, .55); font-size: 14px; text-align: center; }

/* ---------- 资料区 ---------- */
.data-section { margin: 12px; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.data-section h2,
.experts > h2 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    overflow: hidden;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
    border: 0;
    background: linear-gradient(120deg, #3b2a86, #6d3ef2 55%, #a06bff);
}
.data-section h2 span { color: #ffd166; font-size: 12px; font-weight: 700; padding: 2px 8px; background: rgba(255, 255, 255, .16); border-radius: 999px; }

.prediction-history { padding: 4px; background: #fff; }
.prediction-row {
    display: grid;
    grid-template-columns: 122px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 34px;
    margin: 2px 0;
    padding: 5px 12px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    text-align: left;
    border-bottom: 1px solid #f2f0f8;
    border-radius: 8px;
    background: #fff;
    transition: background .15s ease;
}
.prediction-row:hover { background: #faf8ff; }
.prediction-row .prediction-meta { color: var(--ink-3); font-size: 12px; font-weight: 600; white-space: nowrap; }
.prediction-row .prediction-content { color: #0a7a30; overflow-wrap: anywhere; }
.prediction-row .prediction-content mark { padding: 0 3px; color: #c40000; background: #fff000; border-radius: 4px; }
.prediction-row .prediction-outcome { justify-self: end; padding: 1px 8px; color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; background: #f4f2fb; border-radius: 999px; }
.prediction-row.hit .prediction-outcome { color: #ab0f0f; background: #ffe9e9; }
.prediction-row.hit { background: #fffafa; }
.prediction-row.miss .prediction-outcome { color: var(--ink-3); background: #f4f2fb; }
.prediction-row.miss .prediction-content { color: var(--ink-2); }

.source-period-heading { display: flex; align-items: center; justify-content: center; min-height: 34px; margin: 10px 4px 4px; color: var(--brand-deep); font-size: 13px; font-weight: 700; line-height: 1.5; text-align: center; white-space: nowrap; background: var(--brand-soft); border-radius: 999px; }
.source-image-period { height: 32px; color: var(--brand-deep); font-weight: 700; line-height: 32px; text-align: center; background: #fff6e8; border-bottom: 1px solid var(--line); }
.source-material-image { width: 100%; height: auto; background: #fff; }
.section-note { margin: 6px 10px 10px; padding: 8px 12px; color: var(--ink-2); font-size: 13px; text-align: center; background: #faf9ff; border: 1px dashed var(--line); border-radius: 10px; }

.code-table { width: 100%; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 14px; font-weight: 700; line-height: 1.7; text-align: center; table-layout: fixed; border-radius: 12px; }
.code-table td { padding: 7px 6px; border-bottom: 1px solid #f2f0f8; }
.code-table tr:last-child td { border-bottom: 0; }
.code-table tr:nth-child(even) td:not(:first-child):not(:last-child) { background: #faf9ff; }
.code-table td:first-child { width: 24%; color: var(--brand-deep); font-size: 13px; background: #f7f4ff; }
.code-table td:nth-child(2) { color: #0a7a30; background: #fff; letter-spacing: 1px; }
.code-table td:nth-child(2) mark { padding: 0 3px; color: #c40000; background: #fff000; border-radius: 4px; }
.code-table td:last-child { width: 24%; color: #c02a2a; font-size: 12px; background: #fff8f8; }

.wide-ad { display: block; margin: 12px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.wide-ad img { width: 100%; max-height: 96px; object-fit: cover; }
.square-ad { display: flex; align-items: center; justify-content: center; min-height: 220px; margin: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.square-ad img { width: 200px; height: 200px; object-fit: cover; border-radius: 12px; }
.anchor-target { display: block; position: relative; top: -96px; visibility: hidden; }

/* ---------- 高手资料 ---------- */
.experts { margin: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.experts > h2 { background: linear-gradient(120deg, #25204a, #46327f 60%, #6d3ef2); }
.expert-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; }
.expert-list a { position: relative; display: block; min-height: 72px; padding: 10px 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fcfbff; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.expert-list a:hover { border-color: rgba(91, 43, 224, .35); box-shadow: 0 8px 20px rgba(91, 43, 224, .12); transform: translateY(-2px); }
.expert-list .author { display: inline-block; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.expert-list .badge { float: right; padding: 0 8px; color: #fff; font-size: 11px; font-weight: 700; line-height: 20px; background: linear-gradient(135deg, #ff8a5b, #f0522f); border-radius: 999px; }
.expert-list strong { display: block; margin-top: 4px; color: var(--brand-deep); font-size: 14px; line-height: 1.6; }
.property-chart { margin: 12px; padding: 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.property-chart img { width: 100%; border-radius: 10px; }

/* ---------- 页脚 / 悬浮 / 底部导航 ---------- */
.site-footer { margin-top: 20px; padding: 18px 14px 10px; color: var(--ink-3); font-size: 12px; line-height: 1.8; text-align: center; border-top: 1px solid var(--line); }
.floating-ad { position: fixed; z-index: 1200; right: max(12px, calc(50% - 560px)); top: 42%; width: 104px; overflow: hidden; border-radius: 12px; box-shadow: var(--shadow-md); transform: translateY(-50%); }
.floating-ad button { display: block; width: 100%; height: 24px; padding: 0; color: #fff; font-size: 11px; line-height: 24px; border: 0; background: rgba(20, 16, 40, .82); cursor: pointer; }
.floating-ad img { width: 104px; max-height: 245px; object-fit: cover; }

.bottom-nav {
    position: fixed;
    z-index: 1100;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--shell);
    max-width: 100%;
    height: var(--nav-h);
    margin: auto;
    padding: 0 6px env(safe-area-inset-bottom, 0);
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 -6px 22px rgba(23, 20, 42, .08);
}
.bottom-nav > a,
.bottom-nav > button { position: relative; flex: 1; min-width: 0; padding: 0; color: var(--ink-3); font: inherit; text-align: center; border: 0; background: transparent; cursor: pointer; }
.bottom-nav .nav-icon { display: block; height: 28px; color: var(--brand); font-size: 20px; line-height: 30px; }
.bottom-nav em { display: block; font-style: normal; font-size: 12px; font-weight: 600; line-height: 18px; }
.bottom-nav .more span { position: absolute; left: 50%; bottom: 8px; width: 52px; height: 52px; margin-left: -26px; color: #fff; font-size: 13px; font-weight: 700; line-height: 52px; text-indent: 0; background: linear-gradient(135deg, #7b5cff, #4a1fc4); border-radius: 50%; box-shadow: 0 8px 20px rgba(91, 43, 224, .38); }
.bottom-more-menu { position: fixed; z-index: 1090; right: 0; bottom: var(--nav-h); left: 0; width: var(--shell); max-width: 100%; margin: auto; overflow: hidden; pointer-events: none; opacity: 0; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -8px 26px rgba(23, 20, 42, .18); transform: translateY(14px); transition: opacity .2s, transform .2s; }
.bottom-more-menu.open { pointer-events: auto; opacity: 1; transform: translateY(0); }
.more-menu-link { display: block; height: 44px; color: #fff; font-size: 15px; font-weight: 600; line-height: 44px; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, .55); }
.more-menu-link.color-green { background: linear-gradient(90deg, #2ca944, #23c25a); }
.more-menu-link.color-red { background: linear-gradient(90deg, #e3483e, #f2635a); }
.more-menu-link.color-blue { background: linear-gradient(90deg, #288dcc, #3aa7ea); }
.more-menu-link.color-orange { background: linear-gradient(90deg, #ed872f, #ffa64d); }
.more-menu-link.color-navy { background: linear-gradient(90deg, #334b76, #46609a); }

.modal-open { overflow: hidden; }
.property-modal { position: fixed; z-index: 3000; inset: 0; display: flex; align-items: center; justify-content: center; padding: 48px 16px 20px; visibility: hidden; background: rgba(12, 9, 28, .86); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s, visibility .2s; }
.property-modal.open { visibility: visible; opacity: 1; }
.property-modal-close { position: absolute; z-index: 1; top: 14px; right: max(16px, calc(50% - 400px)); padding: 7px 14px; color: #fff; font-size: 13px; border: 1px solid rgba(255, 255, 255, .5); border-radius: 999px; background: rgba(255, 255, 255, .12); cursor: pointer; }
.property-modal-stage { width: 680px; max-width: 100%; max-height: calc(100vh - 80px); overflow: auto; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.property-modal-stage img { display: block; width: 100%; height: auto; }

/* ---------- 开奖历史页 ---------- */
.history-body { min-height: 100vh; margin: 0; background: var(--bg); }
.history-shell { position: relative; width: var(--shell); max-width: 100%; min-height: 100vh; margin: auto; background: #fff; box-shadow: var(--shadow-md); }
.history-topbar { position: relative; z-index: 20; height: 48px; color: #fff; background: linear-gradient(120deg, #2c1668, #5b2be0 70%, #7b5cff); }
.history-topbar h1 { margin: 0; font-size: 17px; font-weight: 700; line-height: 48px; text-align: center; }
.history-back, .history-menu-button { position: absolute; top: 0; width: 48px; height: 48px; padding: 0; color: #fff; font-size: 24px; line-height: 46px; text-align: center; border: 0; background: transparent; cursor: pointer; }
.history-back { left: 0; }
.history-menu-button { right: 0; font-size: 20px; }
.history-quick-menu { position: absolute; top: 48px; right: 8px; display: none; width: 158px; overflow: hidden; padding: 6px 0; background: rgba(23, 20, 42, .96); border-radius: 12px; box-shadow: 0 10px 28px rgba(0, 0, 0, .32); }
.history-quick-menu.open { display: block; }
.history-quick-menu a, .history-quick-menu button { display: block; width: 100%; height: 40px; padding: 0 16px; color: #fff; font: inherit; font-size: 14px; line-height: 40px; text-align: left; border: 0; background: transparent; cursor: pointer; }
.history-quick-menu a:hover, .history-quick-menu button:hover { background: rgba(91, 43, 224, .7); }
.history-game-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; height: auto; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fff; }
.history-game-tabs a { overflow: hidden; font-size: 13px; font-weight: 600; line-height: 30px; text-align: center; white-space: nowrap; color: var(--ink-2); background: #f4f2fb; border-radius: 999px; }
.history-game-tabs a.active { color: #fff; background: var(--brand); box-shadow: 0 4px 12px rgba(91, 43, 224, .3); }
.history-year-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; min-height: 32px; padding: 4px 10px; background: #faf9ff; border-bottom: 1px solid var(--line); }
.history-year-tabs a { padding: 0 12px; color: var(--ink-2); font-size: 13px; line-height: 26px; border-radius: 999px; }
.history-year-tabs a.active { color: #fff; font-weight: 700; background: var(--brand); }
.history-filter-panel { padding: 8px 10px; background: #fff; border-bottom: 1px solid var(--line); }
.history-filter-row { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 6px; }
.history-filter-row:last-child { margin-bottom: 0; }
.history-filter-row > strong { flex: 0 0 10%; padding-top: 2px; color: var(--brand-deep); font-size: 12px; line-height: 24px; text-align: center; }
.history-filter-options { display: grid; flex: 1; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.history-filter-options.animal-options { grid-template-columns: repeat(8, 1fr); }
.history-filter-options button { height: 26px; padding: 0; color: var(--ink-2); font-size: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.history-filter-options button:hover { border-color: rgba(91, 43, 224, .4); }
.history-filter-options button.active { color: #fff; border-color: transparent; background: var(--accent); }
.history-filter-options button.reset { color: #fff; border-color: transparent; background: #41b45f; }
.history-item { margin: 8px 10px; padding: 8px 6px 6px; background: #fcfbff; border: 1px solid var(--line); border-radius: 12px; }
.history-item h2 { height: auto; min-height: 24px; margin: 0 0 4px; padding-left: 6px; color: var(--ink-2); font-size: 13px; font-weight: 700; line-height: 24px; border-left: 3px solid var(--brand); }
.history-item h2 small { color: var(--ink-3); font-size: 11px; }
.history-balls { display: flex; align-items: center; justify-content: space-between; gap: 2px; text-align: center; }
.history-ball { flex: 1; max-width: none; min-width: 0; text-align: center; transition: opacity .2s; }
.history-ball strong { display: block; width: 92%; margin: auto; padding: 1px 0; font-size: 14px; font-weight: 700; line-height: 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.history-ball.red strong { color: #e62a2d; border-color: #ffd4d4; background: #fff6f6; }
.history-ball.blue strong { color: #1d76c9; border-color: #cfe6ff; background: #f4f9ff; }
.history-ball.green strong { color: #0f9d3f; border-color: #ccf0d8; background: #f3fdf6; }
.history-ball small { display: block; height: 16px; color: var(--ink-3); font-size: 11px; line-height: 16px; }
.history-ball.dimmed { opacity: .12; }
.special-label { flex: 0 0 8%; margin: 0; color: var(--brand-deep); font-size: 12px; font-weight: 700; text-align: center; }
.history-empty { padding: 70px 20px; color: var(--ink-3); text-align: center; }

/* ---------- 挑码助手 ---------- */
.picker-body { min-height: 100vh; margin: 0; background: var(--bg); }
.picker-shell { width: var(--shell); max-width: 100%; min-height: 100vh; margin: auto; background: #f7f6fc; box-shadow: var(--shadow-md); }
.picker-topbar { position: relative; display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 12px; color: #fff; background: linear-gradient(120deg, #2c1668, #5b2be0 70%, #7b5cff); }
.picker-topbar h1 { position: absolute; right: 96px; left: 96px; margin: 0; font-size: 17px; font-weight: 700; text-align: center; }
.picker-topbar button, .picker-topbar a { padding: 6px 12px; color: #fff; font-size: 13px; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; background: rgba(255, 255, 255, .14); cursor: pointer; }
.picker-result { min-height: 140px; margin: 10px; padding: 12px; text-align: center; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.picker-result-placeholder { padding: 34px 8px 18px; color: var(--ink-3); font-size: 13px; }
.picker-result-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.picker-number { width: 50px; overflow: hidden; text-align: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.picker-number b { display: block; height: 32px; color: #fff; font-size: 18px; line-height: 32px; }
.picker-number small { display: block; height: 22px; color: var(--ink-2); font-size: 11px; line-height: 22px; }
.picker-number.red b { background: #e62a2d; }
.picker-number.blue b { background: #278fe1; }
.picker-number.green b { background: #14a931; }
.picker-result p { margin: 8px 0 0; color: var(--ink-3); font-size: 12px; }
.picker-result p b { color: var(--accent); }
.picker-controls { padding: 0 10px 16px; }
.picker-group { display: flex; align-items: stretch; margin-bottom: 8px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.picker-group h2 { display: flex; flex: 0 0 78px; align-items: center; justify-content: center; margin: 0; padding: 5px; color: var(--brand-deep); font-size: 13px; font-weight: 700; text-align: center; border-right: 1px solid var(--line); background: var(--brand-soft); }
.picker-options { display: grid; flex: 1; grid-template-columns: repeat(6, 1fr); gap: 5px; padding: 7px; }
.picker-options.dense { grid-template-columns: repeat(6, 1fr); }
.picker-options button { min-height: 34px; padding: 2px; color: var(--ink-2); font-size: 13px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; transition: color .15s ease, background .15s ease, border-color .15s ease; }
.picker-options button:hover { border-color: rgba(91, 43, 224, .4); }
.picker-options button.active { color: #fff; border-color: transparent; background: var(--brand); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.picker-note { padding: 0 10px 24px; color: var(--ink-3); font-size: 12px; text-align: center; }

/* ---------- 帖子页 ---------- */
.post-page { background: #fff; }
.post-page > header h1 { min-height: 58px; margin: 0; padding: 10px 16px; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.5; text-align: center; background: linear-gradient(120deg, #2c1668, #5b2be0 70%, #7b5cff); }
.post-page > h2 { margin: 0; padding: 16px 12px; color: var(--brand-deep); font-size: 18px; line-height: 1.6; text-align: center; border-bottom: 1px solid var(--line); }
.post-meta { display: flex; justify-content: space-between; padding: 8px 16px; color: var(--ink-2); font-size: 13px; border-bottom: 1px solid var(--line); }
.stars { color: #e6a415; letter-spacing: 2px; }
.warm-tip { margin: 10px; padding: 9px 12px; color: #a15c00; font-weight: 700; font-size: 13px; text-align: center; background: #fff6e0; border: 1px solid #ffdca8; border-radius: 10px; }
.post-page blockquote { min-height: 420px; margin: 0; padding: 20px 22px; color: var(--ink); font-size: 16px; font-weight: 600; line-height: 2.05; background: #fff; }
.back-home { display: block; width: 168px; margin: 14px auto 26px; color: #fff; font-weight: 600; line-height: 40px; text-align: center; background: var(--brand); border-radius: 999px; box-shadow: 0 8px 20px rgba(91, 43, 224, .28); }
.expert-prediction-history { min-height: 360px; padding: 14px 16px; background: #fff; }
.expert-prediction-row { position: relative; padding: 11px 10px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 1.8; border-bottom: 1px dashed var(--line); }
.prediction-issue { color: var(--ink); }
.prediction-category { margin: 0 7px; color: var(--ink-2); }
.prediction-values { color: #c0392b; overflow-wrap: anywhere; }
.prediction-values mark { padding: 1px 4px; color: #a50d0d; background: #fff000; border-radius: 4px; }
.prediction-result { margin-left: 7px; white-space: nowrap; }
.result-hit .prediction-result { color: #0a8a3a; }
.result-miss .prediction-result { color: #c93030; }
.result-pending .prediction-result { color: #c93030; }
.corrected-badge { display: inline-block; margin-left: 6px; padding: 1px 6px; color: #8a5a10; font-size: 10px; line-height: 17px; border: 1px solid #f0d9a8; border-radius: 999px; background: #fff8dc; vertical-align: 2px; }
.post-commitment { margin: 0 18px 16px; padding: 14px; color: var(--ink-2); font-size: 13px; line-height: 1.7; text-align: center; border: 1px dashed var(--line); border-radius: 12px; background: #faf9ff; }

@media (max-width: 900px) {
    html { background: var(--bg) !important; }
    .floating-ad { display: none; }
    .site-shell, .history-shell, .picker-shell { border-radius: 0; }
}

@media (max-width: 600px) {
    html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
    .site-shell { width: 100%; overflow-x: clip; box-shadow: none; }
    .hero-ad img { width: 100%; }
    .top-nav { width: 100%; margin-left: 0; gap: 5px; padding: 7px 8px; }
    .top-nav a { font-size: 12px; height: 29px; line-height: 29px; }
    .site-intro { padding: 8px 10px; font-size: 12px; line-height: 21px; }
    .domain-strip { height: 32px; margin: 8px; font-size: 13px; }
    .result-panel { margin: 8px; border-radius: 16px; }
    .result-panel > h2 { padding: 13px 14px 2px; font-size: 16px; }
    .game-tabs { gap: 4px; margin: 8px 10px 4px; padding: 4px; }
    .game-tabs button { height: 29px; font-size: 12px; }
    .draw-card { padding: 2px 10px 12px; }
    .draw-heading { gap: 6px; font-size: 13px; }
    .draw-heading b { font-size: 15px; }
    .ball-line { gap: 3px; }
    .ball { width: calc((100vw - 62px) / 7); height: calc((100vw - 62px) / 7); max-width: 56px; max-height: 56px; }
    .ball strong { font-size: 18px; }
    .ball small { font-size: 9px; }
    .plus { width: 8px; font-size: 16px; }
    .next-draw { flex-wrap: wrap; font-size: 11px; line-height: 20px; }
    .data-section, .experts, .wide-ad, .square-ad, .property-chart { margin: 8px; }
    .data-section h2, .experts > h2 { min-height: 38px; padding: 6px 10px; font-size: 13px; white-space: normal; }
    .prediction-row { grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 9px; font-size: 13px; }
    .prediction-row .prediction-meta { grid-column: 1 / -1; font-size: 11px; }
    .prediction-row.long-content { padding-top: 4px; padding-bottom: 4px; }
    .prediction-row.long-content .prediction-meta,
    .prediction-row.long-content .prediction-content,
    .prediction-row.long-content .prediction-outcome { display: block; }
    .prediction-row.long-content .prediction-meta,
    .prediction-row.long-content .prediction-outcome { line-height: 21px; }
    .prediction-row.long-content .prediction-content { width: 100%; font-size: clamp(11px, 2.9vw, 12px); line-height: 18px; letter-spacing: -.1px; word-break: break-all; }
    .code-table { font-size: 12px; line-height: 1.6; }
    .code-table td { padding: 5px 3px; }
    .code-table td:first-child { width: 24%; font-size: 11px; }
    .code-table td:last-child { width: 23%; font-size: 11px; }
    .expert-list { grid-template-columns: 1fr; padding: 8px; }
    .expert-list a { min-height: 0; }
    .history-game-tabs a { font-size: 11px; }
    .history-item { margin: 6px 8px; padding-right: 4px; padding-left: 4px; }
    .history-filter-panel { padding: 6px 8px; }
    .history-filter-row { display: flex; }
    .history-filter-row > strong { display: block; padding: 2px 0 0; }
    .history-filter-options { grid-template-columns: repeat(8, 1fr); }
    .history-filter-options.animal-options { grid-template-columns: repeat(8, 1fr); }
    .history-ball strong { height: 22px; font-size: 12px; line-height: 21px; }
    .history-ball small { font-size: 10px; }
    .special-label { margin: 0; }
    .picker-group { display: block; }
    .picker-group h2 { min-height: 28px; padding: 3px; border-right: 0; border-bottom: 1px solid var(--line); }
    .picker-options, .picker-options.dense { grid-template-columns: repeat(6, 1fr); padding: 6px; }
    .picker-options button { font-size: 12px; }
    .expert-prediction-history { padding: 10px 8px; }
    .expert-prediction-row { padding: 10px 4px; font-size: 14px; }
    .prediction-category { margin: 0 3px; }
    .prediction-result { margin-left: 3px; }
    .bottom-nav .more span { width: 48px; height: 48px; margin-left: -24px; line-height: 48px; font-size: 12px; }
}
