/* =========================================================
 * site.css — PC28 开奖预测网 视觉系统
 * ========================================================= */
:root {
  --bg-0: #070b16;
  --bg-1: #0c1222;
  --bg-2: #121a2e;
  --card: rgba(255, 255, 255, .045);
  --card-hi: rgba(255, 255, 255, .075);
  --line: rgba(255, 255, 255, .09);
  --line-hi: rgba(255, 255, 255, .18);
  --txt: #e8edf7;
  --txt-2: #a8b4cc;
  --txt-3: #6f7d99;
  --brand: #6366f1;
  --brand-2: #a855f7;
  --cyan: #22d3ee;
  --green: #22c55e;
  --blue: #3b82f6;
  --red: #ef4444;
  --yellow: #f59e0b;
  --radius: 18px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .85);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  overflow-x: hidden;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(99, 102, 241, .20), transparent 60%),
    radial-gradient(900px 560px at 88% 4%, rgba(168, 85, 247, .16), transparent 62%),
    radial-gradient(800px 500px at 50% 110%, rgba(34, 211, 238, .10), transparent 60%),
    var(--bg-0);
  color: var(--txt);
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: linear-gradient(rgba(255,255,255,.022) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 20%, #000 20%, transparent 78%);
}
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 18px 80px; position: relative; z-index: 1; overflow-x: hidden; }
#predictLayout > div { min-width: 0; }
#predictLayout .stat { min-width: 0; overflow: hidden; }
.table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(180deg, rgba(7,11,22,.92), rgba(7,11,22,.62));
  border-bottom: 1px solid var(--line);
}
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center; gap: 18px; }
.logo { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 19px; letter-spacing: .3px; }
.logo-badge {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 8px 22px -6px rgba(99,102,241,.85); font-size: 17px; color: #fff;
}
.logo small { display: block; font-size: 11px; font-weight: 500; color: var(--txt-3); letter-spacing: .6px; }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav button {
  border: 1px solid transparent; background: transparent; color: var(--txt-2);
  padding: 8px 14px; border-radius: 11px; font-size: 14px; cursor: pointer; transition: .18s;
  display: inline-flex; align-items: center; gap: 7px;
}
.nav button:hover { color: #fff; background: var(--card); }
.nav button.active {
  color: #fff; background: linear-gradient(135deg, rgba(99,102,241,.28), rgba(168,85,247,.22));
  border-color: rgba(139,140,255,.45); box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}

/* ---------------- Hero ---------------- */
.hero {
  margin-top: 26px; border-radius: 26px; padding: 26px 28px;
  background: linear-gradient(140deg, rgba(99,102,241,.18), rgba(168,85,247,.10) 45%, rgba(34,211,238,.08));
  border: 1px solid var(--line-hi);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.08);
  display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center;
  position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -70px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.07), transparent 65%);
}
.hero-l { min-width: 0; }
.hero-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-title h1 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.tag {
  font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 600;
  background: rgba(99,102,241,.18); border: 1px solid rgba(139,140,255,.35); color: #c7cbff;
}
.tag.green { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.35); color: #86efac; }
.tag.amber { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.35); color: #fcd34d; }
.hero-period { margin-top: 8px; color: var(--txt-3); font-size: 13px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero-period b { color: var(--txt-2); font-weight: 600; }
.countdown {
  text-align: right; padding: 10px 16px; border-radius: 14px; min-width: 0; width: auto;
  background: rgba(8,12,24,.55); border: 1px solid var(--line-hi);
}
.countdown .cd-label { font-size: 11.5px; color: var(--txt-3); letter-spacing: 1px; white-space: nowrap; }
.countdown .cd-time {
  font-size: 28px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.15;
  letter-spacing: .5px;
  background: linear-gradient(135deg, #fff, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.countdown .cd-sub { font-size: 11.5px; color: var(--txt-3); white-space: nowrap; }
.countdown.live .cd-time { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------------- 开奖主卡 ---------------- */
.lottery-box {
  margin-top: 18px; border-radius: var(--radius); padding: 22px 24px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.lottery-box .countdown { margin-left: auto; }
.lottery-label { color: var(--txt-3); font-size: 12px; letter-spacing: 1px; text-align: center; }
.balls { display: flex; align-items: center; gap: 10px; }
.ball {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums;
  box-shadow: inset 0 -7px 14px rgba(0,0,0,.28), inset 0 7px 12px rgba(255,255,255,.34), 0 8px 18px -6px rgba(0,0,0,.7);
  position: relative; flex: none;
}
.ball::after {
  content: ""; position: absolute; left: 16%; top: 9%; width: 34%; height: 26%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.65), transparent 70%);
}
.ball.sm { width: 32px; height: 32px; font-size: 14px; }
.ball.md { width: 38px; height: 38px; font-size: 16px; }
.ball.lg { width: 62px; height: 62px; font-size: 26px; }
.ball.xl { width: 74px; height: 74px; font-size: 31px; }
.ball.red    { background: radial-gradient(circle at 32% 26%, #ff9a9a, #ef4444 46%, #a50f26); }
.ball.green  { background: radial-gradient(circle at 32% 26%, #86efac, #22c55e 46%, #12682f); }
.ball.blue   { background: radial-gradient(circle at 32% 26%, #93c5fd, #3b82f6 46%, #1c3f9c); }
.ball.yellow { background: radial-gradient(circle at 32% 26%, #fde68a, #f59e0b 46%, #9a5b04); }
.op { color: var(--txt-3); font-size: 22px; font-weight: 300; }
.result-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shape-chips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.chip {
  font-size: 12.5px; padding: 5px 11px; border-radius: 999px; font-weight: 600;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-hi); color: var(--txt-2);
}
.chip.big { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.chip.small { background: rgba(34,211,238,.14); border-color: rgba(34,211,238,.38); color: #a5f3fc; }
.chip.odd { background: rgba(168,85,247,.16); border-color: rgba(168,85,247,.4); color: #d8b4fe; }
.chip.even { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.38); color: #fcd34d; }
.chip.special { background: linear-gradient(135deg, rgba(99,102,241,.28), rgba(168,85,247,.2)); border-color: rgba(139,140,255,.5); color: #d5d8ff; }

/* ---------------- 卡片 / 面板 ---------------- */
.panel {
  margin-top: 20px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); overflow: hidden;
}
.panel-head {
  display: flex; align-items: center; gap: 12px; padding: 15px 20px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); flex-wrap: wrap;
}
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.panel-head h2 i { color: var(--brand); }
.panel-head .sub { color: var(--txt-3); font-size: 12.5px; }
.panel-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-body { padding: 18px 20px; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g5 { grid-template-columns: repeat(5, 1fr); }

/* 统计小卡 */
.stat {
  border-radius: 15px; padding: 15px 16px; background: rgba(255,255,255,.035); border: 1px solid var(--line);
  transition: .2s;
}
.stat:hover { background: var(--card-hi); transform: translateY(-2px); }
.stat .k { color: var(--txt-3); font-size: 12px; letter-spacing: .4px; }
.stat .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }
.stat .d { font-size: 11.5px; color: var(--txt-3); margin-top: 3px; }
.grad-text { background: linear-gradient(135deg, #fff, #a5b4fc); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl thead th {
  text-align: left; padding: 11px 14px; color: var(--txt-3); font-weight: 600; font-size: 12.5px;
  border-bottom: 1px solid var(--line); white-space: nowrap; background: rgba(255,255,255,.02);
  position: sticky; top: 0; backdrop-filter: blur(6px);
}
.tbl tbody td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.045); white-space: nowrap; }
.tbl tbody tr { transition: .15s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.035); }
.tbl .num { font-variant-numeric: tabular-nums; color: var(--txt-2); }
.tbl .strong { color: #fff; font-weight: 600; }

/* ---------------- 表单控件 ---------------- */
.btn {
  border: 1px solid var(--line-hi); background: rgba(255,255,255,.05); color: var(--txt);
  padding: 8px 15px; border-radius: 11px; font-size: 13.5px; cursor: pointer; transition: .18s;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff;
  box-shadow: 0 10px 24px -10px rgba(99,102,241,.95); font-weight: 600;
}
.btn.primary:hover { filter: brightness(1.12); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.seg { display: inline-flex; padding: 4px; gap: 3px; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.seg button {
  border: none; background: transparent; color: var(--txt-2); padding: 7px 14px; border-radius: 9px;
  font-size: 13.5px; cursor: pointer; transition: .18s; white-space: nowrap;
}
.seg button.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 600; box-shadow: 0 6px 16px -8px rgba(99,102,241,.9); }
.seg button:hover:not(.active) { color: #fff; background: rgba(255,255,255,.07); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; color: var(--txt-3); }
input[type="number"], input[type="text"], select {
  background: rgba(255,255,255,.05); border: 1px solid var(--line-hi); color: var(--txt);
  padding: 8px 11px; border-radius: 10px; font-size: 13.5px; outline: none; transition: .18s; width: 100%;
}
input:focus, select:focus { border-color: rgba(139,140,255,.65); box-shadow: 0 0 0 3px rgba(99,102,241,.16); }
input[type="range"] { width: 100%; accent-color: var(--brand); }

/* 模型多选 */
.model-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 9px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.model-item {
  display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border-radius: 11px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); cursor: pointer; transition: .16s; font-size: 13px;
}
.model-item:hover { background: rgba(255,255,255,.07); }
.model-item.on { background: linear-gradient(135deg, rgba(99,102,241,.2), rgba(168,85,247,.14)); border-color: rgba(139,140,255,.45); }
.model-item input { accent-color: var(--brand); margin-top: 2px; }
.model-item .mi-name { font-weight: 600; }
.model-item .mi-desc { color: var(--txt-3); font-size: 11.5px; line-height: 1.45; margin-top: 2px; }

/* 结果展示 */
.pred-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pred-balls { display: flex; gap: 10px; flex-wrap: wrap; }
.pred-balls .ball { animation: pop .35s cubic-bezier(.2,1.4,.4,1) backwards; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.pred-meta { display: flex; gap: 22px; flex-wrap: wrap; }
.pred-meta .m .k { font-size: 11.5px; color: var(--txt-3); }
.pred-meta .m .v { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* 概率条 */
.prob-row { display: grid; grid-template-columns: 58px 1fr 64px; gap: 10px; align-items: center; margin-bottom: 7px; font-size: 13px; }
.prob-bar { height: 9px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.prob-bar > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .5s cubic-bezier(.3,1,.4,1); }
.prob-row .pv { text-align: right; color: var(--txt-3); font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* 走势图 */
.chart-box { width: 100%; overflow-x: auto; }
.chart-box svg { display: block; }
.trend-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--txt-3); margin-top: 10px; }
.trend-legend span { display: inline-flex; align-items: center; gap: 6px; }
.trend-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

/* 提示条 */
.note {
  display: flex; gap: 11px; padding: 12px 15px; border-radius: 13px; font-size: 13px; line-height: 1.7;
  background: rgba(245,158,11,.08); border: 1px solid rgba(245,158,11,.28); color: #fcd9a0;
}
.note.info { background: rgba(99,102,241,.09); border-color: rgba(99,102,241,.3); color: #c3c8ff; }
.note i { margin-top: 3px; }

/* 进度条 */
.progress { height: 6px; border-radius: 5px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--cyan)); transition: width .25s; }

/* 加载骨架 */
.skeleton { background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 8px; height: 16px; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* 排行条 */
.rank-bar { height: 8px; border-radius: 5px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.rank-num { font-weight: 800; color: var(--txt-3); width: 26px; display: inline-block; }
.top3 { color: #fcd34d; }

/* 隐藏面板 */
.view { display: none; }
.view.active { display: block; animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* 响应式 */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .countdown { text-align: left; }
  .g3, .g4, .g5 { grid-template-columns: repeat(2, 1fr); }
  .nav { gap: 0; }
  .nav button { padding: 7px 10px; font-size: 13px; }
  .nav button span { display: none; }
  #predictLayout { grid-template-columns: 1fr !important; }
  .panel-body { padding: 14px 13px; }
  .panel-head { padding: 13px 14px; }
  .lottery-box { padding: 18px 15px; gap: 14px; }
  .model-list { grid-template-columns: 1fr; max-height: 220px; }
  .hero-title h1 { font-size: 19px; }
  .stat .v { font-size: 20px; }
}
@media (max-width: 480px) {
  .topbar-in { padding: 11px 12px; gap: 10px; }
  .logo { font-size: 16px; }
  .logo small { display: none; }
  .countdown { min-width: 0; width: 100%; padding: 13px 16px; }
  .countdown .cd-time { font-size: 30px; }
  .hero-period { font-size: 12px; gap: 10px; }
  .panel-head .right { width: 100%; }
  .seg button { padding: 6px 11px; font-size: 12.5px; }
}
@media (max-width: 560px) {
  .g2, .g3, .g4, .g5 { grid-template-columns: 1fr; }
  .ball { width: 30px; height: 30px; font-size: 14px; }
  .ball.sm { width: 26px; height: 26px; font-size: 12px; }
  .ball.lg { width: 40px; height: 40px; font-size: 18px; }
  .ball.xl { width: 44px; height: 44px; font-size: 20px; }
  .balls { gap: 6px; }
  .op { font-size: 16px; }
  .countdown .cd-time { font-size: 26px; }
  .countdown { padding: 8px 12px; }
  .lottery-box { gap: 10px; padding: 14px 12px; }
  .lottery-label { font-size: 11px; }
  .shape-chips { gap: 5px; }
  .chip { font-size: 11.5px; padding: 4px 9px; }
  /* 表格：手机端可横向滚动，列宽紧凑 */
  .tbl { font-size: 13px; min-width: 520px; }
  .tbl thead th, .tbl tbody td { padding: 8px 10px; }
  .pred-balls { gap: 7px; }
  .pred-meta { gap: 14px; }
  .pred-meta .m .v { font-size: 15px; }
  .panel-head h2 { font-size: 15px; }
  .wrap { padding: 0 12px 60px; }
  .lottery-box { flex-direction: column; align-items: flex-start; }
  .lottery-box .countdown { margin-left: 0; width: 100%; text-align: left; }
}

/* footer */
.footer { margin-top: 40px; padding: 24px 0; text-align: center; color: var(--txt-3); font-size: 12.5px; line-height: 2; }
.footer a { color: var(--txt-2); text-decoration: none; margin: 0 8px; }
.footer a:hover { color: #fff; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }

/* ---------------- 和值遗漏 ---------------- */
.gap-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--txt-3); margin-bottom: 16px; }
.gap-legend span { display: inline-flex; align-items: center; gap: 7px; }
.gap-legend i { width: 13px; height: 13px; border-radius: 4px; display: inline-block; }
.gap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 11px; }
.gap-cell {
  border-radius: 14px; padding: 15px 10px; text-align: center; color: #fff;
  box-shadow: 0 10px 22px -12px rgba(0,0,0,.9); border: 1px solid rgba(255,255,255,.14);
}
.gap-cell .gv { font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; text-shadow: 0 2px 6px rgba(0,0,0,.3); }
.gap-cell .gl { font-size: 11.5px; opacity: .95; margin-top: 5px; }
.gap-cell.lv0 { background: linear-gradient(160deg, #34d399, #15803d); }
.gap-cell.lv1 { background: linear-gradient(160deg, #60a5fa, #1d4ed8); }
.gap-cell.lv2 { background: linear-gradient(160deg, #fbbf24, #b45309); }
.gap-cell.lv3 { background: linear-gradient(160deg, #f87171, #b91c1c); }
@media (max-width: 560px) {
  .gap-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
  .gap-cell { padding: 12px 6px; }
  .gap-cell .gv { font-size: 21px; }
}
