:root {
  --bg-eggshell: #f2efe4;
  --bg-card: #ffffff;
  --bg-sidebar: #f8f6ef;
  --bg-subtle: #ebe7d9;
  --text-main: #1f1e1b;
  --text-secondary: #6e6b62;
  --ch-blue: #2563eb;
  --ch-blue-hover: #1d4ed8;
  --ch-green: #2cb659;
  --ch-green-hover: #239b4a;
  --ch-red: #ef4444;
  --border-soft: #e4e0d3;
  --shadow-card: 0 12px 36px rgba(31, 30, 27, 0.07);
  --shadow-sm: 0 2px 10px rgba(31, 30, 27, 0.05);
}

body.dark-theme {
  --bg-eggshell: #16191d;
  --bg-card: #21262d;
  --bg-sidebar: #1c2026;
  --bg-subtle: #2b313a;
  --text-main: #f1f5f9;
  --text-secondary: #94a3b8;
  --border-soft: #30363d;
  --shadow-card: 0 12px 36px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: 'Nunito', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-eggshell);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.page {
  display: none;
  width: 100%;
  height: 100vh;
}

.page.active {
  display: flex;
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.ch-toast {
  pointer-events: auto;
  background: #1f1e1b;
  color: #fff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  animation: toastSlideDown 0.25s ease-out;
}

.ch-toast.fade-out {
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

@keyframes toastSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== AUTH PAGE ==================== */
#auth-page {
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at top, #fbf9f3 0%, var(--bg-eggshell) 100%);
  padding: 20px;
}

.auth-card {
  background: var(--bg-card);
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  border-radius: 28px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  text-align: center;
}

.auth-logo {
  font-size: 3rem;
  margin-bottom: 8px;
}

.auth-card h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.form-group {
  text-align: left;
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-main);
}

.phone-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.country-badge {
  background: var(--bg-subtle);
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.form-group input,
.ch-select,
.filter-select {
  width: 100%;
  padding: 12px 15px;
  border: 1.5px solid var(--border-soft);
  border-radius: 14px;
  background: var(--bg-sidebar);
  color: var(--text-main);
  font-size: 0.98rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.ch-select:focus {
  outline: none;
  border-color: var(--ch-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.help-text {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.btn-primary {
  background: var(--ch-blue);
  color: #fff;
  border: none;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  font-family: inherit;
}

.btn-primary:hover {
  background: var(--ch-blue-hover);
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
}

.auth-divider {
  margin: 22px 0 16px;
  position: relative;
  text-align: center;
}

.auth-divider::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--border-soft);
}

.auth-divider span {
  position: relative;
  background: var(--bg-card);
  padding: 0 12px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.quick-login-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-login-box input {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-sidebar);
  color: var(--text-main);
  font-family: inherit;
  text-align: center;
}

.btn-Instant {
  background: var(--ch-green);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}

.btn-Instant:hover {
  background: var(--ch-green-hover);
  transform: translateY(-1px);
}

.dev-otp-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px dashed #3b82f6;
  border-radius: 18px;
  padding: 14px;
  margin-bottom: 18px;
  color: #1e3a8a;
}

.dev-otp-title {
  font-size: 0.85rem;
  font-weight: 700;
}

.dev-otp-code {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 6px;
  color: #1d4ed8;
  margin: 4px 0;
  cursor: pointer;
}

.dev-otp-sub {
  font-size: 0.78rem;
  color: #1e40af;
}

.otp-input-field {
  text-align: center;
  font-size: 1.5rem !important;
  font-weight: 800;
  letter-spacing: 8px;
}

.otp-actions-row {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}

.btn-link {
  background: none;
  border: none;
  color: var(--ch-blue);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  font-family: inherit;
}

.message-box {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  display: none;
}

.message-box.error {
  display: block;
  background: #fee2e2;
  color: #b91c1c;
}

.message-box.success {
  display: block;
  background: #dcfce7;
  color: #15803d;
}

/* ==================== MAIN CLUBHOUSE / CLUBDECK LAYOUT ==================== */
.ch-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  padding: 18px 22px;
  gap: 20px;
}

/* Left/Center Main Stage Area */
.ch-main-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.stage-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
}

.brand-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
}

.brand-title {
  font-weight: 800;
  font-size: 1.02rem;
}

.live-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ch-green);
  background: rgba(44, 182, 89, 0.12);
  padding: 3px 10px;
  border-radius: 999px;
}

.live-badge.offline {
  color: var(--ch-red);
  background: rgba(239, 68, 68, 0.12);
}

.stage-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-pill-btn,
.user-pill-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  font-family: inherit;
  transition: transform 0.15s, background 0.15s;
}

.icon-pill-btn:hover,
.user-pill-btn:hover {
  transform: translateY(-1px);
}

.danger-pill:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

/* White Rounded Stage Card (Like Clubhouse Web Screenshots) */
.ch-stage-card {
  flex: 1;
  background: var(--bg-card);
  border-radius: 32px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* ==================== STATE A: SETUP CARD (Screenshot 3) ==================== */
.stage-setup-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 28px 36px;
}

.setup-card-top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.privacy-pill-selector {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-soft);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  transition: background 0.2s;
}

.privacy-pill-selector:hover {
  background: var(--bg-subtle);
}

.btn-close-circle {
  position: absolute;
  right: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--bg-sidebar);
  cursor: pointer;
  font-size: 1rem;
}

.setup-center-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: auto 0;
}

.setup-avatar-ring {
  width: 126px;
  height: 126px;
  border-radius: 46px;
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.14);
  border: 4px solid #fff;
}

.setup-big-avatar {
  font-size: 4rem;
}

.setup-user-name {
  font-size: 1.25rem;
  font-weight: 800;
}

.setup-hint-text {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 360px;
  text-align: center;
}

.setup-bottom-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding-bottom: 10px;
}

.setup-mic-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ch-big-mic-btn {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border: none;
  background: var(--ch-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35);
  transition: transform 0.2s, background 0.2s;
}

.ch-big-mic-btn:hover {
  background: var(--ch-blue-hover);
  transform: scale(1.06);
}

.mic-sub-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.setup-sliders-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.84rem;
}

.sliders-circle {
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  font-weight: 700;
  transition: background 0.2s;
}

.setup-sliders-btn:hover .sliders-circle {
  background: var(--bg-subtle);
}

/* ==================== STATE B: ACTIVE VOICE ROOM VIEW ==================== */
.active-room-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.room-stage-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 26px 14px;
  border-bottom: 1px solid var(--border-soft);
  gap: 16px;
}

.club-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.club-tag {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.privacy-badge,
.participant-count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--bg-sidebar);
  color: var(--text-secondary);
}

.stage-room-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.3;
}

.room-header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-stage-tool {
  background: var(--bg-sidebar);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-stage-tool.active-tool {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.btn-leave-quietly {
  background: #fee2e2;
  color: #dc2626;
  border: none;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.btn-leave-quietly:hover {
  background: #fecaca;
}

.pinned-link-banner {
  background: var(--bg-sidebar);
  padding: 8px 26px;
  font-size: 0.84rem;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pinned-link-banner a {
  color: var(--ch-blue);
  font-weight: 700;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Screen Share Container */
.screen-share-container {
  background: #0f172a;
  padding: 10px 18px;
  text-align: center;
}

.screen-share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 0.82rem;
  margin-bottom: 6px;
}

.btn-tiny-danger {
  background: var(--ch-red);
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  cursor: pointer;
}

#screen-video {
  max-height: 190px;
  max-width: 100%;
  border-radius: 12px;
}

/* ==================== 2-COLUMN ROOM STAGE LAYOUT ==================== */
.room-stage-body-grid {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 16px 20px 18px;
  overflow: hidden;
}

@media (max-width: 960px) {
  .room-stage-body-grid {
    flex-direction: column;
    overflow-y: auto;
  }
}

/* Left Pane: Stage Speakers & Audience */
.stage-left-pane {
  flex: 1.25;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 8px;
  gap: 16px;
}

/* Speakers Grid */
.stage-speakers-section {
  padding: 4px 6px;
  flex-shrink: 0;
}

.room-listeners-section {
  padding: 14px 6px 6px;
  border-top: 1px solid var(--border-soft);
  width: 100%;
}

.section-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.btn-refresh-inroom {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-refresh-inroom:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.btn-refresh-inroom:active {
  transform: translateY(1px);
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 14px;
  padding: 4px;
}

.participant-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 12px;
  transition: transform 0.15s ease, background 0.15s ease;
}

.participant-card:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.04);
}

.participant-avatar-wrap {
  position: relative;
  margin-bottom: 6px;
}

.participant-avatar {
  width: 74px;
  height: 74px;
  border-radius: 28px;
  background: var(--bg-sidebar);
  border: 3px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

@keyframes speakingWhitePulse {
  0% {
    border-color: #ffffff;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6), 0 0 8px rgba(255, 255, 255, 0.85);
    transform: scale(1.03);
  }
  50% {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85), 0 0 16px rgba(255, 255, 255, 1);
    transform: scale(1.06);
  }
  100% {
    border-color: #ffffff;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.6), 0 0 8px rgba(255, 255, 255, 0.85);
    transform: scale(1.03);
  }
}

.participant-avatar.speaking {
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8), 0 0 12px rgba(255, 255, 255, 0.9) !important;
  animation: speakingWhitePulse 0.9s infinite ease-in-out !important;
}

.mic-badge.active-speaking {
  background: var(--ch-green) !important;
  color: #fff !important;
  box-shadow: 0 0 8px rgba(44, 182, 89, 0.8) !important;
  animation: speakingWhitePulse 0.9s infinite ease-in-out !important;
}

.mic-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-card);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.hand-badge {
  position: absolute;
  top: -4px;
  left: -4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fef08a;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  animation: waveBounce 0.8s infinite alternate;
}

@keyframes waveBounce {
  from { transform: rotate(-10deg) scale(1); }
  to { transform: rotate(12deg) scale(1.12); }
}

.reaction-anchor {
  position: absolute;
  top: 0;
  left: 50%;
  pointer-events: none;
}

.floating-emoji {
  position: absolute;
  font-size: 1.8rem;
  transform: translateX(-50%);
  animation: floatUpEmoji 1.8s ease-out forwards;
}

@keyframes floatUpEmoji {
  0% { opacity: 1; transform: translate(-50%, 0) scale(0.8); }
  100% { opacity: 0; transform: translate(-50%, -65px) scale(1.35); }
}

.participant-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-main);
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-role {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Right Pane: Soundboard, Live Room Chat & Mic Controls (User Box #2) */
.stage-right-chat-pane {
  width: 380px;
  min-width: 320px;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  gap: 10px;
  background: var(--bg-sidebar);
  border-radius: 20px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

@media (max-width: 960px) {
  .stage-right-chat-pane {
    width: 100%;
    max-width: 100%;
    min-height: 420px;
  }
}

/* Clubdeck Soundboard & Emoji Bar */
.clubdeck-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 26px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
  gap: 12px;
  flex-wrap: wrap;
}

.clubdeck-toolbar.vertical-mode {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.ch-reaction-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--bg-card);
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
}

.ch-reaction-row-top {
  width: 100%;
}

.ch-emoji-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
  justify-items: center;
  align-items: center;
}

.ch-emoji-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  padding: 6px 4px;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ch-emoji-btn:hover {
  transform: scale(1.28);
  background: rgba(255, 255, 255, 0.08);
}

.ch-emoji-btn:active {
  transform: scale(0.92);
}

.ch-reaction-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.ch-action-pill-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.12s, background 0.15s, border-color 0.15s;
}

.ch-action-pill-btn:hover {
  transform: translateY(-1px);
  background: var(--border-soft);
}

.ch-action-pill-btn.hand-btn.active-hand {
  background: #fef08a;
  color: #854d0e;
  border-color: #fde047;
}

.ch-action-pill-btn.ping-btn {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border-color: rgba(59, 130, 246, 0.35);
}

.ch-action-pill-btn.ping-btn:hover {
  background: #3b82f6;
  color: #ffffff;
}

.soundboard-group,
.emoji-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.toolbar-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-secondary);
  margin-right: 4px;
}

.sound-btn,
.emoji-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-main);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s, background 0.15s;
}

.sound-btn:hover,
.emoji-btn:hover {
  transform: translateY(-1px);
  background: var(--bg-subtle);
}

.hand-btn.active-hand {
  background: #fef08a;
  color: #854d0e;
  border-color: #fde047;
}

/* In-Room Live Chat inside Stage Right Pane */
.stage-right-chat-pane .in-room-chat-box {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.stage-right-chat-pane .chat-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.stage-right-chat-pane .chat-header-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.stage-right-chat-pane .chat-live-pill {
  font-size: 0.7rem;
  padding: 2px 8px;
}

.stage-right-chat-pane .messages-container {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stage-right-chat-pane .chat-input-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  align-items: center;
  flex-shrink: 0;
}

.stage-right-chat-pane .chat-input-row input {
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg-sidebar);
  color: var(--text-main);
  font-size: 0.88rem;
  font-family: inherit;
  padding: 7px 10px;
  min-width: 0;
}

.stage-right-chat-pane .btn-attach {
  padding: 6px 9px;
  font-size: 0.95rem;
  border-radius: 8px;
}

.stage-right-chat-pane .btn-send-chat {
  background: var(--ch-blue);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

/* Voice Controls inside Right Pane */
.stage-right-chat-pane .voice-dock {
  display: flex;
  width: 100%;
  flex-shrink: 0;
}

.stage-right-chat-pane .voice-dock .btn-mic-toggle {
  width: 100%;
  flex: 1;
  max-width: none;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 800;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* Bottom Split: In-Room Chat + Voice Controls */
.room-bottom-split {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 26px 18px;
  min-height: 0;
  gap: 12px;
}

.in-room-chat-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-radius: 20px;
  border: 1px solid var(--border-soft);
  overflow: hidden;
  min-height: 130px;
}

.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ==================== SINGLE-ROW INLINE ROOM CHAT ==================== */
.chat-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 0.86rem;
  line-height: 1.45;
  transition: background 0.1s;
}

.chat-line:hover {
  background: rgba(255, 255, 255, 0.04);
}

.chat-line-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  top: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  font-size: 0.72rem;
}

.chat-line-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.chat-line-body {
  flex: 1;
  display: inline;
  word-break: break-word;
}

.chat-line-user {
  font-weight: 700;
  color: #38bdf8;
  margin-right: 6px;
}

.chat-line.own .chat-line-user {
  color: #34d399;
}

.chat-line-time {
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-right: 8px;
  font-weight: 400;
}

.chat-line-text {
  color: var(--text-main);
  font-size: 0.86rem;
  word-break: break-word;
}

.chat-line-media {
  display: block;
  margin-top: 4px;
}

.chat-line-media img {
  max-width: 180px;
  max-height: 120px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
}

/* Legacy fallback message styles */
.message {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 3px 6px;
  font-size: 0.86rem;
}

.system-message {
  text-align: center;
  font-size: 0.76rem;
  color: var(--text-secondary);
  padding: 2px 10px;
}

.chat-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-soft);
}

.chat-header-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.chat-live-pill {
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(44, 182, 89, 0.15);
  color: var(--ch-green);
  border: 1px solid rgba(44, 182, 89, 0.3);
  padding: 2px 10px;
  border-radius: 999px;
}

.empty-chat-hint {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.92rem;
  padding: 24px 14px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border-soft);
  align-items: center;
}

.chat-input-row input {
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--bg-sidebar);
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  padding: 10px 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-row input:focus {
  outline: none;
  border-color: var(--ch-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.15);
}

.btn-send-chat {
  background: var(--ch-blue);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25);
  transition: transform 0.1s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-send-chat:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-attach {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 1.1rem;
  cursor: pointer;
}

.chat-input-row input:focus {
  outline: none;
}

.btn-attach {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 4px 10px;
  cursor: pointer;
}

.btn-send-chat {
  background: var(--ch-blue);
  color: #fff;
  border: none;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
}

/* Voice Control Dock */
.voice-dock {
  display: flex;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.btn-mic-toggle {
  flex: 1;
  max-width: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid var(--border-soft);
  background: var(--bg-sidebar);
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.2s;
}

.btn-mic-toggle.active {
  background: var(--ch-green);
  color: #fff;
  border-color: var(--ch-green);
  box-shadow: 0 6px 18px rgba(44, 182, 89, 0.3);
}

.btn-hold-to-talk {
  flex: 1;
  max-width: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  background: var(--ch-blue);
  color: #fff;
  font-family: inherit;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
  user-select: none;
  transition: all 0.15s;
}

.btn-hold-to-talk.active {
  background: var(--ch-red);
  transform: scale(0.98);
  box-shadow: 0 0 0 5px rgba(239, 68, 68, 0.25);
}

/* ==================== RIGHT SIDEBAR (Screenshots 1 & 2) ==================== */
.ch-right-sidebar {
  width: 370px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  gap: 12px;
}

.ch-nav-tabs {
  display: flex;
  justify-content: space-around;
  background: var(--bg-card);
  padding: 8px;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
}

.ch-nav-icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: all 0.2s;
}

.ch-nav-icon.active {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-badge {
  background: var(--ch-red);
  color: #fff;
  font-size: 0.68rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-tab-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
}

.btn-start-new-chat {
  width: 100%;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  padding: 13px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s, transform 0.15s;
}

.btn-start-new-chat:hover {
  background: var(--ch-green);
  color: #fff;
  border-color: var(--ch-green);
  transform: translateY(-1px);
}

.rooms-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 4px;
}

.ch-room-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-soft);
  border-radius: 22px;
  padding: 16px 18px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border-color 0.2s;
}

.ch-room-card:hover {
  transform: translateY(-2px);
  border-color: var(--ch-blue);
}

.ch-room-card.active-room-card {
  border-color: var(--ch-green);
  box-shadow: 0 0 0 3px rgba(44, 182, 89, 0.16);
}

.ch-room-club {
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-club-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.mini-club-icon-placeholder {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.ch-room-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 10px;
  line-height: 1.35;
}

.ch-room-speakers {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.mini-speaker-chip {
  display: inline-flex;
  align-items: center;

  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-main);
}

.mini-speaker-chip.muted-chip {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.ch-room-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 700;
}

.live-room-indicator {
  color: var(--ch-green);
  margin-left: auto;
}

/* Online Friends Grid (Screenshot 2 style) */
.sidebar-section-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-secondary);
  padding: 0 6px;
}

.online-friends-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  max-height: 195px;
  overflow-y: auto;
  padding: 4px;
}

.friend-avatar-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
}

.friend-avatar-item:hover {
  transform: translateY(-2px);
}

.friend-circle {
  width: 48px;
  height: 48px;
  border-radius: 20px;
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  position: relative;
  margin-bottom: 4px;
}

.online-dot {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #2563eb;
  border: 2px solid var(--bg-card);
}

.friend-name {
  font-size: 0.78rem;
  font-weight: 800;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.friend-status {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.btn-wave-mini {
  background: var(--bg-subtle);
  border: none;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
}

/* Backchannel DM Box */
.dm-box-container {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 180px;
}

.dm-header {
  padding: 10px 14px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.dm-target-tag {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
}

.dm-messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dm-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.dm-item.dm-own {
  flex-direction: row-reverse;
}

.dm-avatar {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dm-bubble {
  background: var(--bg-sidebar);
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 0.82rem;
  max-width: 78%;
}

.dm-meta {
  font-size: 0.68rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

.dm-input-row {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border-soft);
}

.dm-input-row input {
  flex: 1;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.84rem;
  background: var(--bg-sidebar);
  color: var(--text-main);
  font-family: inherit;
}

.btn-dm-send {
  background: var(--ch-blue);
  color: #fff;
  border: none;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.search-box-wrap input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-main);
  font-family: inherit;
}

/* ==================== MODALS (Screenshot 4 Room Set Up) ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(3px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal.active {
  display: flex;
}

.ch-setup-modal {
  background: var(--bg-card);
  width: 100%;
  max-width: 440px;
  border-radius: 28px;
  padding: 24px 26px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border-soft);
}

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

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
}

.btn-close {
  background: var(--bg-sidebar);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text-main);
}

.ch-modal-footer {
  margin-top: 10px;
}

.btn-start-room-green {
  width: 100%;
  background: var(--ch-green);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 1.02rem;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 20px rgba(44, 182, 89, 0.28);
  transition: background 0.2s, transform 0.15s;
}

.btn-start-room-green:hover {
  background: var(--ch-green-hover);
  transform: translateY(-1px);
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.avatar-choice {
  font-size: 1.65rem;
  padding: 8px;
  border-radius: 14px;
  border: 2px solid var(--border-soft);
  background: var(--bg-sidebar);
  cursor: pointer;
}

.avatar-choice.selected {
  border-color: var(--ch-blue);
  background: #dbeafe;
}

#modal-image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 16px;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
    height: auto;
  }
  .ch-layout {
    flex-direction: column;
    height: auto;
  }
  .ch-right-sidebar {
    width: 100%;
  }
}

.mini-speaker-img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; margin-right: 6px; display: inline-block; }


/* Profile Avatar Image Enhancements */
.mini-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  vertical-align: middle;
}
.mini-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.setup-big-avatar {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 50%;
}
.setup-big-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.participant-avatar {
  overflow: hidden;
}
.participant-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 25px;
  object-fit: cover;
  display: block;
}
.friend-circle {
  overflow: hidden;
}
.friend-circle img {
  width: 100%;
  height: 100%;
  border-radius: 18px;
  object-fit: cover;
  display: block;
}
.message-avatar, .dm-avatar {
  overflow: hidden;
}
.message-avatar img, .dm-avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}



/* ==================== SETTINGS MODAL STYLES ==================== */
.settings-modal-box {
  max-width: 530px !important;
  width: 94% !important;
}

.settings-nav-tabs {
  display: flex;
  gap: 10px;
  padding: 0 24px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.settings-tab-btn {
  flex: 1;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-soft);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.settings-tab-btn.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.settings-tab-pane {
  display: none;
}

.settings-tab-pane.active {
  display: block;
}

.vu-meter-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-sidebar);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  position: relative;
}

.vu-meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #22c55e 0%, #84cc16 65%, #eab308 85%, #ef4444 100%);
  border-radius: 999px;
  transition: width 0.06s ease;
}

.settings-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
}

.settings-toggle-row:last-child {
  border-bottom: none;
}

.settings-toggle-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary-color);
}


/* Screen Zoom Controls (A+ a-) */
.zoom-control-pill {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  padding: 3px 6px;
  box-shadow: var(--shadow-sm);
  gap: 2px;
}

.btn-zoom-step {
  background: none;
  border: none;
  padding: 5px 12px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-main);
  cursor: pointer;
  border-radius: 999px;
  transition: background 0.15s, transform 0.1s;
}

.btn-zoom-step:hover {
  background: var(--bg-subtle);
  transform: scale(1.08);
}

.btn-zoom-reset {
  background: none;
  border: none;
  padding: 4px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 6px;
  user-select: none;
}

.btn-zoom-reset:hover {
  color: var(--text-main);
  text-decoration: underline;
}

/* ==================== RAISED HANDS MODERATION PANEL & STAGE (CLUBDECK STYLE) ==================== */
.btn-header-hands {
  background: rgba(245, 158, 11, 0.18) !important;
  border: 1px solid #f59e0b !important;
  color: #fbbf24 !important;
  font-weight: 700 !important;
  animation: pulseOrange 1.5s infinite;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

@keyframes pulseOrange {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  70% { box-shadow: 0 0 0 7px rgba(245, 158, 11, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

.stage-raised-hands-section {
  padding: 12px 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px dashed rgba(245, 158, 11, 0.45);
  border-radius: 16px;
  margin-bottom: 16px;
  animation: slideDownFade 0.25s ease-out;
}

.raised-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 6px;
}

.raised-title-text {
  font-size: 0.92rem;
  font-weight: 800;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 6px;
}

.raised-sub-hint {
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.raised-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
}

.raised-user-card {
  background: var(--bg-card);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s, border-color 0.15s;
}

.raised-user-card:hover {
  transform: translateY(-2px);
  border-color: #f59e0b;
}

.raised-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  width: 100%;
}

.btn-accept-to-stage {
  flex: 1;
  background: #10b981;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: background 0.15s, transform 0.1s;
}

.btn-accept-to-stage:hover {
  background: #059669;
  transform: scale(1.02);
}

.btn-dismiss-to-stage {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-dismiss-to-stage:hover {
  background: rgba(239, 68, 68, 0.3);
}

.btn-invite-listener {
  margin-top: 6px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10b981;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.btn-invite-listener:hover {
  background: #10b981;
  color: #fff;
  transform: scale(1.04);
}

.btn-invite-listener.invited {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
  cursor: default !important;
  transform: none !important;
}

.raised-hands-panel {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  margin: 10px 24px 0 24px;
  padding: 10px 16px;
  animation: slideDownFade 0.25s ease-out;
}

@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.raised-hands-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.raised-hands-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #f59e0b;
  font-size: 0.92rem;
}

.raised-hands-icon {
  font-size: 1.3rem;
  display: inline-block;
  animation: waveBounce 0.8s infinite alternate;
}

.raised-hands-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.raised-hand-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: 4px 10px 4px 6px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.raised-hand-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: #334155;
  color: #fff;
}

.raised-hand-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.raised-hand-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-invite-speaker {
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-invite-speaker:hover {
  background: #059669;
  transform: scale(1.04);
}

.btn-dismiss-hand {
  background: transparent;
  color: var(--text-secondary);
  border: none;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 50%;
  transition: color 0.15s;
}

.btn-dismiss-hand:hover {
  color: #ef4444;
}

.hand-badge.hand-pulse {
  animation: waveBounce 0.8s infinite alternate, glowAmber 1.5s infinite;
}

.participant-avatar.hand-raised {
  box-shadow: 0 0 0 3px #f59e0b, 0 0 16px rgba(245, 158, 11, 0.6) !important;
  animation: pulseAmberBorder 1.5s infinite;
}

@keyframes pulseAmberBorder {
  0% { box-shadow: 0 0 0 3px #f59e0b, 0 0 8px rgba(245, 158, 11, 0.4); }
  50% { box-shadow: 0 0 0 4px #fbbf24, 0 0 18px rgba(251, 191, 36, 0.8); }
  100% { box-shadow: 0 0 0 3px #f59e0b, 0 0 8px rgba(245, 158, 11, 0.4); }
}

@keyframes glowAmber {
  0% { box-shadow: 0 0 4px #f59e0b; }
  50% { box-shadow: 0 0 12px #f59e0b; }
  100% { box-shadow: 0 0 4px #f59e0b; }
}

/* ==================== USER PROFILE BOTTOM SHEET / MODAL ==================== */
.ch-profile-sheet {
  max-width: 440px !important;
  width: 92% !important;
  border-radius: 28px !important;
  padding: 0 !important;
  overflow: hidden;
  background: #18191c !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8) !important;
}

.profile-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 22px 8px 22px;
}

.profile-sheet-drag-handle {
  width: 38px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 8px auto 0 auto;
}

.profile-sheet-body {
  padding: 12px 24px 28px 24px;
  max-height: 80vh;
  overflow-y: auto;
}

.profile-top-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.profile-avatar-large {
  width: 82px;
  height: 82px;
  border-radius: 34px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.12);
  background: #25272c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  flex-shrink: 0;
}

.profile-user-meta {
  flex: 1;
  min-width: 0;
}

.profile-user-name {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.profile-user-handle {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 4px;
  font-weight: 500;
}

.profile-follow-stats {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
}

.profile-follow-stats strong {
  color: #ffffff;
  font-weight: 700;
}

.profile-karma-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #a78bfa;
  font-weight: 600;
  font-size: 0.85rem;
  margin-top: 6px;
}

.profile-pill-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}

.profile-pill-card {
  background: #24262b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 10px 14px;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.profile-pill-card strong {
  display: block;
  font-size: 1.05rem;
  color: #ffffff;
  font-weight: 700;
}

.profile-action-btn-primary {
  width: 100%;
  padding: 12px 18px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

.btn-move-audience {
  background: #2563eb;
  color: #ffffff;
}

.btn-move-audience:hover {
  background: #1d4ed8;
}

.btn-make-moderator {
  background: #10b981;
  color: #ffffff;
}

.btn-make-moderator:hover {
  background: #059669;
}

.btn-invite-speaker-big {
  background: #3b82f6;
  color: #ffffff;
}

.btn-invite-speaker-big:hover {
  background: #2563eb;
}

.profile-bio-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 14px 0;
}

.profile-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 18px 0 10px 0;
}

.profile-houses-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
}

.profile-house-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 76px;
  flex-shrink: 0;
}

.profile-house-photo {
  width: 62px;
  height: 62px;
  border-radius: 22px;
  object-fit: cover;
  background: #282a30;
  border: 2px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.profile-house-name {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ==================== PING FRIEND MODAL ==================== */
.ch-ping-modal {
  max-width: 480px !important;
  width: 92% !important;
  border-radius: 24px !important;
  background: #18191c !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8) !important;
}

.ping-search-input-wrap {
  position: relative;
  margin-bottom: 14px;
}

.ping-search-input-wrap input {
  width: 100%;
  background: #23252a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 10px 14px 10px 38px;
  color: #ffffff;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.ping-search-input-wrap input:focus {
  border-color: #3b82f6;
}

.ping-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.4);
  font-size: 1rem;
}

.ping-quick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 10px;
  scrollbar-width: thin;
}

.ping-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  transition: background 0.15s ease;
}

.ping-item-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ping-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ping-user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 18px;
  object-fit: cover;
  background: #2a2c33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.ping-btn-send {
  background: #3b82f6;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.ping-btn-send:hover {
  background: #2563eb;
}

.ping-btn-send.pinged {
  background: #10b981;
  cursor: default;
}

/* ==================== END PING FRIEND MODAL ==================== */

/* ==================== CLUBHOUSE SEARCH / EXPLORE UI ==================== */
.ch-search-tab-view {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
}

.ch-search-header-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.ch-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 8px 14px;
}

.ch-search-input-icon {
  font-size: 0.95rem;
  opacity: 0.6;
  margin-right: 8px;
  flex-shrink: 0;
}

.ch-search-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0;
}

.ch-search-clear-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 50%;
}

.ch-search-cancel-btn {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 4px;
  font-family: inherit;
  transition: opacity 0.2s;
}

.ch-search-cancel-btn:hover {
  opacity: 0.7;
}

.ch-search-results-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 2px;
}

.ch-search-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 4px 2px 4px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: lowercase;
}

.ch-search-clear-action {
  color: #3b82f6;
  font-size: 0.82rem;
  cursor: pointer;
  font-weight: 600;
}

.ch-search-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  padding: 12px 14px;
  transition: background 0.15s, transform 0.1s;
}

.ch-search-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.ch-search-card-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  cursor: pointer;
}

.ch-search-avatar {
  width: 44px;
  height: 44px;
  border-radius: 18px;
  object-fit: cover;
  flex-shrink: 0;
  background: #2a2c33;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.ch-search-club-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #3b82f6;
  flex-shrink: 0;
  overflow: hidden;
}

.ch-search-card-info {
  min-width: 0;
  flex: 1;
}

.ch-search-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-search-meta {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-search-bio {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ch-tag-member {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  padding: 4px 8px;
  white-space: nowrap;
}

.ch-btn-follow-back {
  background: #007aff;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ch-btn-follow-back:hover {
  background: #0066d6;
  transform: scale(1.02);
}

.ch-btn-follow-back.followed {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.8);
  cursor: default;
}

.ch-btn-ping-user {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  padding: 5px 11px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.ch-btn-ping-user:hover {
  background: #3b82f6;
  color: #ffffff;
}

/* ==================== REACTION TARGET MODAL ==================== */
.ch-reaction-target-modal {
  max-width: 440px;
  width: 95%;
}

.reaction-recipient-quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(37, 99, 235, 0.35);
  border-radius: 14px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 8px;
}

.reaction-recipient-quick-card:hover {
  background: rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.reaction-recipient-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  object-fit: cover;
  background: #2a2c33;
}

.reaction-recipients-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.reaction-recipient-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.reaction-recipient-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(3px);
}

.reaction-send-badge {
  background: #3b82f6;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}


