/* CoinParty design system.
   Direction: real social-gaming product. Neutral dark surfaces carry the UI;
   purple (#7A3BFF) is the brand/primary; yellow (#FFC93C) is reserved for
   game actions, rewards and active states. Medium corner radii, visible
   borders, tactile pressed states. No glassmorphism, no neon, no blobs. */
:root {
  --bg: #17121f;            /* app background — near-black neutral */
  --surface: #201a2e;       /* panels */
  --surface-2: #2a2240;     /* raised rows / inputs */
  --border: #362c4e;
  --border-strong: #463862;
  --text: #f0eef6;
  --muted: #918e9f;
  --purple: #7a3bff;
  --purple-press: #6930e0;
  --purple-soft: #2a2140;   /* purple-tinted fill for active nav states */
  --gold: #ffc93c;          /* yellow accent — game actions & rewards only */
  --gold-press: #e6b22e;
  --green: #3ddc84;
  --red: #ff5c5c;
  /* legacy aliases used by older pages */
  --panel: #201a2e;
  --panel-2: #2a2240;
  --lion: #ff9a3c;
  --tiger: #ff5c5c;
  --tie: #7a3bff;
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 34px; display: block; }

.balance-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 6px 12px; border-radius: 8px;
  font-weight: 700; font-size: 14px;
}
.balance-pill .coin { color: var(--gold); font-weight: 800; }

.nav-links a {
  color: var(--muted); text-decoration: none;
  margin-left: 14px; font-size: 14px; font-weight: 600;
  padding: 6px 8px; border-radius: 8px;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }

.container { max-width: 980px; margin: 0 auto; padding: 20px; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 18px;
}
h1, h2, h3 { margin-top: 0; }
h1 { font-size: 26px; }

/* ---------- buttons: tactile, tiered ---------- */
button { cursor: pointer; font-family: inherit; }
.btn-primary, .btn-secondary {
  border-radius: 9px; padding: 10px 18px;
  font-weight: 700; font-size: 14px;
  transition: transform .05s, background .12s, border-color .12s;
}
.btn-primary {
  background: var(--purple); color: #fff;
  border: 1px solid var(--purple);
  box-shadow: 0 2px 0 #4a1fa8;
}
.btn-primary:hover { background: #8a52ff; }
.btn-primary:active { transform: translateY(2px); box-shadow: none; background: var(--purple-press); }
.btn-secondary {
  background: transparent; color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-secondary:hover { background: var(--surface-2); }
.btn-secondary:active { transform: translateY(1px); }
/* yellow = game/reward actions */
.btn-game {
  background: var(--gold); color: #241a00;
  border: 1px solid var(--gold);
  border-radius: 9px; padding: 10px 18px; font-weight: 800; font-size: 14px;
  box-shadow: 0 2px 0 #a87d14;
}
.btn-game:active { transform: translateY(2px); box-shadow: none; background: var(--gold-press); }

input, select {
  width: 100%; padding: 10px 12px;
  border-radius: 9px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text);
  margin-bottom: 10px; font-size: 14px; font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--purple); }

.error-msg { color: var(--red); font-size: 13px; min-height: 18px; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: 13px; }

/* ---------- home tabs (Rooms / Games) ---------- */
.home-tabs {
  display: flex; gap: 0; margin: 4px 0 20px;
  border-bottom: 1px solid var(--border);
}
.home-tab {
  padding: 10px 18px; font-weight: 700; font-size: 15px;
  color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.home-tab.sel { color: var(--text); border-bottom-color: var(--gold); }

/* ---------- voice rooms hub ---------- */
.rooms-hub { display: grid; grid-template-columns: 280px 1fr; gap: 18px; }
@media (max-width: 720px) { .rooms-hub { grid-template-columns: 1fr; } }
.hub-side { border-right: 1px solid var(--border); padding-right: 18px; }
@media (max-width: 720px) { .hub-side { border-right: none; padding-right: 0; } }
.hub-side h3 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.join-row { display: flex; gap: 8px; }
.join-row input { margin-bottom: 0; }
.room-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 10px; border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.room-row:hover { background: var(--surface); }
.room-row .rname { font-weight: 700; flex: 1; }
.room-row .rid { color: var(--muted); font-size: 12px; }
.room-row .rcount {
  font-size: 12px; font-weight: 700; color: var(--green);
  display: inline-flex; align-items: center; gap: 5px;
}
.room-row .rcount::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); display: inline-block;
}
.live-tag {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  color: #241a00; background: var(--gold);
  padding: 2px 7px; border-radius: 5px;
}

/* ---------- game grid ---------- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.game-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-decoration: none; color: var(--text);
  transition: border-color .12s, transform .1s;
  position: relative;
}
.game-tile:hover { border-color: var(--purple); transform: translateY(-2px); }
.game-tile .emoji { font-size: 30px; margin-bottom: 8px; }
.game-tile strong { font-size: 15px; }
.game-tile .muted { margin-top: 2px; }
.game-tile.disabled { opacity: .4; pointer-events: none; }

/* ---------- settings menu ---------- */
.settings-wrap { position: relative; }
.settings-btn {
  background: transparent; border: 1px solid var(--border-strong);
  color: var(--muted); border-radius: 8px; padding: 7px 12px; font-size: 13px; font-weight: 600;
}
.settings-btn:hover { color: var(--text); background: var(--surface-2); }
.settings-menu {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 12px; width: 210px; z-index: 50;
  display: none;
}
.settings-menu.open { display: block; }
.settings-menu label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }

/* ---------- landing ---------- */
.hero { padding: 48px 20px 8px; text-align: center; }
.hero-inner { max-width: 560px; margin: 0 auto; }
.hero-title { font-size: 40px; font-weight: 900; margin: 0 0 10px; color: var(--text); }
.hero-title .accent { color: var(--gold); }
.hero-sub { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 18px; }
.hero-feats { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.hero-feats .feat {
  border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--muted);
}
.auth-card { max-width: 380px; margin: 24px auto 60px; }

/* ---------- avatars & frames ---------- */
.avatar-circle {
  width: 32px; height: 32px; border-radius: 50%;
  object-fit: cover; background: var(--surface-2);
  border: 1px solid var(--border-strong);
}
.vip-badge {
  font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
  background: var(--surface-2); color: var(--gold);
  border: 1px solid var(--border-strong);
}
.vip-badge.tier-vip { background: var(--purple-soft); color: #c9a8ff; border-color: #4a3580; }
.level-progress { background: var(--surface-2); border-radius: 6px; height: 8px; overflow: hidden; margin-top: 6px; }
.level-progress-fill { height: 100%; background: var(--gold); }

.av-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.av-wrap .av-frame { position: absolute; inset: -4px; border-radius: 50%; pointer-events: none;
  background-size: contain; background-position: center; background-repeat: no-repeat; }
/* Art frames overflow the avatar so wings/crowns show */
.av-wrap[class*="frame-vip"] .av-frame, .av-wrap[class*="frame-shop"] .av-frame,
.frame-2 .av-frame, .frame-3 .av-frame, .frame-4 .av-frame, .frame-5 .av-frame,
.frame-6 .av-frame, .frame-7 .av-frame, .frame-8 .av-frame, .frame-9 .av-frame,
.frame-10 .av-frame, .frame-11 .av-frame { inset: -32%; border: 0 !important; }
/* VIP tier art: frame-1 = VIP0 (plain), frame-2..frame-11 = VIP1..VIP10 */
.frame-1 .av-frame { border: 2px solid #55525f; }
.frame-2 .av-frame  { background-image: url(../img/frames/vip1.svg); }
.frame-3 .av-frame  { background-image: url(../img/frames/vip2.svg); }
.frame-4 .av-frame  { background-image: url(../img/frames/vip3.svg); }
.frame-5 .av-frame  { background-image: url(../img/frames/vip4.svg); }
.frame-6 .av-frame  { background-image: url(../img/frames/vip5.svg); }
.frame-7 .av-frame  { background-image: url(../img/frames/vip6.svg); }
.frame-8 .av-frame  { background-image: url(../img/frames/vip7.svg); }
.frame-9 .av-frame  { background-image: url(../img/frames/vip8.svg); }
.frame-10 .av-frame { background-image: url(../img/frames/vip9.svg); }
.frame-11 .av-frame { background-image: url(../img/frames/vip10.svg); }
.frame-8 .av-frame, .frame-9 .av-frame, .frame-10 .av-frame, .frame-11 .av-frame { animation: frameGlow 2.4s ease-in-out infinite; }
@keyframes frameGlow { 0%,100%{filter:drop-shadow(0 0 2px rgba(255,201,60,.4));} 50%{filter:drop-shadow(0 0 8px rgba(255,201,60,.8));} }
/* Shop art frames */
.frame-shop-neon .av-frame   { background-image: url(../img/frames/neon.svg); }
.frame-shop-ice .av-frame    { background-image: url(../img/frames/ice.svg); }
.frame-shop-rose .av-frame   { background-image: url(../img/frames/rose.svg); }
.frame-shop-flame .av-frame  { background-image: url(../img/frames/flame.svg); animation: frameGlow 1.4s infinite; }
.frame-shop-ocean .av-frame  { background-image: url(../img/frames/ocean.svg); }
.frame-shop-thunder .av-frame{ background-image: url(../img/frames/thunder.svg); }
.frame-shop-galaxy .av-frame { background-image: url(../img/frames/galaxy.svg); animation: spinFrame 14s linear infinite; }
.frame-shop-angel .av-frame  { background-image: url(../img/frames/angel.svg); animation: frameGlow 2.4s infinite; }
.frame-shop-demon .av-frame  { background-image: url(../img/frames/demon.svg); }
.frame-shop-crown .av-frame  { background-image: url(../img/frames/crown.svg); animation: frameGlow 2s infinite; }
.frame-shop-dragon .av-frame { background-image: url(../img/frames/dragon.svg); animation: frameGlow 1.8s infinite; }
.frame-shop-phoenix .av-frame{ background-image: url(../img/frames/phoenix.svg); animation: frameGlow 1.4s infinite; }
@keyframes spinFrame { to { transform: rotate(360deg); } }
.name-rainbow { background: linear-gradient(90deg,#ff5c5c,#ffc93c,#3ddc84,#4fe3ff,#7a3bff,#ff6ec7); -webkit-background-clip:text; background-clip:text; color:transparent; }

/* ---------- store packages ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.pkg-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 18px; text-align: center; }
.pkg-card .coins { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; font-weight: 800; color: var(--gold); }
.pkg-card .price { color: var(--muted); margin: 6px 0 14px; }
.coin-icon { width: 30px; height: 30px; object-fit: contain; flex: 0 0 auto; }
.coin-icon-small { width: 18px; height: 18px; }
.coin-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block;
  background: radial-gradient(circle at 35% 30%, #ffe084, var(--gold) 70%); border: 1px solid #a87d14; }
.overlay-modal { position: fixed; inset: 0; background: rgba(10,7,18,.72); display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.overlay-modal.show { display: flex; }
.cr-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 22px; }

/* ================= v4 ================= */

/* --- VIP badges 0-10: richer color, weight and glow the higher you go --- */
.vip-badge { white-space: nowrap; }
.vip-t0 { background: var(--surface-2); color: var(--muted); border-color: var(--border); }
.vip-t1 { background: #12351f; color: #57d98a; border-color: #1f5c36; }
.vip-t2 { background: #0f3538; color: #4fd8c9; border-color: #1c5c58; }
.vip-t3 { background: #102a4a; color: #5cb0ff; border-color: #1d4a80; }
.vip-t4 { background: #1c1c52; color: #8f8fff; border-color: #33339c; }
.vip-t5 { background: #2a1552; color: #b48aff; border-color: #4a2b8c; }
.vip-t6 { background: #3d1247; color: #e07aff; border-color: #6b2380; font-size: 13px; }
.vip-t7 { background: #47250e; color: #ffb45c; border-color: #80491d; font-size: 13px; }
.vip-t8 { background: linear-gradient(135deg,#4a1212,#6b2a08); color: #ff9d5c; border-color: #a04a1a; font-size: 14px; box-shadow: 0 0 8px rgba(255,140,60,.35); }
.vip-t9 { background: linear-gradient(135deg,#5a0d0d,#ff3b3b); color: #ffe8b0; border-color: #ffd24a; font-size: 14px; box-shadow: 0 0 10px rgba(255,60,60,.5); }
.vip-t10 { background: linear-gradient(120deg,#8fd8ff,#c9a8ff,#ff9de0,#ffd24a); color: #241a3a; font-weight: 900; border-color: #fff; font-size: 15px; padding: 4px 12px;
  box-shadow: 0 0 16px rgba(201,168,255,.6); animation: vipTen 2.6s linear infinite; background-size: 240% 240%; }
@keyframes vipTen { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

/* --- game tiles with artwork --- */
.game-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.game-card { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong);
  text-decoration: none; color: var(--text); background: var(--surface); transition: transform .12s, border-color .12s; aspect-ratio: 16/10; }
.game-card:hover { transform: translateY(-3px); border-color: var(--purple); }
.game-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.game-card .gc-art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.game-card .gc-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 12px 10px;
  background: linear-gradient(transparent, rgba(10,6,20,.92)); }
.game-card .gc-label strong { display: block; font-size: 15px; }
.game-card .gc-label span { font-size: 12px; color: #cfc8e6; }

/* --- bottom nav (mobile app feel) --- */
.bottom-nav { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--surface); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.bottom-nav .bn-items { display: flex; }
.bottom-nav a { flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700; padding: 4px 0; border-radius: 8px; }
.bottom-nav a svg { display: block; margin: 0 auto 2px; width: 22px; height: 22px; stroke: currentColor; }
.bottom-nav a.active { color: var(--gold); }
@media (max-width: 760px) {
  .bottom-nav { display: block; }
  body { padding-bottom: 68px; }
  .topbar .nav-links a { display: none; }
  .topbar .nav-links a.keep-mobile { display: inline-block; }
  .container { padding: 14px; }
  .rooms-hub { grid-template-columns: 1fr !important; }
}

/* --- install banner (add to home screen) --- */
.a2hs { position: fixed; left: 12px; right: 12px; bottom: 80px; z-index: 50; background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px 14px; display: none; align-items: center; gap: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.5); }
.a2hs.show { display: flex; }
.a2hs img { width: 40px; height: 40px; border-radius: 10px; }
.a2hs .txt { flex: 1; font-size: 13px; }
.a2hs .txt b { display: block; font-size: 14px; }

/* --- full-screen gift animation for 50k+ gifts --- */
.gift-fx { position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center;
  background: rgba(10,6,20,.55); pointer-events: none; }
.gift-fx.show { display: flex; }
.gift-fx .gf-img { width: 180px; height: 180px; animation: giftPop 2.6s ease forwards; filter: drop-shadow(0 0 30px rgba(255,201,60,.7)); }
.gift-fx .gf-text { position: absolute; bottom: 24%; left: 0; right: 0; text-align: center; font-weight: 900; font-size: 20px; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.8); animation: giftText 2.6s ease forwards; }
@keyframes giftPop {
  0% { transform: scale(.2) translateY(60px) rotate(-14deg); opacity: 0; }
  18% { transform: scale(1.25) translateY(0) rotate(4deg); opacity: 1; }
  30% { transform: scale(1) rotate(0); }
  80% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
@keyframes giftText { 0% { opacity: 0; transform: translateY(20px); } 20% { opacity: 1; transform: translateY(0); } 85% { opacity: 1; } 100% { opacity: 0; } }
.gift-fx .gf-spark { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: spark 1.6s ease-out forwards; }
@keyframes spark { 0% { transform: translate(0,0) scale(1); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }

/* --- leaderboard --- */
.lb-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.lb-tab { padding: 8px 16px; border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--muted); }
.lb-tab.sel { background: var(--gold); color: #241a00; border-color: var(--gold); }
.lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface);
  border: 1px solid var(--border); margin-bottom: 8px; }
.lb-row .rk { width: 34px; text-align: center; font-weight: 900; color: var(--muted); }
.lb-row.top1 .rk { color: var(--gold); font-size: 18px; }
.lb-row.top2 .rk { color: #cfd6e6; font-size: 16px; }
.lb-row.top3 .rk { color: #d89a5c; font-size: 16px; }
.lb-row .av { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-weight: 800; color: var(--gold); flex: 0 0 auto; }
.lb-row .av img { width: 100%; height: 100%; object-fit: cover; }
.lb-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.lb-row .amt { font-weight: 900; color: var(--gold); }

/* --- profile view page --- */
.pv-head { display: flex; align-items: center; gap: 18px; }
.pv-head .pv-av { width: 92px; height: 92px; border-radius: 50%; overflow: hidden; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 900; color: var(--gold); flex: 0 0 auto; }
.pv-head .pv-av img { width: 100%; height: 100%; object-fit: cover; }
.pv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.pv-stat { background: var(--surface-2); border-radius: 12px; padding: 14px; text-align: center; }
.pv-stat .v { font-weight: 900; font-size: 18px; color: var(--gold); }
.pv-stat .l { font-size: 12px; color: var(--muted); }
.equip-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.equip-row:last-child { border-bottom: none; }

/* ================= v5 ================= */

/* Navbar: near-black so the purple/gold logo pops */
:root { --nav: #0d0a14; }
.topbar { background: var(--nav); border-bottom-color: #241c33; }
.bottom-nav { background: var(--nav); }
.nav-links a { display: inline-flex; align-items: center; gap: 6px; }
.nav-links a svg { width: 17px; height: 17px; stroke: currentColor; flex: 0 0 auto; }
.nav-ico-only { padding: 7px !important; }
.nav-ico-only svg { width: 20px; height: 20px; }

/* Animated glowing names: shop glow colors + VIP 7-10 auto-glow */
.name-anim-fire { background: linear-gradient(90deg,#ff5c5c,#ffb45c,#ffd24a,#ff5c5c); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 3s linear infinite; font-weight: 800;
  filter: drop-shadow(0 0 6px rgba(255,120,60,.6)); }
.name-anim-ice { background: linear-gradient(90deg,#4fe3ff,#9fdcff,#e8f7ff,#4fe3ff); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 3s linear infinite; font-weight: 800;
  filter: drop-shadow(0 0 6px rgba(90,200,255,.6)); }
.name-anim-royal { background: linear-gradient(90deg,#b48aff,#ffd24a,#ff6ec7,#b48aff); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 3s linear infinite; font-weight: 800;
  filter: drop-shadow(0 0 6px rgba(180,140,255,.6)); }
.name-vip7 { background: linear-gradient(90deg,#ffb45c,#ffd24a,#ff8b3c,#ffb45c); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 2.8s linear infinite; font-weight: 800; }
.name-vip8 { background: linear-gradient(90deg,#ff5c5c,#ff9d5c,#ffd24a,#ff5c5c); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 2.6s linear infinite; font-weight: 800;
  filter: drop-shadow(0 0 5px rgba(255,100,80,.5)); }
.name-vip9 { background: linear-gradient(90deg,#dfe6f2,#8b93a8,#ffffff,#dfe6f2); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 2.4s linear infinite; font-weight: 900;
  filter: drop-shadow(0 0 6px rgba(210,220,240,.6)); }
.name-vip10 { background: linear-gradient(90deg,#7a3bff,#ff3c8e,#ffd24a,#4fe3ff,#7a3bff); background-size: 400% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: nameFlow 2.2s linear infinite; font-weight: 900;
  filter: drop-shadow(0 0 8px rgba(255,201,60,.65)); }
@keyframes nameFlow { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

/* Rooms feed v2: square-image cards */
.rooms-toolbar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.rooms-toolbar input, .rooms-toolbar select { margin-bottom: 0; width: auto; flex: 1; min-width: 140px; }
.rooms-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.room-card { cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; transition: transform .1s, border-color .1s; }
.room-card:hover { transform: translateY(-2px); border-color: var(--purple); }
.room-card .rc-img { position: relative; aspect-ratio: 1/1; background: var(--surface-2); display: flex;
  align-items: center; justify-content: center; font-size: 40px; font-weight: 900; color: var(--gold); overflow: hidden; }
.room-card .rc-img img { width: 100%; height: 100%; object-fit: cover; }
.room-card .rc-live { position: absolute; top: 8px; left: 8px; background: var(--red); color: #fff; font-size: 10px;
  font-weight: 900; padding: 2px 8px; border-radius: 999px; }
.room-card .rc-count { position: absolute; bottom: 8px; right: 8px; background: rgba(10,6,20,.75); color: #fff;
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.room-card .rc-lock { position: absolute; top: 8px; right: 8px; background: rgba(10,6,20,.75); border-radius: 999px;
  padding: 3px 7px; font-size: 11px; }
.room-card .rc-body { padding: 9px 10px; }
.room-card .rc-name { font-weight: 800; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-card .rc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; }

/* Seat gift score chip */
.seat .score { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; font-weight: 800; color: var(--gold);
  background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 7px; margin-top: 2px; }
.seat .score svg { width: 10px; height: 10px; }

/* In-room games drawer */
.room-games-bar { display: flex; gap: 8px; overflow-x: auto; padding: 8px 0 2px; }
.room-games-bar button { flex: 0 0 auto; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 7px 14px; font-weight: 700; font-size: 12px; }
.room-games-bar button:hover { border-color: var(--gold); color: var(--gold); }
.game-drawer { position: fixed; left: 0; right: 0; bottom: 0; top: 12vh; z-index: 80; background: var(--bg);
  border-top: 2px solid var(--purple); border-radius: 18px 18px 0 0; display: none; flex-direction: column; }
.game-drawer.open { display: flex; }
.game-drawer .gd-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; }
.game-drawer iframe { flex: 1; border: 0; width: 100%; border-radius: 0 0 0 0; }

/* Switch-rooms panel */
.switch-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 300px; max-width: 85vw; z-index: 75;
  background: var(--surface); border-left: 1px solid var(--border-strong); transform: translateX(100%);
  transition: transform .18s ease; overflow-y: auto; padding: 14px; }
.switch-panel.open { transform: none; }
.sw-room { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.sw-room:hover { background: var(--surface-2); }
.sw-room .si { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-weight: 900; color: var(--gold); flex: 0 0 auto; }
.sw-room .si img { width: 100%; height: 100%; object-fit: cover; }

/* ---- VIP page ---- */
.vip-hero { border-radius: 16px; padding: 22px; margin-bottom: 16px; border: 1px solid var(--border-strong);
  display: flex; align-items: center; gap: 18px; }
.vip-hero .vh-badge { font-size: 34px; font-weight: 900; }
.vip-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 14px; padding-bottom: 4px; }
.vip-tabs .vt { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--muted); }
.vip-tabs .vt.sel { color: #fff; }
.perk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.perk { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px; text-align: center; position: relative; }
.perk.locked { opacity: .45; }
.perk .pk-lvl { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 800; background: var(--surface-2);
  border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 7px; color: var(--muted); }
.perk .pk-ico { width: 40px; height: 40px; margin: 8px auto 6px; display: flex; align-items: center; justify-content: center; }
.perk .pk-ico svg { width: 30px; height: 30px; }
.perk .pk-name { font-size: 12px; font-weight: 700; }
.embedded .topbar, .embedded .bottom-nav, .embedded .a2hs { display: none !important; }

/* ================= v6: profile banners + room polish ================= */
.pv-banner { height: 110px; border-radius: 16px 16px 0 0; margin: -22px -22px 0; position: relative; overflow: hidden; }
.pv-banner.b-none { display: none; }
.pv-banner.b-aurora  { background: linear-gradient(120deg,#0b3d2e,#1e9e6a,#57d9c0,#1e9e6a,#0b3d2e); background-size:300% 100%; animation: nameFlow 8s linear infinite; }
.pv-banner.b-sunset  { background: linear-gradient(120deg,#3a1c5c,#ff6ec7,#ffb45c,#ff6ec7,#3a1c5c); background-size:300% 100%; animation: nameFlow 8s linear infinite; }
.pv-banner.b-nebula  { background: radial-gradient(120% 140% at 20% 10%,#7a3bff,#241c38 60%), radial-gradient(100% 120% at 80% 30%,#ff6ec7,transparent 60%); }
.pv-banner.b-inferno { background: linear-gradient(120deg,#5a0e0e,#ff5c2c,#ffd24a,#ff5c2c,#5a0e0e); background-size:300% 100%; animation: nameFlow 6s linear infinite; }
.pv-banner.b-royal   { background: linear-gradient(120deg,#2a1552,#b48aff,#ffd24a,#b48aff,#2a1552); background-size:300% 100%; animation: nameFlow 7s linear infinite; }
.pv-banner.b-diamond { background: linear-gradient(120deg,#8fd8ff,#c9a8ff,#ff9de0,#ffd24a,#8fd8ff); background-size:300% 100%; animation: nameFlow 5s linear infinite; }
.pv-banner::after { content:''; position:absolute; inset:0; background: radial-gradient(120% 100% at 50% 120%, transparent, rgba(20,14,32,.5)); }
.pv-banner-stars { position:absolute; inset:0; background-image: radial-gradient(2px 2px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 20%, #fff, transparent), radial-gradient(2px 2px at 45% 60%, #fff, transparent), radial-gradient(1.5px 1.5px at 85% 55%, #fff, transparent); opacity:.7; }
.card.has-banner { padding-top: 96px; overflow: hidden; }
.banner-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px,1fr)); gap: 8px; margin-top: 10px; }
.banner-opt { height: 46px; border-radius: 10px; cursor: pointer; border: 2px solid transparent; position: relative; display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;color:#fff;text-shadow:0 1px 4px rgba(0,0,0,.7); }
.banner-opt.sel { border-color: #fff; }
.banner-opt.locked { opacity: .5; }
