:root {
  --bg: #0b0b0b;
  --card: #161616;
  --card2: #1f1f1f;
  --accent: #ff2e88;
  --accent2: #ff5ba0;
  --text: #f2f2f2;
  --muted: #9b9b9b;
  --ok: #2ecc71;
  --no: #e74c3c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, 'SF Pro', Roboto, 'Segoe UI', sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}

#app { padding-bottom: 24px; }

.head {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 16px 10px;
}
.logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 800;
}
.brand { font-size: 20px; font-weight: 700; letter-spacing: 0.2px; }

.topbar {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 12px 8px;
  position: sticky; top: 0; background: var(--bg); z-index: 10;
}
.backbtn {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--card2); color: var(--text);
  border: none; font-size: 20px; cursor: pointer;
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-logo { color: var(--accent); font-weight: 800; }

.card {
  background: var(--card); border-radius: 14px;
  margin: 10px 14px; padding: 16px;
}
.balance { text-align: center; padding: 22px 16px; }
.bal-main { font-size: 34px; font-weight: 800; color: var(--accent2); }
.bal-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.bal-ref { margin-top: 10px; font-size: 14px; color: #ffd76a; }

.vip { display: flex; flex-direction: column; gap: 6px; }
.vip-name { font-size: 17px; font-weight: 700; }
.vip-meta { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }

.banner {
  margin: 10px 14px; padding: 12px; border-radius: 12px;
  background: #3a2a00; color: #ffd76a; text-align: center; font-size: 14px;
}

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px; }
.tile {
  background: var(--card); border: none; border-radius: 14px;
  color: var(--text); padding: 18px 10px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 600;
}
.tile:active { transform: scale(0.97); }
.tile .emoji { font-size: 26px; }
.tile.big { grid-column: span 2; }

.btn {
  display: block; width: 100%; margin-top: 12px; padding: 14px;
  border: none; border-radius: 12px; cursor: pointer;
  background: var(--card2); color: var(--text);
  font-size: 15px; font-weight: 700;
}
.btn.accent { background: var(--accent); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid var(--card2); }
.btn.small { display: inline-block; width: auto; padding: 8px 14px; margin: 6px 6px 0 0; font-size: 13px; }
.btn.ok { background: #1c3a2a; color: var(--ok); }
.btn.no { background: #3a1c1c; color: var(--no); }

.subtitle { font-weight: 700; margin: 12px 0 8px; font-size: 15px; }
.note { color: var(--muted); font-size: 13px; margin-top: 10px; line-height: 1.5; }
.center { text-align: center; }
.pad { padding: 24px 8px; }
.addr {
  background: var(--card2); border-radius: 10px; padding: 12px;
  font-family: ui-monospace, Menlo, monospace; font-size: 13px;
  word-break: break-all; margin: 8px 0;
}
.addr.small { font-size: 11px; }

.input {
  width: 100%; margin-top: 12px; padding: 14px;
  background: var(--card2); border: 1px solid #2c2c2c; border-radius: 12px;
  color: var(--text); font-size: 15px; outline: none;
}
.input:focus { border-color: var(--accent); }

.watch-wrap { position: relative; border-radius: 12px; overflow: hidden; background: #000; }
#player { width: 100%; display: block; max-height: 60vh; }
.watch-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: rgba(0, 0, 0, 0.35);
}
.overlay-hint { font-size: 13px; color: #ddd; text-align: center; padding: 0 12px; }
.countdown {
  font-size: 46px; font-weight: 800; color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}
.stars { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.star {
  background: rgba(255, 46, 136, 0.9); color: #fff; border: none;
  border-radius: 10px; padding: 10px 14px; font-size: 16px; cursor: pointer; font-weight: 700;
}
.hidden { display: none !important; }
.earned { font-size: 18px; font-weight: 800; color: var(--ok); margin-bottom: 8px; }

.plan-row {
  background: var(--card2); border-radius: 12px; padding: 14px;
  margin-bottom: 10px; cursor: pointer;
}
.plan-row:active { border: 1px solid var(--accent); }
.plan-name { font-weight: 700; font-size: 16px; }
.plan-desc { color: var(--muted); font-size: 13px; margin-top: 4px; }
.plan-min { color: var(--accent2); font-size: 13px; margin-top: 4px; font-weight: 600; }

.line-row {
  background: var(--card2); border-radius: 10px; padding: 10px 12px;
  margin-bottom: 8px; font-size: 14px; line-height: 1.5;
}

.roulette-wheel { font-size: 64px; text-align: center; margin: 10px 0; }

.lang-row {
  display: block; width: 100%; text-align: left; padding: 14px;
  background: var(--card2); color: var(--text); border: none;
  border-radius: 10px; margin-bottom: 8px; font-size: 15px; cursor: pointer;
}
.lang-row.active { border: 1px solid var(--accent); color: var(--accent2); font-weight: 700; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: var(--card2); border-radius: 12px; padding: 14px; text-align: center; font-size: 12px; color: var(--muted); }
.stat-num { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }

.status-pending, .status-approval { color: #ffd76a; }
.status-sent { color: var(--ok); }
.status-failed { color: var(--no); }

.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #232323; color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 14px; opacity: 0; transition: all 0.25s ease; z-index: 100;
  max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.loading { text-align: center; color: var(--muted); padding: 60px 0; }
