:root {
  --red: #dc2626;
  --red-dark: #b91c1c;
  --gold: #fbbf24;
  --bg: #1a1a2e;
  --glass: rgba(255,255,255,.12);
  --line: rgba(255,255,255,.2);
  --text: #fff;
  --muted: rgba(255,255,255,.72);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; color: var(--text); font-family: "Noto Sans TC", "PingFang TC", sans-serif; background: var(--bg); }
body::before {
  content: "";
  position: fixed; inset: 0;
  background: linear-gradient(180deg, rgba(26,10,10,.55), rgba(10,10,20,.78)),
    url("https://static.readdy.ai/image/987258b550dbe1574a39b229aecc8882/f84898ffc9797fd302d9ca1c883baf61.jfif") center/cover no-repeat;
  z-index: -1;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.wrap { max-width: 520px; margin: 0 auto; min-height: 100vh; padding: 72px 16px 88px; }
@media (min-width: 900px) { .wrap { max-width: 980px; } }
.glass { background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(16px); border-radius: 16px; }
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: 60px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; padding: 0 16px;
  background: rgba(20,10,10,.55); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px);
}
.brand { font-family: Pacifico, cursive; font-size: 22px; color: #fff; }
.topbar .right { display: flex; gap: 8px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer; font-weight: 600;
}
.btn-red { background: linear-gradient(180deg, #ef4444, var(--red-dark)); color: #fff; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid var(--line); }
.btn-block { width: 100%; }
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(20,10,10,.75); border-top: 1px solid var(--line); backdrop-filter: blur(16px);
  padding: 8px 0 env(safe-area-inset-bottom);
}
.nav a { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0; }
.nav a i { display: block; font-size: 20px; margin-bottom: 2px; }
.nav a.active, .nav a:hover { color: #fecaca; }
.card { padding: 16px; margin-bottom: 14px; }
.user-card { display: flex; gap: 12px; align-items: center; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #dc2626);
  display: grid; place-items: center; font-weight: 800;
}
.muted { color: var(--muted); font-size: 13px; }
.h1 { font-size: 20px; margin: 0 0 12px; }
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.game-tile {
  overflow: hidden; border-radius: 16px; position: relative; min-height: 92px;
  display: flex; align-items: flex-end; padding: 12px;
  background: linear-gradient(160deg, rgba(220,38,38,.45), rgba(0,0,0,.45));
  border: 1px solid var(--line);
}
.game-tile h3 { margin: 0; font-size: 15px; }
.badge { position: absolute; top: 8px; right: 8px; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #ef4444; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0,0,0,.25); color: #fff; outline: none;
}
.toast {
  position: fixed; left: 50%; top: 80px; transform: translateX(-50%);
  background: #111; color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 80; display: none;
}
.balls { display: flex; flex-wrap: wrap; gap: 6px; }
.ball {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff;
}
.ball.red { background: #dc2626; }
.ball.blue { background: #2563eb; }
.ball.green { background: #16a34a; }
.play-tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.play-tabs a, .chip {
  white-space: nowrap; padding: 8px 12px; border-radius: 999px;
  background: rgba(255,255,255,.1); border: 1px solid transparent; font-size: 13px;
}
.play-tabs a.active, .chip.on { background: var(--red); border-color: #fecaca; }
.bet-cell {
  text-align: center; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,.2); cursor: pointer;
}
.bet-cell.on { outline: 2px solid #fca5a5; background: rgba(220,38,38,.25); }
.odds { color: #fecaca; font-size: 11px; font-weight: 700; }
.cart {
  position: sticky; bottom: 72px; z-index: 30; padding: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.admin { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
.admin-nav { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.stat { padding: 16px; }
.stat b { display: block; font-size: 22px; margin-top: 6px; }
.issue-bar { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.lang-switch { display: flex; gap: 6px; }
.lang-switch button { padding: 6px 8px; font-size: 12px; border-radius: 8px; }
.warn { color: #fecaca; }
.ok { color: #86efac; }
.empty { text-align: center; padding: 24px; color: var(--muted); }
