:root {
  --bg-dark: #07070c;
  --glass-bg: rgba(16, 14, 28, 0.72);
  --glass-border: rgba(255, 255, 255, 0.14);
  --neon-pink: #ff2a85;
  --neon-cyan: #22d3ee;
  --neon-gold: #facc15;
  --neon-purple: #a855f7;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#canvas-container {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

#canvas-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* 3D Floating Labels & Speech Bubbles Layer */
#labels-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  overflow: hidden;
}

.char-label {
  position: absolute;
  transform: translate(-50%, -100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: auto;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.char-speech-bubble {
  max-width: 240px;
  background: rgba(10, 10, 18, 0.86);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 12px;
  line-height: 1.35;
  padding: 6px 11px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
  text-align: left;
  animation: popIn 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.char-speech-bubble.hostess-bubble {
  border-color: rgba(255, 42, 133, 0.65);
  background: linear-gradient(135deg, rgba(40, 10, 30, 0.9), rgba(18, 10, 28, 0.9));
}

.char-name-pill {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.char-name-pill.is-hostess {
  background: rgba(131, 24, 67, 0.85);
  border-color: #ff2a85;
  color: #ffe4e6;
}

.char-name-pill.is-me {
  background: rgba(6, 95, 70, 0.88);
  border-color: #34d399;
  color: #ecfdf5;
}

/* BÁ CHỦ Golden Dragon Plaque (Matching Image 3 & 4) */
.ba-chu-plaque {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.ba-chu-dragon-banner {
  background: linear-gradient(90deg, #991b1b, #dc2626, #b45309, #dc2626, #991b1b);
  border: 2px solid #facc15;
  box-shadow: 0 0 18px rgba(250, 204, 21, 0.85), inset 0 0 8px rgba(255, 255, 255, 0.4);
  color: #fef08a;
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 4px 16px;
  border-radius: 999px;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9);
  animation: pulseGold 1.4s infinite alternate;
}

.ba-chu-user-pill {
  background: rgba(20, 30, 25, 0.92);
  border: 1.5px solid #4ade80;
  color: #fde047;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 12px;
  border-radius: 8px;
}

@keyframes pulseGold {
  0% { transform: scale(1); box-shadow: 0 0 12px rgba(250, 204, 21, 0.7); }
  100% { transform: scale(1.06); box-shadow: 0 0 24px rgba(250, 204, 21, 1); }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(6px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Top Navigation Bar (Matching Image 1 & 2) */
#top-bar {
  position: fixed;
  top: 12px;
  left: 14px;
  right: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
  flex-wrap: wrap;
}

.top-bar-group {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
  flex-wrap: wrap;
}

.glass-pill {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  color: var(--text-main);
  padding: 7px 13px;
  border-radius: 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.glass-pill:hover {
  background: rgba(35, 30, 62, 0.88);
  border-color: rgba(255, 255, 255, 0.32);
  transform: translateY(-1px);
}

.glass-pill.active-scene {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.35), rgba(139, 92, 246, 0.35));
  border-color: var(--neon-pink);
  color: #fff;
  box-shadow: 0 0 15px rgba(255, 42, 133, 0.4);
}

.glass-pill.wallet-pill {
  border-color: rgba(250, 204, 21, 0.45);
  color: #fef08a;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

/* Top Center Stage Shoutout Banner Alert (Matching Image 5) */
#top-shoutout-banner {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  background: linear-gradient(90deg, rgba(88, 28, 135, 0.92), rgba(157, 23, 77, 0.92));
  border: 1px solid rgba(244, 114, 182, 0.55);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13px;
  color: #fdf2f8;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 28px rgba(236, 72, 153, 0.45);
  backdrop-filter: blur(10px);
}

#top-shoutout-banner.hidden {
  display: none;
}

.shoutout-highlight {
  color: #fde047;
  font-weight: 800;
}

/* Right Side Vertical Action Column (Matching Image 1) */
#right-action-bar {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}

.action-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #fff;
  font-size: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.action-circle-btn:hover, .action-circle-btn.active {
  background: linear-gradient(135deg, rgba(255, 42, 133, 0.45), rgba(56, 189, 248, 0.35));
  border-color: var(--neon-pink);
  transform: scale(1.08);
}

.action-circle-btn .btn-tooltip {
  position: absolute;
  right: 54px;
  background: rgba(10, 10, 20, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(5px);
  transition: all 0.15s ease;
}

.action-circle-btn:hover .btn-tooltip {
  opacity: 1;
  transform: translateX(0);
}

/* Bottom Left Chat & Emoji Reaction Overlay (Matching Image 1) */
#bottom-left-hud {
  position: fixed;
  left: 14px;
  bottom: 14px;
  width: min(390px, calc(100vw - 82px));
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

#chat-feed {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 155px;
  overflow-y: auto;
  pointer-events: auto;
  padding-right: 4px;
}

#chat-feed::-webkit-scrollbar {
  width: 3px;
}
#chat-feed::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.chat-bubble-row {
  background: rgba(12, 12, 22, 0.72);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 12.5px;
  line-height: 1.4;
  color: #f1f5f9;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.chat-bubble-row .chat-author {
  font-weight: 700;
  color: #fbbf24;
  margin-right: 6px;
}

.chat-bubble-row .chat-author.is-hostess {
  color: #ff2a85;
}

#reaction-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

.react-btn {
  width: 42px;
  height: 36px;
  border-radius: 10px;
  background: rgba(18, 18, 32, 0.76);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.react-btn:hover {
  transform: translateY(-2px) scale(1.1);
  background: rgba(255, 42, 133, 0.28);
  border-color: var(--neon-pink);
}

#chat-input-row {
  display: flex;
  align-items: center;
  gap: 7px;
  pointer-events: auto;
}

#chat-input {
  flex: 1;
  height: 40px;
  border-radius: 12px;
  background: rgba(15, 15, 28, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 0 14px;
  font-size: 13px;
  outline: none;
}

#chat-input:focus {
  border-color: var(--neon-pink);
}

#chat-send-btn {
  height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(30, 27, 56, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

#chat-send-btn:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
}

/* Modals (Stage Shoutout, 10 Hostesses, DJ Queue, Login, Secret Whisper) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 4, 10, 0.72);
  backdrop-filter: blur(8px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-card {
  width: min(460px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  background: #11131a;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  color: #f8fafc;
}

.modal-card.wide {
  width: min(760px, 96vw);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 800;
}

.modal-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
}

/* Stage Shoutout Preview Box (Matching Image 1 of user's second batch) */
.shoutout-preview-box {
  background: linear-gradient(135deg, #25161b, #1d1222);
  border: 2.5px solid #ec4899;
  border-radius: 16px;
  padding: 18px 14px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 0 24px rgba(236, 72, 153, 0.25);
}

.shoutout-preview-title {
  font-size: 22px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 6px;
}

.shoutout-preview-sub {
  font-size: 13px;
  font-weight: 700;
  color: #fb7185;
}

.form-group {
  margin-bottom: 14px;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  height: 44px;
  border-radius: 12px;
  background: #1c202b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0 14px;
  font-size: 14px;
  outline: none;
}

.form-input:focus {
  border-color: #14b8a6;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.duration-option {
  background: #161922;
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.duration-option.selected {
  background: rgba(20, 184, 166, 0.16);
  border-color: #14b8a6;
}

.duration-option .sec {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.duration-option .price {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.primary-action-btn {
  width: 100%;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(90deg, #0d9488, #14b8a6);
  border: none;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.primary-action-btn.pink {
  background: linear-gradient(90deg, #e11d48, #ff2a85);
}

.primary-action-btn:hover {
  filter: brightness(1.12);
}

/* 10 Hostesses Grid & Profile Card */
.hostess-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.hostess-card {
  background: #181a26;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.hostess-card:hover {
  border-color: var(--neon-pink);
}

.hostess-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hostess-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-pink);
}

.hostess-meta h4 {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
}

.hostess-meta p {
  font-size: 11px;
  color: #f472b6;
}

.hostess-greeting {
  font-size: 11.5px;
  color: #cbd5e1;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.28);
  padding: 7px 9px;
  border-radius: 8px;
}

.hostess-btn-row {
  display: flex;
  gap: 6px;
  margin-top: auto;
}

.hostess-btn {
  flex: 1;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 42, 133, 0.45);
  background: rgba(255, 42, 133, 0.18);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.hostess-btn.gold {
  border-color: rgba(250, 204, 21, 0.5);
  background: rgba(250, 204, 21, 0.18);
  color: #fef08a;
}

.hostess-btn:hover {
  background: var(--neon-pink);
  color: #fff;
}

/* Secret Whisper Reward Popup (Real Photo + Story + PeerTube 18+ Player) */
#secret-whisper-popup {
  position: fixed;
  right: 74px;
  bottom: 18px;
  width: min(370px, calc(100vw - 92px));
  background: linear-gradient(145deg, rgba(28, 12, 28, 0.96), rgba(14, 12, 24, 0.97));
  border: 1.5px solid #ff2a85;
  border-radius: 18px;
  padding: 14px;
  z-index: 40;
  box-shadow: 0 14px 45px rgba(255, 42, 133, 0.45);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#secret-whisper-popup.hidden {
  display: none !important;
}

.whisper-real-photo {
  width: 100%;
  height: 175px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.whisper-story-box {
  background: rgba(0, 0, 0, 0.4);
  border-left: 3px solid #facc15;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #fef08a;
  max-height: 110px;
  overflow-y: auto;
}

.whisper-peertube-card {
  background: rgba(255, 42, 133, 0.14);
  border: 1px solid rgba(255, 42, 133, 0.4);
  border-radius: 10px;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Private VIP Room 18+ Control Bar (Bottom Center when inside Private Suite) */
#private-room-hud {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(860px, 96vw);
  background: linear-gradient(135deg, rgba(35, 10, 32, 0.92), rgba(15, 12, 28, 0.94));
  border: 1.5px solid #ff2a85;
  border-radius: 18px;
  padding: 12px 16px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 40px rgba(255, 42, 133, 0.4);
  backdrop-filter: blur(12px);
}

#private-room-hud.hidden {
  display: none !important;
}

.private-pose-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}

.pose-btn {
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pose-btn.active, .pose-btn:hover {
  background: var(--neon-pink);
  border-color: #fff;
  transform: translateY(-1px);
}

.pose-btn.combo-btn {
  background: linear-gradient(90deg, #ca8a04, #e11d48, #9333ea);
  border-color: #fde047;
  color: #fff;
  font-weight: 900;
}

.speed-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.speed-pill.active {
  background: #22d3ee;
  color: #0f172a;
  border-color: #22d3ee;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  top: 66px;
  right: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.sky-toast {
  background: rgba(15, 23, 42, 0.92);
  border-left: 4px solid var(--neon-pink);
  color: #fff;
  padding: 10px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: popIn 0.2s ease;
}

@media (max-width: 640px) {
  .glass-pill {
    padding: 5px 9px;
    font-size: 11px;
  }
  #bottom-left-hud {
    width: calc(100vw - 74px);
  }
  .duration-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
