/* =========================================================================
   ĐI BIỂN ONLINE — Màn hình live 9:16 (1080 x 1920)
   ========================================================================= */
:root {
  --navy: rgba(9, 24, 46, 0.86);
  --navy-solid: #0b1c33;
  --gold: #ffd54a;
  --orange: #ff8a1f;
  --red: #ff3b3b;
  --aqua: #39d0ff;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --title-font: 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif;
  --body-font: 'Be Vietnam Pro', 'Segoe UI', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #061226;
  font-family: var(--body-font);
  color: var(--text);
}

.stage-viewport {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1080px;
  height: 1920px;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(0.4);
  overflow: hidden;
  background: #3c9df0;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
}

body.obs-mode,
body.preview-mode {
  background: transparent;
}

body.obs-mode .floating-bar,
body.preview-mode .floating-bar {
  display: none;
}

body.obs-mode .stage,
body.preview-mode .stage {
  box-shadow: none;
}

#beach3d,
#beachCanvas {
  position: absolute;
  inset: 0;
  width: 1080px;
  height: 1920px;
  display: block;
}

/* ---------------------------------------------------------------- TOP BAR */
.top-bar {
  position: absolute;
  top: 18px;
  left: 18px;
  right: 18px;
  height: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  z-index: 5;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 22px;
  border-radius: 26px;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, 0.18);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.5px;
  max-width: 560px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #9aa4ad;
  flex: none;
}

.live-pill.on .live-dot {
  background: #ff2d55;
  box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.7);
  animation: livePulse 1.4s infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0.7); }
  70% { box-shadow: 0 0 0 12px rgba(255, 45, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 45, 85, 0); }
}

.stat-pills {
  display: flex;
  gap: 10px;
}

.stat-pill {
  height: 52px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  border-radius: 26px;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, 0.18);
  font-size: 21px;
  font-weight: 700;
}

.stat-pill b {
  color: var(--gold);
  font-weight: 900;
}

/* ---------------------------------------------------------------- TICKER */
.ticker {
  position: absolute;
  top: 84px;
  left: 18px;
  right: 18px;
  height: 42px;
  border-radius: 21px;
  overflow: hidden;
  background: linear-gradient(90deg, #ff8a1f, #ff4f8b);
  border: 2px solid rgba(255, 255, 255, 0.4);
  z-index: 5;
}

.ticker.demo {
  background: linear-gradient(90deg, #6d28d9, #a855f7);
}

.ticker-track {
  display: inline-flex;
  white-space: nowrap;
  height: 100%;
  align-items: center;
  font-weight: 800;
  font-size: 21px;
  animation: tickerMove 60s linear infinite;
  will-change: transform;
}

.ticker-track span {
  padding-right: 60px;
}

@keyframes tickerMove {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------------------------------------------------------------- PANELS */
.panel {
  position: absolute;
  top: 138px;
  z-index: 4;
  border-radius: 22px;
  background: var(--navy);
  border: 2px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  padding: 14px 16px 16px;
  transition: opacity 0.6s ease;
}

.stage.tsunami-active .panel,
.stage.tsunami-active .pending-stack {
  opacity: 0.12;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.panel-title {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 30px;
  line-height: 1;
  letter-spacing: 0.4px;
  color: #7fe7ff;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
}

.panel-head.gold .panel-title {
  color: var(--gold);
}

.panel-head.red .panel-title {
  color: #ff7b7b;
}

.panel-head.small .panel-title {
  font-size: 24px;
}

.live-tag {
  background: var(--red);
  color: #fff;
  font-weight: 900;
  font-size: 16px;
  padding: 3px 10px;
  border-radius: 8px;
}

.swim-menu {
  left: 18px;
  width: 566px;
}

.menu-sub {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}

.menu-sub b {
  color: #ffffff;
}

.menu-table {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.menu-row {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 74px;
  align-items: center;
  gap: 6px;
  height: 33px;
  padding: 0 10px;
  font-size: 16.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
}

.menu-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.08);
}

.menu-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-head {
  height: 32px;
  font-size: 15px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25) !important;
}

.menu-head em {
  font-style: normal;
  color: #7fe7ff;
}

.lv-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 26px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 16px;
  color: #10202f;
}

.coin-cell {
  text-align: right;
  color: var(--gold);
  font-weight: 900;
}

.menu-row.top-tier span:nth-child(2),
.menu-row.top-tier span:nth-child(3) {
  background: linear-gradient(90deg, #7fe7ff, #ffb3f0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menu-action {
  margin-top: 7px;
  border-radius: 14px;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  font-weight: 900;
  font-size: 19px;
  white-space: nowrap;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.menu-action small {
  font-size: 15px;
  font-weight: 700;
  opacity: 0.92;
  margin-left: 6px;
}

.menu-action.danger {
  background: linear-gradient(90deg, #e11d48, #ff4d4d);
  animation: dangerGlow 2s ease-in-out infinite;
}

.menu-action.safe {
  background: linear-gradient(90deg, #ea580c, #f59e0b);
}

@keyframes dangerGlow {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 60, 60, 0); }
  50% { box-shadow: 0 0 22px rgba(255, 60, 60, 0.75); }
}

/* Bảng vàng */
.leader {
  right: 18px;
  width: 460px;
}

.lb-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.lb-list li {
  display: grid;
  grid-template-columns: 30px 34px 1fr auto;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 17px;
  font-weight: 700;
}

.lb-list li.empty {
  grid-template-columns: 1fr;
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
  justify-items: center;
}

.lb-rank {
  font-weight: 900;
  color: #10202f;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 15px;
}

.lb-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, #39d0ff, #ff8fab);
  display: grid;
  place-items: center;
  font-size: 17px;
}

.lb-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-name small {
  margin-left: 6px;
  font-size: 13px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 6px;
  color: #10202f;
}

.lb-score {
  color: var(--gold);
  font-weight: 900;
}

.lb-list.wreck li {
  height: 34px;
  background: rgba(255, 70, 70, 0.14);
}

.lb-list.wreck .lb-score {
  color: #ff9b9b;
}

/* ---------------------------------------------------------------- PENDING */
.pending-stack {
  position: absolute;
  top: 612px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 6;
  transition: opacity 0.4s ease;
}

.pending-item {
  border-radius: 18px;
  padding: 10px 18px 12px;
  background: rgba(150, 10, 30, 0.9);
  border: 3px solid #ffb3b3;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.4);
  animation: pendingIn 0.35s ease-out, pendingShake 1.6s ease-in-out 0.4s infinite;
}

.pending-item.buoy {
  background: rgba(170, 70, 0, 0.92);
  border-color: #ffd08a;
  animation: pendingIn 0.35s ease-out;
}

.pending-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 23px;
}

.pending-line .who {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-line .secs {
  font-family: var(--title-font);
  font-size: 30px;
  color: #ffe14d;
  flex: none;
}

.pending-sub {
  font-size: 17px;
  font-weight: 700;
  opacity: 0.92;
  margin: 2px 0 7px;
}

.pending-bar {
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.2);
  overflow: hidden;
}

.pending-bar i {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background: linear-gradient(90deg, #ffe14d, #ff8a1f);
  transition: width 0.3s ease;
}

@keyframes pendingIn {
  from { transform: translateY(-16px) scale(0.96); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes pendingShake {
  0%, 100% { transform: rotate(0deg); }
  10% { transform: rotate(-1deg); }
  20% { transform: rotate(1deg); }
  30% { transform: rotate(0deg); }
}

/* ---------------------------------------------------------------- BANNER */
.big-banner {
  position: absolute;
  top: 612px;
  left: 50%;
  width: 940px;
  transform: translate(-50%, -20px) scale(0.92);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  text-align: center;
  padding: 22px 26px 24px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 196, 0, 0.96), rgba(255, 94, 140, 0.96));
  border: 4px solid #fff7d1;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.big-banner.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
}

.big-banner.danger {
  background: linear-gradient(135deg, rgba(200, 0, 30, 0.96), rgba(20, 90, 200, 0.96));
  border-color: #ffd1d1;
}

.big-banner.level {
  background: linear-gradient(135deg, rgba(20, 180, 220, 0.96), rgba(170, 90, 255, 0.96));
}

.bb-title {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 58px;
  line-height: 1.05;
  text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3);
}

.bb-sub {
  margin-top: 8px;
  font-size: 27px;
  font-weight: 800;
}

/* ---------------------------------------------------------------- HOST */
.host-bubble {
  position: absolute;
  right: 26px;
  top: 900px;
  max-width: 600px;
  z-index: 7;
  padding: 12px 18px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  color: #0b2440;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.host-bubble::after {
  content: '';
  position: absolute;
  right: 70px;
  bottom: -14px;
  border-width: 14px 12px 0;
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.96) transparent transparent;
}

.host-bubble.show {
  opacity: 1;
  transform: none;
}

.host-name {
  font-weight: 900;
  font-size: 17px;
  color: #e53935;
  margin-bottom: 2px;
}

.host-text {
  font-weight: 700;
  font-size: 22px;
  line-height: 1.35;
}

/* ---------------------------------------------------------------- CATCH */
.catch-card {
  position: absolute;
  left: 50%;
  top: 860px;
  width: 520px;
  transform: translate(-50%, 30px) rotateX(70deg);
  opacity: 0;
  z-index: 8;
  pointer-events: none;
  text-align: center;
  padding: 18px 24px 22px;
  border-radius: 26px;
  background: linear-gradient(180deg, #fff8e6, #ffe9b8);
  color: #3d2a12;
  border: 5px solid var(--rarity, #7fd3ff);
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.15), 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 50px var(--rarity, #7fd3ff);
  transition: transform 0.45s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.3s ease;
}

.catch-card.show {
  opacity: 1;
  transform: translate(-50%, 0) rotateX(0deg);
}

.catch-rarity {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 12px;
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 1px;
  background: var(--rarity, #7fd3ff);
  color: #1b1b1f;
}

.catch-emoji {
  font-size: 110px;
  line-height: 1.15;
}

.catch-name {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 40px;
  line-height: 1.1;
}

.catch-who {
  font-size: 20px;
  font-weight: 700;
  margin-top: 6px;
}

.catch-bonus {
  margin-top: 6px;
  font-size: 24px;
  font-weight: 900;
  color: #b45309;
}

/* ---------------------------------------------------------------- DEMO & ALARM */
.demo-badge {
  position: absolute;
  left: 50%;
  top: 1394px;
  transform: translateX(-50%);
  z-index: 6;
  display: none;
  padding: 6px 18px;
  border-radius: 14px;
  background: rgba(109, 40, 217, 0.92);
  border: 2px solid #e9d5ff;
  font-weight: 900;
  font-size: 18px;
  white-space: nowrap;
}

.demo-badge.show {
  display: block;
}

.alarm-flash {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(ellipse at center, rgba(255, 0, 0, 0) 40%, rgba(255, 0, 0, 0.55) 100%);
}

.alarm-flash.on {
  animation: alarm 0.6s ease-in-out 5;
}

@keyframes alarm {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

/* ---------------------------------------------------------------- FLOATING BAR (không hiện trong OBS) */
.floating-bar {
  position: fixed;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(6, 18, 38, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  z-index: 20;
  font-size: 14px;
  max-width: calc(100vw - 32px);
  flex-wrap: wrap;
  justify-content: center;
}

.floating-bar button,
.floating-bar a {
  border: 0;
  border-radius: 10px;
  padding: 8px 14px;
  font: 700 14px var(--body-font);
  color: #fff;
  background: linear-gradient(90deg, #ff8a1f, #ff4f8b);
  cursor: pointer;
  text-decoration: none;
}

.floating-bar a {
  background: #1f3b63;
}

.floating-bar button.ok {
  background: #15803d;
}

.floating-bar button.muted-bg {
  background: #475569;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.floating-bar .hint {
  color: var(--muted);
}

.floating-bar code {
  color: #7fe7ff;
}

/* =========================================================================
   PHONG CÁCH "3D TOY CHIBI" — giao diện kẹo bóng như đồ chơi vinyl
   (ghi đè các khối phía trên, giữ nguyên tên class nên logic hiển thị không đổi)
   ========================================================================= */
:root {
  --candy-blue-1: rgba(72, 168, 255, 0.92);
  --candy-blue-2: rgba(29, 88, 216, 0.94);
  --candy-ink: #0b2559;
  --candy-pink-1: rgba(244, 132, 208, 0.92);
  --candy-pink-2: rgba(124, 58, 237, 0.94);
  --candy-red-1: #ff758f;
  --candy-red-2: #e11d48;
  --candy-orange-1: #ffd460;
  --candy-orange-2: #f97316;
  --gloss: inset 0 4px 0 rgba(255, 255, 255, 0.55), inset 0 -6px 0 rgba(10, 35, 110, 0.26);
  --drop: 0 14px 30px -8px rgba(8, 30, 95, 0.52);
}

.live-pill,
.stat-pill {
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, #4b96ff 0%, #1d4ed8 100%);
  box-shadow: var(--gloss), var(--drop);
  font-family: var(--title-font);
  font-size: 23px;
  text-shadow: 0 2px 0 rgba(10, 40, 120, 0.45);
}

.live-pill.on {
  background: linear-gradient(180deg, var(--candy-red-1) 0%, var(--candy-red-2) 100%);
}

.live-pill.on .live-dot {
  background: #ffffff;
}

.stat-pill b {
  color: #ffe57f;
}

.ticker {
  border: 3px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(90deg, #ff9f2e 0%, #ff4f8b 55%, #ff8533 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.48), var(--drop);
}

.ticker.demo {
  background: linear-gradient(90deg, #a855f7 0%, #6366f1 100%);
}

.ticker-track {
  font-family: var(--title-font);
  font-size: 22px;
  text-shadow: 0 2px 0 rgba(120, 20, 60, 0.35);
}

.panel {
  border-radius: 30px;
  border: 3.5px solid rgba(255, 255, 255, 0.95);
  background: linear-gradient(180deg, var(--candy-blue-1) 0%, var(--candy-blue-2) 100%);
  backdrop-filter: blur(8px);
  box-shadow: var(--gloss), var(--drop);
  padding: 15px 17px 17px;
}

.leader {
  background: linear-gradient(180deg, var(--candy-pink-1) 0%, var(--candy-pink-2) 100%);
}

.panel-title {
  color: #ffffff;
  font-size: 32px;
  text-shadow: 0 3px 0 rgba(10, 40, 120, 0.45);
}

.panel-head.gold .panel-title {
  color: #fff5b8;
  text-shadow: 0 3px 0 rgba(90, 20, 120, 0.5);
}

.panel-head.red .panel-title {
  color: #ffffff;
  text-shadow: 0 3px 0 rgba(140, 10, 60, 0.5);
}

.leader .panel-head.gold .panel-title {
  font-size: 28px;
  white-space: nowrap;
}

.live-tag {
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 3px 12px;
  background: linear-gradient(180deg, var(--candy-red-1), var(--candy-red-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.menu-sub {
  color: rgba(255, 255, 255, 0.96);
  font-family: var(--title-font);
  font-size: 17px;
  margin-bottom: 8px;
}

.menu-table {
  border: 2px solid rgba(255, 255, 255, 0.32);
  border-radius: 20px;
  background: rgba(8, 32, 96, 0.34);
  padding: 6px;
  display: grid;
  gap: 5px;
}

.menu-row,
.menu-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  font-family: var(--title-font);
  font-size: 20px;
  height: 46px;
  padding: 0 10px;
  text-shadow: 0 2px 0 rgba(10, 40, 120, 0.35);
}

.menu-row.visual-row {
  grid-template-columns: 44px 1fr 1fr 94px;
  gap: 8px;
  height: 46px;
}

.menu-row span.outfit-cell,
.tier-row-card .outfit-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.outfit-showcase {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  max-width: 158px;
  height: 38px;
  padding: 0 10px;
  border-radius: 11px;
  background: rgba(9, 28, 82, 0.38);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22);
}

.outfit-showcase.female {
  background: rgba(88, 20, 95, 0.34);
}

.menu-row.top-tier .outfit-showcase {
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.32), rgba(236, 72, 153, 0.32));
  border-color: rgba(255, 240, 138, 0.85);
}

.outfit-svg {
  width: 58px;
  height: 36px;
  display: block;
  flex-shrink: 0;
  filter: drop-shadow(0 3px 4px rgba(6, 20, 60, 0.55));
  transition: transform 0.15s ease;
}

.menu-row:hover .outfit-svg,
.tier-row-card:hover .outfit-svg,
.lv-select-btn:hover .outfit-svg {
  transform: scale(1.14);
}

.outfit-mini-badge {
  font-size: 19px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
}

.menu-row:nth-child(even) {
  background: rgba(255, 255, 255, 0.25);
}

#menuRows {
  display: grid;
  gap: 5px;
}

.menu-head {
  grid-template-columns: 44px 1fr 1fr 94px;
  height: 36px !important;
  background: rgba(8, 28, 86, 0.52) !important;
  border: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
}

.menu-head span:nth-child(2),
.menu-head span:nth-child(3) {
  text-align: center;
}

.menu-head span:nth-child(4) {
  text-align: right;
}

.menu-head em {
  color: #ffe57f;
  font-size: 16px;
}

.lv-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  font-size: 18px;
  color: var(--candy-ink);
  text-shadow: none;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0) 46%), var(--lv, #ffffff);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18), 0 2px 4px rgba(10, 40, 120, 0.35);
}

.coin-cell {
  color: #ffe57f;
  font-size: 19px;
  background: rgba(8, 24, 68, 0.42);
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 229, 127, 0.45);
  text-align: center;
}

.menu-row.top-tier {
  background: linear-gradient(90deg, rgba(255, 226, 122, 0.35), rgba(255, 154, 213, 0.35));
  border-color: rgba(255, 243, 176, 0.75);
}

.menu-row.top-tier span:nth-child(2),
.menu-row.top-tier span:nth-child(3) {
  color: #fff6b8;
  text-shadow: 0 2px 0 rgba(90, 20, 90, 0.5);
}

.menu-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.menu-action {
  margin-top: 0;
  height: 50px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-family: var(--title-font);
  font-size: 20px;
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.48), inset 0 -5px 0 rgba(0, 0, 0, 0.18), 0 8px 16px -8px rgba(0, 0, 0, 0.45);
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25);
}

.menu-action .act-big-ico {
  font-size: 30px;
  line-height: 1;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.menu-action .act-cmd code {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 20px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.26);
  padding: 2px 11px;
  border-radius: 999px;
}

.menu-action .act-coin {
  font-size: 20px;
  font-weight: 900;
  color: #fff6b0;
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 9px;
  border-radius: 999px;
}

.menu-action.danger {
  background: linear-gradient(180deg, var(--candy-red-1) 0%, var(--candy-red-2) 100%);
}

.menu-action.safe {
  background: linear-gradient(180deg, var(--candy-orange-1) 0%, var(--candy-orange-2) 100%);
}

.floating-bar {
  border-radius: 999px;
  border: 2.5px solid rgba(255, 255, 255, 0.5);
  background: rgba(8, 22, 52, 0.9);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.55);
  padding: 7px 14px;
}

.floating-bar button,
.floating-bar a {
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.75);
  padding: 7px 15px;
  font-family: var(--title-font);
  font-size: 15px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.4);
}

.lb-list {
  gap: 7px;
  margin: 0 0 12px;
}

.lb-list li {
  height: 46px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.22);
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  font-family: var(--title-font);
  font-size: 21px;
  text-shadow: 0 2px 0 rgba(70, 20, 110, 0.35);
}

.lb-list li.slot-wait {
  background: rgba(15, 23, 62, 0.26);
  border: 1.5px dashed rgba(255, 255, 255, 0.35);
}

.lb-list li .slot-cmd {
  font-family: var(--title-font);
  font-weight: 800;
  font-size: 19px;
  color: #ffe57f;
  background: rgba(0, 0, 0, 0.22);
  padding: 2px 10px;
  border-radius: 999px;
}

.lb-list li.empty {
  font-family: var(--body-font);
  font-size: 16px;
  text-shadow: none;
  color: rgba(255, 255, 255, 0.95);
}

.lb-rank {
  width: 32px;
  height: 32px;
  font-size: 17px;
  border: 2px solid #ffffff;
  background-image: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.95) 0, rgba(255, 255, 255, 0) 46%);
  text-shadow: none;
}

.lb-avatar {
  width: 34px;
  height: 34px;
  font-size: 20px;
  border: 2px solid #ffffff;
}

.lb-name small {
  border-radius: 999px;
  border: 1.5px solid #ffffff;
  text-shadow: none;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.9) 0, rgba(255, 255, 255, 0) 50%), var(--lv, #ffffff);
}

.lb-score {
  color: #fff3b0;
  font-size: 20px;
}

.lb-list.wreck {
  margin-bottom: 0;
}

.lb-list.wreck li {
  height: 44px;
  background: rgba(225, 29, 72, 0.36);
}

.lb-list.wreck .lb-score {
  color: #ffffff;
}

.pending-item {
  border-radius: 26px;
  border: 4px solid #ffffff;
  background: linear-gradient(180deg, var(--candy-red-1) 0%, var(--candy-red-2) 100%);
  box-shadow: var(--gloss), 0 16px 30px -10px rgba(120, 0, 30, 0.6);
}

.pending-item.buoy {
  border-color: #ffffff;
  background: linear-gradient(180deg, var(--candy-orange-1) 0%, var(--candy-orange-2) 100%);
}

.pending-line {
  font-family: var(--title-font);
  font-size: 27px;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}

.pending-line .secs {
  color: #ffffff;
  min-width: 70px;
  text-align: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  padding: 0 10px;
}

.pending-bar {
  height: 16px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.pending-bar i {
  background: linear-gradient(180deg, #fff6b0 0%, #ffd23f 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7);
}

.big-banner {
  border-radius: 40px;
  border: 6px solid #ffffff;
  background: linear-gradient(180deg, #ffd25a 0%, #ff6fb1 100%);
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.5), inset 0 -10px 0 rgba(140, 20, 80, 0.25), 0 24px 50px -10px rgba(120, 20, 80, 0.55);
}

.big-banner.danger {
  background: linear-gradient(180deg, #ff6b6b 0%, #2563eb 100%);
}

.big-banner.level {
  background: linear-gradient(180deg, #7fe0ff 0%, #8b5cf6 100%);
}

.bb-title {
  font-size: 64px;
  text-shadow: 0 5px 0 rgba(90, 20, 60, 0.35);
}

.bb-sub {
  font-family: var(--title-font);
  font-size: 30px;
  text-shadow: 0 2px 0 rgba(90, 20, 60, 0.3);
}

.host-bubble {
  border-radius: 28px;
  border: 4px solid #3b82f6;
  box-shadow: 0 0 0 5px #ffffff, 0 16px 30px -10px rgba(10, 40, 120, 0.5);
}

.host-bubble::after {
  border-color: #3b82f6 transparent transparent;
  bottom: -18px;
}

.host-name {
  font-family: var(--title-font);
  font-size: 21px;
}

.catch-card {
  border-radius: 34px;
  border-width: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #e8f4ff 100%);
  box-shadow: inset 0 6px 0 rgba(255, 255, 255, 0.9), 0 0 0 6px #ffffff, 0 24px 50px rgba(10, 40, 120, 0.45), 0 0 60px var(--rarity, #7fd3ff);
}

.catch-rarity {
  border-radius: 999px;
  border: 3px solid #ffffff;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.6);
  font-family: var(--title-font);
}

.catch-bonus {
  font-family: var(--title-font);
  color: #2563eb;
}

.demo-badge {
  border-radius: 999px;
  border: 3px solid #ffffff;
  background: linear-gradient(180deg, #b48cff 0%, #6d28d9 100%);
  box-shadow: var(--gloss);
  font-family: var(--title-font);
  font-size: 20px;
}

/* =========================================================================
   BOSS BẠCH TUỘC KHỔNG LỒ — thanh máu thay chỗ dòng chữ chạy khi boss xuất hiện
   ========================================================================= */
.ticker {
  transition: opacity 0.3s ease;
}

.stage.boss-on .ticker {
  opacity: 0;
}

.boss-bar {
  position: absolute;
  top: 78px;
  left: 18px;
  right: 18px;
  height: 54px;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-radius: 999px;
  border: 3px solid #ffffff;
  background: linear-gradient(180deg, #c084fc 0%, #6d28d9 100%);
  box-shadow: inset 0 4px 0 rgba(255, 255, 255, 0.45), inset 0 -6px 0 rgba(40, 0, 80, 0.3), 0 14px 28px -10px rgba(60, 10, 120, 0.6);
  color: #ffffff;
  font-family: var(--title-font);
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.stage.boss-on .boss-bar {
  opacity: 1;
  transform: none;
}

.boss-name {
  flex: none;
  font-size: 22px;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 2px 0 rgba(40, 0, 80, 0.45);
}

.boss-hp {
  position: relative;
  flex: 1;
  height: 30px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(30, 0, 60, 0.45);
  overflow: hidden;
}

.boss-hp i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff9ad5 0%, #ff3b8d 55%, #d6145f 100%);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease-out;
}

.boss-bar.low .boss-hp i {
  background: linear-gradient(180deg, #ffe08a 0%, #ff9f1c 55%, #e85d04 100%);
}

.boss-hp b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 2px 0 rgba(40, 0, 80, 0.6);
}

.boss-time {
  flex: none;
  min-width: 92px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(30, 0, 60, 0.35);
  font-size: 22px;
  font-weight: 800;
  text-align: center;
}

.boss-bar.hurry .boss-time {
  background: #ff3b6b;
  animation: boss-hurry 0.8s ease-in-out infinite;
}

@keyframes boss-hurry {
  50% {
    transform: scale(1.08);
  }
}

.big-banner.boss {
  background: linear-gradient(180deg, #c084fc 0%, #ff5fa2 100%);
}

.lb-list.boss li {
  background: rgba(109, 40, 217, 0.35);
}

.lb-list.boss .lb-score {
  color: #ffffff;
}

/* =========================================================================
   WIDGET LOA & THANH ÂM LƯỢNG GHIM GÓC MÀN HÌNH (FLOATING SPEAKER DOCK)
   ========================================================================= */
.bg-audio-dock {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 95;
  display: inline-flex;
  align-items: center;
  height: 52px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(11, 18, 32, 0.92);
  border: 1.5px solid rgba(110, 231, 255, 0.25);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

body.obs-mode .bg-audio-dock,
body.preview-mode .bg-audio-dock {
  display: none !important;
}

.bg-audio-dock:hover,
.bg-audio-dock:focus-within {
  border-color: rgba(56, 217, 245, 0.65);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 16px rgba(56, 217, 245, 0.22);
}

.bg-audio-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #29d8ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, color 0.2s ease;
}

.bg-audio-btn:hover {
  transform: scale(1.1);
  color: #67e8f9;
}

.bg-audio-dock.is-muted .bg-audio-btn {
  color: #94a3b8;
}

.bg-audio-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: block;
}

.bg-audio-dock .ico-vol-off {
  display: none;
}

.bg-audio-dock.is-muted .ico-vol-on {
  display: none;
}

.bg-audio-dock.is-muted .ico-vol-off {
  display: block;
}

.bg-audio-slider-wrap {
  width: 0;
  opacity: 0;
  margin-left: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, margin-left 0.28s ease;
}

.bg-audio-dock:hover .bg-audio-slider-wrap,
.bg-audio-dock:focus-within .bg-audio-slider-wrap,
.bg-audio-dock.expanded .bg-audio-slider-wrap {
  width: 118px;
  opacity: 1;
  margin-left: 12px;
}

.bg-audio-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 112px;
  height: 6px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  --vol-pct: 55%;
  background: linear-gradient(
    90deg,
    #a78bfa 0%,
    #38bdf8 var(--vol-pct),
    rgba(255, 255, 255, 0.18) var(--vol-pct),
    rgba(255, 255, 255, 0.18) 100%
  );
}

.bg-audio-dock.is-muted .bg-audio-slider {
  background: rgba(255, 255, 255, 0.18);
}

.bg-audio-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.bg-audio-slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}

.bg-audio-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

@media (max-width: 720px) {
  .bg-audio-dock {
    left: 12px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    height: 44px;
    padding: 0 11px;
  }
  .bg-audio-dock:hover .bg-audio-slider-wrap,
  .bg-audio-dock:focus-within .bg-audio-slider-wrap,
  .bg-audio-dock.expanded .bg-audio-slider-wrap {
    width: 96px;
    margin-left: 10px;
  }
  .bg-audio-slider {
    width: 90px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .boss-bar.hurry .boss-time {
    animation: none;
  }
}

/* banner của boss nằm cao hơn để không che con bạch tuộc giữa biển */
.big-banner.top {
  top: 300px;
}
