:root {
  --bg: #0f1419;
  --panel: #1a2332;
  --line: #2a3a4f;
  --text: #e8eef6;
  --muted: #8fa3b8;
  --accent: #c9a227;
  --accent2: #2f9e7b;
  --danger: #d4534a;
  --ball: #1e2d42;
  --radius: 10px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 10% -10%, #1c2b40 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .9; }
.wrap { max-width: 980px; margin: 0 auto; padding: 24px 16px 60px; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; gap: 12px; flex-wrap: wrap;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: .5px; }
.brand span { color: var(--accent); }
.nav a { margin-left: 14px; color: var(--muted); }
.nav a:hover { color: var(--text); }
.panel {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.panel h2 { margin: 0 0 8px; font-size: 18px; }
.flash-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1px;
  text-align: center;
  padding: 8px 12px;
  border-radius: 8px;
  animation: flashPulse 1.2s ease-in-out infinite;
}
.flash-gold {
  color: #ffe566;
  text-shadow:
    0 0 4px #ffd200,
    0 0 10px #ff9f1a,
    0 0 18px #ff4d00,
    0 0 28px rgba(255, 80, 0, .55);
  background: linear-gradient(90deg, rgba(255,180,0,.08), rgba(255,60,60,.12), rgba(255,180,0,.08));
  border: 1px solid rgba(255, 200, 80, .35);
}
.flash-cyan {
  color: #7dffd2;
  text-shadow:
    0 0 4px #2ef5c0,
    0 0 10px #00c2ff,
    0 0 18px #6a5cff,
    0 0 28px rgba(80, 120, 255, .55);
  background: linear-gradient(90deg, rgba(0,220,180,.08), rgba(80,120,255,.14), rgba(0,220,180,.08));
  border: 1px solid rgba(100, 220, 255, .35);
  animation-delay: .35s;
}
@keyframes flashPulse {
  0%, 100% {
    opacity: 1;
    filter: brightness(1.05);
    transform: scale(1);
  }
  25% {
    opacity: .88;
    filter: brightness(1.45);
    transform: scale(1.015);
  }
  50% {
    opacity: 1;
    filter: brightness(1.2);
    transform: scale(1);
  }
  75% {
    opacity: .82;
    filter: brightness(1.55);
    transform: scale(1.02);
  }
}
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 12px 0 4px; color: var(--muted); font-size: 14px; }
.balls { display: flex; flex-wrap: wrap; gap: 12px 10px; margin-top: 14px; align-items: flex-start; }
.ball-item { width: 52px; text-align: center; }
.ball {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
  background: var(--ball); border: 1px solid var(--line);
  font-weight: 700; font-size: 15px;
}
.ball.red { background: linear-gradient(145deg, #ef6b6b, #c0392b); color: #fff; border-color: #ffb0a8; }
.ball.blue { background: linear-gradient(145deg, #5eb0ff, #1d6fdb); color: #fff; border-color: #b7dcff; }
.ball.green { background: linear-gradient(145deg, #45c98a, #1c8f58); color: #fff; border-color: #9ee8c2; }
.draw-line { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.draw-line .plus { color: var(--muted); margin: 0 2px; }
.ball-zodiac { font-size: 13px; font-weight: 700; margin-top: 4px; }
.num-chip {
  display: inline-flex; align-items: center; gap: 4px;
  margin: 2px 8px 2px 0; white-space: nowrap;
}
.mini-ball {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
}
.mini-ball.red { background: linear-gradient(145deg, #ef6b6b, #c0392b); }
.mini-ball.blue { background: linear-gradient(145deg, #5eb0ff, #1d6fdb); }
.mini-ball.green { background: linear-gradient(145deg, #45c98a, #1c8f58); }
.chip-zodiac { font-size: 12px; color: var(--text); }
.zodiac-chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; margin: 4px 6px 4px 0; padding: 0 10px;
  border-radius: 8px; font-size: 16px; font-weight: 700;
  background: #243247; border: 1px solid #3a516c; color: #f0d58a;
}
.zodiac-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; justify-content: center; }
.auto-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 10px; font-size: 13px; color: var(--muted);
}
.auto-bar .dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2f9e7b;
  display: inline-block;
}
.auto-bar .dot.off { background: #8fa3b8; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; }
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: #1a1400; font-weight: 700;
  padding: 10px 16px; border-radius: 8px; font-size: 14px;
}
.btn.secondary { background: #2a3a4f; color: var(--text); }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; max-width: 560px; padding: 10px 12px;
  border-radius: 8px; border: 1px solid var(--line);
  background: #121a24; color: var(--text); font-size: 14px;
}
.admin-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.side {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; height: fit-content;
}
.side a {
  display: block; padding: 10px 12px; color: var(--muted);
  border-radius: 8px; margin-bottom: 4px;
}
.side a:hover, .side a.active { background: #243247; color: var(--text); }
.login-box { max-width: 400px; margin: 80px auto; }
.msg { margin-top: 10px; font-size: 13px; color: var(--accent2); }
.msg.err { color: var(--danger); }
.pager { margin-top: 16px; }
.pager a { margin-right: 8px; }
@media (max-width: 760px) {
  .admin-layout { grid-template-columns: 1fr; }
  .ball { width: 40px; height: 40px; }
}
