/* One8 Game Center —— 视觉沿用抽奖弹窗规范：金黄 #E0A400 + 深金描边 + 英文艺术字（Luckiest Guy） */
@font-face {
  font-family: 'Luckiest Guy';
  src: url('/assets/fonts/luckiest-guy.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --gold: #E0A400;
  --gold-light: #FFC93C;
  --gold-dark: #8A5A00;
  --bg: #17110a;
  --bg-2: #201709;
  --card: #2a1e0f;
  --card-2: #33240f;
  --line: rgba(224, 164, 0, .35);
  --text: #f6ead3;
  --muted: #b39a72;
  --ok: #3fbf6a;
  --err: #e5544b;
  --radius: 18px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(224, 164, 0, .18), transparent 60%),
    radial-gradient(800px 400px at 100% 100%, rgba(224, 164, 0, .08), transparent 60%),
    var(--bg);
  padding-bottom: calc(24px + var(--safe-bottom));
}

.art { font-family: 'Luckiest Guy', system-ui, sans-serif; font-weight: 400; letter-spacing: .5px; }

/* ---------- 顶部 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: calc(14px + var(--safe-top)) 16px 12px;
  background: linear-gradient(180deg, rgba(23,17,10,.96), rgba(23,17,10,.78) 70%, transparent);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #2a1e0f; display: flex; align-items: center; justify-content: center;
  font-family: 'Luckiest Guy', sans-serif; font-size: 18px;
  box-shadow: 0 2px 0 var(--gold-dark);
  flex-shrink: 0;
}
.topbar h1 {
  margin: 0; font-size: 19px; color: var(--gold); line-height: 1.1;
  text-shadow: 0 2px 0 var(--gold-dark), 0 0 18px rgba(224,164,0,.35);
}
.topbar .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.topbar .right { margin-left: auto; text-align: right; }
.topbar .points { font-size: 13px; color: var(--text); font-weight: 700; }
.topbar .points span { color: var(--gold); }

/* ---------- 跑马灯灯泡（与老虎机弹窗同款） ---------- */
.bulbs { display: flex; gap: 8px; justify-content: center; padding: 6px 0 2px; }
.bulb {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 8px rgba(224,164,0,.9);
  animation: blink 1.2s infinite ease-in-out;
}
@keyframes blink { 0%,100% { opacity: .35 } 50% { opacity: 1 } }

/* ---------- 列表 ---------- */
.wrap { padding: 6px 16px 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.game-card {
  position: relative;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer;
  transition: transform .12s ease, border-color .2s ease;
  box-shadow: 0 6px 0 rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.04);
}
.game-card:active { transform: translateY(2px) scale(.985); }
.game-card.locked { opacity: .55; }
.game-emoji, .game-icon { font-size: 30px; line-height: 1; }
.game-name { font-size: 14px; font-weight: 700; color: var(--text); }
.game-name-en { font-size: 11px; color: var(--muted); margin-top: 1px; }
.game-meta { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.game-meta b { color: var(--gold); }
.badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; padding: 3px 7px; border-radius: 999px;
  background: rgba(224,164,0,.15); color: var(--gold); border: 1px solid var(--line);
}
.badge.hot { background: rgba(229,84,75,.18); color: #ff8a80; border-color: rgba(229,84,75,.4); }

.play-btn {
  margin-top: 2px;
  border: none; border-radius: 12px; padding: 10px 12px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  color: #2a1e0f; font-weight: 800; font-size: 13px;
  box-shadow: 0 3px 0 var(--gold-dark);
  font-family: 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .6px;
}
.game-card.locked .play-btn { background: #4a3a22; color: #b39a72; box-shadow: 0 3px 0 #2e2415; }

/* ---------- 通用 ---------- */
.empty, .loading { text-align: center; color: var(--muted); padding: 40px 16px; font-size: 13px; }
.spinner {
  width: 26px; height: 26px; margin: 0 auto 10px; border-radius: 50%;
  border: 3px solid rgba(224,164,0,.25); border-top-color: var(--gold);
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.section-title {
  margin: 18px 0 8px; font-size: 13px; color: var(--gold); letter-spacing: 1px;
  font-family: 'Luckiest Guy', system-ui, sans-serif;
}

.daily-list { display: flex; flex-direction: column; gap: 8px; }
.daily-row {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.03); border: 1px solid rgba(224,164,0,.18);
  border-radius: 12px; padding: 10px 12px; font-size: 13px;
}
.daily-row .rank {
  width: 22px; text-align: center; color: var(--gold);
  font-family: 'Luckiest Guy', system-ui, sans-serif;
}
.daily-row .who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-row .score { color: var(--gold); font-weight: 700; }
.daily-row.me { border-color: var(--gold); background: rgba(224,164,0,.08); }

/* ---------- 结果弹层 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(10,7,3,.82);
  display: none; align-items: center; justify-content: center; padding: 20px; z-index: 100;
}
.overlay.show { display: flex; }
.sheet {
  width: 100%; max-width: 360px; background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1.5px solid var(--line); border-radius: 20px; padding: 22px 18px;
  text-align: center; box-shadow: 0 14px 40px rgba(0,0,0,.6);
}
.sheet h3 { margin: 0 0 6px; color: var(--gold); font-size: 20px; }
.sheet .big { font-family: 'Luckiest Guy', system-ui, sans-serif; font-size: 42px; color: var(--gold-light); margin: 8px 0; }
.sheet .line { font-size: 13px; color: var(--text); margin: 6px 0; }
.sheet .muted { font-size: 12px; color: var(--muted); }
.sheet .btns { display: flex; gap: 10px; margin-top: 16px; }
.btn {
  flex: 1; border: none; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 700;
  font-family: 'Luckiest Guy', system-ui, sans-serif; letter-spacing: .5px; cursor: pointer;
}
.btn-primary { background: linear-gradient(180deg, var(--gold-light), var(--gold)); color: #2a1e0f; box-shadow: 0 3px 0 var(--gold-dark); }
.btn-ghost { background: transparent; color: var(--muted); border: 1.5px solid rgba(224,164,0,.3); }

.toast {
  position: fixed; left: 50%; bottom: calc(28px + var(--safe-bottom)); transform: translateX(-50%);
  background: rgba(20,14,7,.96); color: var(--text); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 999px; font-size: 13px; z-index: 200;
  opacity: 0; transition: opacity .25s ease; pointer-events: none; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; }

/* ---------- 游戏内通用壳 ---------- */
.game-shell { display: flex; flex-direction: column; min-height: 100vh; }
.game-hud {
  display: flex; align-items: center; gap: 10px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  border-bottom: 1px solid rgba(224,164,0,.18);
}
.game-hud .back {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(224,164,0,.1); color: var(--gold); font-size: 18px; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.game-hud .title { font-size: 15px; color: var(--gold); }
.game-hud .score { margin-left: auto; font-family: 'Luckiest Guy', system-ui, sans-serif; font-size: 20px; color: var(--gold-light); }
.game-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px; }
.game-stage canvas, .game-stage > * { max-width: 100%; }