/* ═══════════ PC28 开奖网 · 前台 · 深色玻璃拟态 ═══════════ */
:root {
  --bg: #0a0e1a;
  --bg-2: #0e1426;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.09);
  --card-hover: rgba(255, 255, 255, 0.07);
  --text: #eef1f8;
  --text-2: #a9b1c7;
  --text-muted: #6b7490;
  --primary: #6366f1;
  --primary-2: #818cf8;
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --gold: #fbbf24;
  --red: #f87171;
  --green: #34d399;
  --blue: #60a5fa;
  --orange: #fb923c;
  --pink: #f472b6;
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 62px;
  --text-dim: #6b7490;
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 18px);
  overflow-x: hidden;
}

/* 极光背景 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 40% at 15% -5%, rgba(99, 102, 241, 0.16), transparent 60%),
    radial-gradient(ellipse 50% 35% at 90% 5%, rgba(139, 92, 246, 0.13), transparent 60%),
    radial-gradient(ellipse 45% 30% at 50% 105%, rgba(34, 211, 238, 0.07), transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 45%);
}

/* ── 顶栏 ── */
.top-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px;
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--card-border);
}
.site-name {
  font-size: 17px; font-weight: 800; letter-spacing: 0.3px;
  background: linear-gradient(120deg, #a5b4fc, #e0e7ff 45%, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.time-block { text-align: right; line-height: 1.25; }
.time-main { display: block; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--cyan); }
.time-date { display: block; font-size: 11px; color: var(--text-muted); }

.content { max-width: 560px; margin: 0 auto; padding: 14px 14px 0; }
@media (min-width: 900px) { .content { max-width: 640px; } }

/* ── 卡片 ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.card-title { font-size: 15px; font-weight: 700; }

/* ── 倒计时卡 ── */
.countdown-card {
  position: relative;
  text-align: center;
  padding: 20px 16px 22px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(99, 102, 241, 0.28);
  background:
    radial-gradient(ellipse 90% 100% at 50% -20%, rgba(99, 102, 241, 0.22), transparent 65%),
    var(--card);
  overflow: hidden;
}
.next-nbr { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.next-nbr b { color: var(--primary-2); font-weight: 700; }
.timer {
  font-size: 54px; font-weight: 800; letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fde68a, var(--gold) 60%, #f59e0b);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.18);
  line-height: 1.1;
}
.timer.urgent { background: linear-gradient(180deg, #fca5a5, var(--red)); -webkit-background-clip: text; background-clip: text; animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.65; } }
.timer-label { font-size: 10px; letter-spacing: 4px; color: var(--text-muted); margin: 4px 0 12px; }
.progress-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--primary), var(--violet));
  transition: width 1s linear;
}

/* ── 最新开奖 ── */
.latest-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.latest-meta { display: flex; flex-direction: column; gap: 3px; }
.nbr { font-size: 16px; font-weight: 800; }
.latest-dt { font-size: 11.5px; color: var(--text-muted); }
.mipai-btn {
  padding: 7px 16px; font-size: 13px; font-weight: 600;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border); border-radius: 999px; cursor: pointer;
  transition: all 0.2s;
}
.mipai-btn.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(120deg, var(--primary), var(--violet));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.35);
}

.latest-balls { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.ball {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; color: #fff;
  box-shadow: inset 0 -6px 12px rgba(0, 0, 0, 0.28), inset 0 4px 8px rgba(255, 255, 255, 0.22), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.ball.front { background: radial-gradient(circle at 32% 28%, #93c5fd, #3b82f6 55%, #1d4ed8); }
.ball.middle { background: radial-gradient(circle at 32% 28%, #c4b5fd, #8b5cf6 55%, #6d28d9); }
.ball.tail { background: radial-gradient(circle at 32% 28%, #67e8f9, #06b6d4 55%, #0e7490); }
.ball-plus { font-size: 20px; color: var(--text-muted); font-weight: 600; }
.latest-sum {
  display: flex; align-items: center; gap: 8px;
  font-size: 34px; font-weight: 800; color: var(--gold);
  padding: 2px 6px;
}
.latest-sum span {
  font-size: 12px; color: var(--text-muted); font-weight: 600;
  border: 1px solid var(--card-border); border-radius: 6px; padding: 3px 7px;
}
.latest-tags { margin-top: 14px; }
.latest-tag-row { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }

.tag {
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700;
  border: 1px solid transparent;
}
.tag.big { background: rgba(248, 113, 113, 0.14); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.tag.small { background: rgba(96, 165, 250, 0.14); color: var(--blue); border-color: rgba(96, 165, 250, 0.3); }
.tag.odd { background: rgba(251, 146, 60, 0.14); color: var(--orange); border-color: rgba(251, 146, 60, 0.3); }
.tag.even { background: rgba(52, 211, 153, 0.14); color: var(--green); border-color: rgba(52, 211, 153, 0.3); }
.tag.combo { background: rgba(139, 92, 246, 0.14); color: #a78bfa; border-color: rgba(139, 92, 246, 0.3); }
.tag.special { background: rgba(251, 191, 36, 0.14); color: var(--gold); border-color: rgba(251, 191, 36, 0.3); }
.tag.extreme-big { background: rgba(244, 114, 182, 0.14); color: var(--pink); border-color: rgba(244, 114, 182, 0.3); }
.tag.extreme-small { background: rgba(34, 211, 238, 0.14); color: var(--cyan); border-color: rgba(34, 211, 238, 0.3); }
.tag.dt-dragon { background: rgba(248, 113, 113, 0.14); color: var(--red); border-color: rgba(248, 113, 113, 0.3); }
.tag.dt-tiger { background: rgba(96, 165, 250, 0.14); color: var(--blue); border-color: rgba(96, 165, 250, 0.3); }
.tag.dt-he { background: rgba(163, 163, 163, 0.14); color: #d4d4d4; border-color: rgba(163, 163, 163, 0.3); }
.tag.tag-dim { background: rgba(255, 255, 255, 0.05); color: var(--text-muted); border-color: var(--card-border); }

/* 刮刮卡 */
.scratch-wrap { position: relative; display: inline-block; border-radius: 12px; }
.scratch-balls .scratch-content { display: flex; align-items: center; gap: 10px; }
.scratch-sum .scratch-content { display: flex; align-items: center; }
.scratch-tags .scratch-content { padding: 2px 4px; }
.scratch-canvas { position: absolute; inset: 0; z-index: 5; border-radius: 12px; cursor: pointer; display: none; }
.mipai-hidden .scratch-canvas { display: block; }

/* ── 历史记录 ── */
.history-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.history-row {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.history-row:last-child { border-bottom: none; }
.hnbr { flex: 0 0 74px; display: flex; flex-direction: column; gap: 2px; }
.hnbr-num { font-size: 13.5px; font-weight: 700; }
.hnbr-dt { font-size: 10.5px; color: var(--text-muted); }
.hballs { display: flex; align-items: center; gap: 4px; }
.mini-ball {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff;
  box-shadow: inset 0 -3px 5px rgba(0, 0, 0, 0.25), inset 0 2px 4px rgba(255, 255, 255, 0.2);
}
.mini-ball.front { background: radial-gradient(circle at 32% 28%, #93c5fd, #2563eb); }
.mini-ball.middle { background: radial-gradient(circle at 32% 28%, #c4b5fd, #7c3aed); }
.mini-ball.tail { background: radial-gradient(circle at 32% 28%, #67e8f9, #0891b2); }
.mini-plus { font-size: 11px; color: var(--text-muted); }
.hsum { flex: 0 0 30px; text-align: center; font-size: 16px; font-weight: 800; color: var(--gold); }
.htags { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex: 1; }
.mini-tag { padding: 2.5px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700; }
.mini-tag.big { background: rgba(248, 113, 113, 0.14); color: var(--red); }
.mini-tag.small { background: rgba(96, 165, 250, 0.14); color: var(--blue); }
.mini-tag.odd { background: rgba(251, 146, 60, 0.14); color: var(--orange); }
.mini-tag.even { background: rgba(52, 211, 153, 0.14); color: var(--green); }
.mini-tag.dt-dragon { background: rgba(248, 113, 113, 0.14); color: var(--red); }
.mini-tag.dt-tiger { background: rgba(96, 165, 250, 0.14); color: var(--blue); }
.mini-tag.dt-he { background: rgba(163, 163, 163, 0.14); color: #d4d4d4; }
.mini-tag.special { background: rgba(251, 191, 36, 0.14); color: var(--gold); }
.mini-tag.extreme { background: rgba(244, 114, 182, 0.14); color: var(--pink); }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 14px 0 4px; }
.pagination button {
  padding: 8px 18px; font-size: 13px; font-weight: 600;
  color: var(--text-2); background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border); border-radius: 999px; cursor: pointer;
  transition: all 0.15s;
}
.pagination button:not(:disabled):hover { background: var(--card-hover); color: var(--text); }
.pagination button:disabled { opacity: 0.35; cursor: not-allowed; }
.page-info { font-size: 13px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ── 统计页 ── */
.stats-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.stats-tabs .tab {
  flex: 1; text-align: center; padding: 11px; font-size: 14px; font-weight: 700;
  color: var(--text-muted); background: var(--card);
  border: 1px solid var(--card-border); border-radius: var(--radius-sm); cursor: pointer;
  transition: all 0.2s;
}
.stats-tabs .tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(120deg, var(--primary), var(--violet));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}
.date-btns { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 12px; }
.date-btn {
  padding: 7px 14px; font-size: 12.5px; font-weight: 600;
  color: var(--text-2); background: var(--card);
  border: 1px solid var(--card-border); border-radius: 999px; cursor: pointer;
}
.date-btn.active { color: #fff; background: rgba(99, 102, 241, 0.25); border-color: var(--primary); }
.custom-range { display: none; gap: 8px; align-items: center; margin-bottom: 12px; }
.custom-range.show { display: flex; }
.custom-range input {
  flex: 1; padding: 8px 10px; font-size: 13px; color: var(--text);
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  color-scheme: dark;
}
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; }
.stat-cell {
  text-align: center; padding: 10px 4px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
}
.cell-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.cell-count { font-size: 18px; font-weight: 800; margin: 3px 0; font-variant-numeric: tabular-nums; }
.cell-bar { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin: 0 4px; }
.cell-bar-fill { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--cyan), var(--primary)); }
.cell-pct { font-size: 10.5px; color: var(--text-muted); margin-top: 3px; }
.stat-hint { margin-top: 10px; font-size: 12px; color: var(--gold); }

/* ── 表单页（登录/注册/我的） ── */
.auth-wrap { max-width: 400px; margin: 8vh auto 0; padding: 0 18px; }
.auth-card { padding: 28px 22px; }
.auth-title { font-size: 22px; font-weight: 800; text-align: center; margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 600; }
.form-group input, .form-group textarea {
  width: 100%; padding: 12px 14px; font-size: 14px; color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--card-border); border-radius: var(--radius-sm);
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15); }
.btn-primary {
  width: 100%; padding: 13px; font-size: 15px; font-weight: 700; color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--violet));
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
  transition: transform 0.12s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 26px rgba(99, 102, 241, 0.45); }
.btn-primary:active { transform: translateY(0); }
.err-msg { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 8px; text-align: center; }
.auth-link { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 16px; }
.auth-link a { color: var(--primary-2); text-decoration: none; font-weight: 600; }

.info-row { display: flex; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, 0.05); }
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 13.5px; color: var(--text-muted); }
.info-val { font-size: 13.5px; font-weight: 600; }

/* ── 公告 ── */
.announcement {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; margin-bottom: 14px;
  font-size: 13px; line-height: 1.6; color: #fcd34d;
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: var(--radius);
}

.contact-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 6px; border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon { font-size: 20px; }
.contact-label { font-size: 12px; color: var(--text-muted); }
.contact-value { font-size: 14px; font-weight: 600; word-break: break-all; }

/* ── 底部导航 ── */
.tab-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; height: var(--nav-h);
  background: rgba(12, 16, 30, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--card-border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 10.5px; color: var(--text-muted); text-decoration: none;
  transition: color 0.15s;
}
.tab-nav a .icon { font-size: 20px; line-height: 1; }
.tab-nav a.active { color: var(--primary-2); }
.tab-nav a.active .icon { filter: drop-shadow(0 0 8px rgba(129, 140, 248, 0.6)); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 26px); z-index: 100;
  transform: translateX(-50%) translateY(16px);
  padding: 11px 22px; font-size: 13.5px; font-weight: 600; color: #fff;
  background: rgba(30, 36, 58, 0.95); border: 1px solid var(--card-border);
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; pointer-events: none; transition: all 0.25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 人气统计条 */
.stat-strip { display: flex; gap: 8px; margin-bottom: 12px; }
.stat-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 13px; font-size: 12px; color: var(--text-2);
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 999px; backdrop-filter: blur(10px);
}
.stat-pill b { color: var(--cyan); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.stat-pill .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.8);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse { 50% { opacity: 0.45; } }

/* 新开奖闪光 */
@keyframes flash-in { 0% { box-shadow: 0 0 0 rgba(251,191,36,0); } 30% { box-shadow: 0 0 34px rgba(251,191,36,0.4); } 100% { box-shadow: 0 0 0 rgba(251,191,36,0); } }
.flash-new { animation: flash-in 1.6s ease-out; }

.loading-hint { text-align: center; color: var(--text-muted); padding: 26px; font-size: 13px; }
