:root {
  --bg: #07080d;
  --card: #11131d;
  --card-inner: #171a27;
  --card-hover: #1e2235;
  --border-subtle: #262a3d;
  --text: #f8f9ff;
  --text-muted: #9da6c4;

  --magenta: #ff2e97;
  --violet: #9333ea;
  --cyan: #00e5ff;
  --lime: #a3ff12;
  --gold: #ffcc00;
  --orange: #ff6b00;
  --danger: #ff3b5c;

  --radius: 16px;
  --radius-sm: 10px;
}

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

html, body {
  font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.45;
}

/* Custom Sleek Dark Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #0b0d14;
}
::-webkit-scrollbar-thumb {
  background: #2f3550;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #4d5680;
}

.view {
  display: none;
  min-height: 100vh;
}
.view.active {
  display: block;
}

.hidden {
  display: none !important;
}

/* Role Visibility Toggle for Unified Room Cockpit */
#room-view.role-host .guest-only {
  display: none !important;
}
#room-view.role-guest .host-only {
  display: none !important;
}

/* ==================== SOLID MATTE CARDS WITH VIBRANT PARTY BORDERS ==================== */
.party-card {
  position: relative;
  border-radius: var(--radius);
  border: 2px solid transparent;
  background-color: var(--card);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
}

.border-rainbow {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(125deg, var(--magenta), var(--violet), var(--cyan), var(--lime), var(--gold), var(--magenta)) border-box;
  background-size: 100% 100%, 220% 220%;
  animation: partyBorderFlow 7s linear infinite;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.7),
    0 0 22px rgba(255, 46, 151, 0.14),
    0 0 22px rgba(0, 229, 255, 0.12);
}

.border-magenta {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, var(--magenta), var(--violet), var(--orange)) border-box;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.65),
    0 0 16px rgba(255, 46, 151, 0.14);
}

.border-cyan {
  background:
    linear-gradient(var(--card), var(--card)) padding-box,
    linear-gradient(135deg, var(--cyan), #2563eb, var(--lime)) border-box;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.65),
    0 0 16px rgba(0, 229, 255, 0.14);
}

@keyframes partyBorderFlow {
  0% { background-position: 0 0, 0% 50%; }
  50% { background-position: 0 0, 100% 50%; }
  100% { background-position: 0 0, 0% 50%; }
}

/* ==================== LANDING VIEW ==================== */
#landing-view.active {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.landing-top-controls {
  position: absolute;
  top: 16px;
  right: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.landing-wrapper {
  width: 100%;
  max-width: 920px;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--border-subtle);
  color: #e2e8ff;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 10px var(--lime);
  animation: pulseDot 1.6s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.brand-title {
  font-size: clamp(2.5rem, 5.2vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 auto 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex-wrap: wrap;
  gap: 12px;
}

.jamty-word span {
  background: linear-gradient(95deg, var(--magenta), var(--gold), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-th {
  font-size: 0.42em;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta), var(--violet), var(--cyan));
  background-size: 200% 100%;
  animation: rainbowSlide 5s linear infinite;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  text-wrap: balance;
  max-width: 520px;
  margin: 0 auto;
}
.hero-sub strong {
  color: #ffffff;
}

.install-cta-wrap {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.btn-install-hero {
  background: linear-gradient(95deg, #10b981, #00c4ff, #8b5cf6);
  background-size: 200% 100%;
  animation: rainbowSlide 5s linear infinite;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 15px;
  border-radius: 999px;
  box-shadow: 0 5px 18px rgba(0, 229, 255, 0.28);
}
.btn-install-hero:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
}

.btn-install-topbar {
  background: linear-gradient(95deg, #10b981, #0284c7);
  border: 1.5px solid #67f3ff;
  color: #ffffff;
  padding: 6px 13px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 9px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}
.btn-install-topbar:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.role-card {
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}
.role-card:hover {
  transform: translateY(-2px);
}

.card-badge {
  display: inline-flex;
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.card-badge.magenta {
  background: #2b1124;
  color: #ff7ac2;
  border: 1px solid var(--magenta);
}
.card-badge.cyan {
  background: #0d2530;
  color: #67f3ff;
  border: 1px solid var(--cyan);
}

.role-card h2 {
  font-size: 1.28rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-bottom: 16px;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.inline-settings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.inline-settings select {
  width: auto;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field span {
  font-size: 0.82rem;
  color: #c7cfe8;
  font-weight: 500;
}

input[type="text"],
select {
  width: 100%;
  background: #0b0d14;
  border: 1.5px solid var(--border-subtle);
  color: #ffffff;
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-family: inherit;
  font-size: 0.94rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="text"]:focus,
select:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.18);
}

.code-input {
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 1.12rem !important;
  color: var(--cyan) !important;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text);
  user-select: none;
}
.toggle-label.compact {
  font-size: 0.78rem;
}
.toggle-label input {
  display: none;
}
.toggle-slider {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: #272c42;
  flex-shrink: 0;
  transition: background 0.2s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.2s;
}
.toggle-label input:checked + .toggle-slider {
  background: linear-gradient(90deg, var(--magenta), var(--violet));
}
.toggle-label input:checked + .toggle-slider::after {
  transform: translateX(16px);
}

.landing-footer {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-legal-link {
  background: transparent;
  border: none;
  color: #8f98b8;
  font-family: inherit;
  font-size: 0.74rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}
.btn-legal-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.support-legal-row {
  text-align: center;
  padding-top: 2px;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
  color: #ffffff;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-lg {
  padding: 12px 18px;
  font-size: 0.96rem;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 0.82rem;
}
.btn-xs {
  padding: 5px 10px;
  font-size: 0.76rem;
  border-radius: 8px;
}

.btn-party {
  background: linear-gradient(100deg, var(--magenta), var(--violet));
  box-shadow: 0 5px 16px rgba(255, 46, 151, 0.32);
}
.btn-party:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-cyan {
  background: linear-gradient(100deg, #00c4ff, #2563eb);
  box-shadow: 0 5px 16px rgba(0, 196, 255, 0.28);
}
.btn-cyan:hover:not(:disabled) {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--card-inner);
  border: 1.5px solid var(--border-subtle);
  color: #e6ebff;
}
.btn-dark:hover:not(:disabled) {
  background: var(--card-hover);
  border-color: #464e70;
}

/* High-contrast solid buttons for Animated Rainbow Topbar */
.btn-solid-dark {
  background: #0d0f18;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.btn-solid-dark:hover:not(:disabled) {
  background: #181c2c;
  border-color: #ffffff;
}

.btn-solid-cyan {
  background: #091d28;
  border: 1.5px solid var(--cyan);
  color: #8df6ff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.btn-solid-cyan:hover:not(:disabled) {
  background: #0f3042;
  color: #ffffff;
}

.btn-solid-danger {
  background: #2b0d17;
  border: 1.5px solid #ff4d6d;
  color: #ffb3c1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.btn-solid-danger:hover:not(:disabled) {
  background: #4a1225;
  color: #ffffff;
}

.btn-locked {
  background: #3a0f1d !important;
  border: 1.5px solid var(--danger) !important;
  color: #ff99ad !important;
}

.btn-cyan-outline {
  background: #0d222c;
  border: 1.5px solid var(--cyan);
  color: #79f3ff;
}
.btn-cyan-outline:hover:not(:disabled) {
  background: #123342;
}

.icon-btn-sm {
  border: 1px solid #353b57;
  background: #1c2033;
  color: #ffffff;
  border-radius: 7px;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
}
.icon-btn-sm:hover {
  border-color: var(--cyan);
}

/* ==================== ANIMATED FLOWING RAINBOW TOPBAR ==================== */
.rainbow-topbar {
  position: sticky;
  top: 0;
  z-index: 68;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  background: linear-gradient(
    90deg,
    #ff2e97,
    #ff6b00,
    #ffcc00,
    #22c55e,
    #00e5ff,
    #3b82f6,
    #9333ea,
    #ff2e97
  );
  background-size: 300% 100%;
  animation: rainbowSlide 7s linear infinite;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.55);
}

@keyframes rainbowSlide {
  0% { background-position: 0% 50%; }
  100% { background-position: 300% 50%; }
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  background: #0b0d15;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: 12px;
  padding: 4px 12px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.logo-mini {
  font-weight: 800;
  font-size: 1.15rem;
  color: #ffffff;
}
.logo-mini span {
  background: linear-gradient(90deg, var(--magenta), var(--gold), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-by {
  font-size: 0.72rem;
  font-weight: 600;
  color: #e4ebff;
}

.live-stats-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0b0d15;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  color: #dce3ff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}
.live-stats-pill strong {
  color: var(--lime);
  font-weight: 700;
}
.live-stats-pill #stats-total {
  color: var(--cyan);
}
.stats-sep {
  opacity: 0.45;
}

.landing-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--card);
  border: 1.5px solid var(--border-subtle);
  color: #dce3ff;
  font-size: 0.82rem;
}
.landing-live-pill strong {
  color: var(--lime);
}
.landing-live-pill #landing-stats-total {
  color: var(--cyan);
}

.identity-pill {
  font-size: 0.76rem;
  font-weight: 600;
  background: #0b0d15;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  color: #8df6ff;
  border-radius: 999px;
  padding: 4px 11px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35);
}

/* ==================== YOUTUBE-STYLE SEARCH BAR + FLOATING MV LIST DROPDOWN ==================== */
.topbar-search {
  position: relative;
  flex: 1;
  max-width: 600px;
  min-width: 210px;
  margin-left: 8px;
  margin-right: auto;
}

.yt-search-box {
  display: flex;
  align-items: stretch;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.28);
  background: #0b0d15;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.yt-search-box:focus-within {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.45);
}

.yt-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.yt-input-wrap input {
  border: none !important;
  box-shadow: none !important;
  background: transparent;
  padding: 8px 34px 8px 16px;
  font-size: 0.88rem;
  border-radius: 0;
  color: #ffffff;
}

.yt-clear-btn {
  position: absolute;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
}
.yt-clear-btn:hover {
  background: #23283d;
  color: #ffffff;
}

.yt-search-submit {
  border: none;
  border-left: 1px solid #2b3149;
  background: #1a1e30;
  color: #ffffff;
  padding: 0 18px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.15s;
}
.yt-search-submit:hover {
  background: linear-gradient(100deg, var(--magenta), var(--violet));
}

/* Floating Search Dropdown Directly Below Search Bar (NOT trapped inside video box!) */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  background: #11131d;
  border: 2px solid transparent;
  background-image:
    linear-gradient(#11131d, #11131d),
    linear-gradient(135deg, var(--magenta), var(--cyan), var(--lime));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.92);
  overflow: hidden;
  z-index: 70;
  display: flex;
  flex-direction: column;
  max-height: 74vh;
}

.search-dropdown.mode-results {
  width: min(760px, 94vw);
}

.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #161926;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.dropdown-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  min-width: 0;
}
.dropdown-title strong {
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-body {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

/* Autocomplete Items */
.suggest-item {
  width: 100%;
  border: none;
  background: transparent;
  color: #f1f5ff;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
}
.suggest-item:hover,
.suggest-item.active {
  background: #1d2238;
  color: var(--cyan);
}
.suggest-icon {
  opacity: 0.65;
  font-size: 0.82rem;
}

/* YouTube-Style Vertical MV Results List */
.yt-mv-list {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
}

.yt-mv-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 10px;
  border-radius: 12px;
  background: #171a27;
  border: 1px solid var(--border-subtle);
  transition: background 0.15s, border-color 0.15s;
}
.yt-mv-row:hover {
  background: #1f2336;
  border-color: var(--cyan);
}

/* Large Clear 16:9 MV Thumbnail so users recognize the exact MV */
.yt-mv-thumb {
  position: relative;
  width: 192px;
  height: 108px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #040509;
}
.yt-mv-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.yt-dur-badge {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.88);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
}

.yt-mv-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yt-mv-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: #ffffff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.yt-mv-channel {
  font-size: 0.8rem;
  font-weight: 500;
  color: #c5cef0;
}

.yt-mv-stats {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.yt-mv-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

/* ==================== UNIFIED SINGLE-VIEWPORT ROOM COCKPIT ==================== */
#room-view.active {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.host-cockpit {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
  padding: 12px 16px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(350px, 1fr);
  gap: 14px;
}

.cockpit-left,
.cockpit-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

/* Vibe Category Chips Bar */
.vibe-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  flex-shrink: 0;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.vibe-bar::-webkit-scrollbar {
  display: none;
}

.vibe-chip {
  border: 1px solid var(--border-subtle);
  background: var(--card);
  color: #dce3ff;
  border-radius: 999px;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.vibe-chip:hover {
  border-color: var(--cyan);
  color: #ffffff;
  background: #172434;
}
.vibe-chip.active-chip {
  background: linear-gradient(95deg, var(--magenta), var(--violet));
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
}

/* Stage Card (Full-Size Video Frame + Now Playing Bar — Identical for Host & Guest) */
.stage-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.player-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #030407;
  overflow: hidden;
}

#yt-player-mount,
#yt-player-mount iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.guest-audio-pill {
  margin: 6px 10px 0;
  align-self: flex-start;
  background: rgba(11, 13, 21, 0.92);
  border: 1.5px solid var(--cyan);
  color: #8df6ff;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 999px;
  flex-shrink: 0;
}

.player-overlay {
  position: absolute;
  inset: 0;
  background: #0b0d14;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  gap: 10px;
  z-index: 6;
}
.player-overlay h3 {
  font-size: 1.3rem;
}
.player-overlay p {
  color: var(--text-muted);
  font-size: 0.88rem;
  max-width: 460px;
}
.empty-wave {
  font-size: 2.8rem;
  animation: floatY 2.4s ease-in-out infinite;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.pulse-btn {
  animation: pulseBtn 1.5s infinite;
}
@keyframes pulseBtn {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 46, 151, 0.7); }
  50% { box-shadow: 0 0 0 14px rgba(255, 46, 151, 0); }
}

/* Now Playing Control Bar */
.now-playing-bar {
  padding: 10px 16px;
  background: var(--card);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.np-meta {
  min-width: 0;
  flex: 1;
}
.np-status {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: var(--cyan);
  font-weight: 500;
  margin-bottom: 2px;
}
.np-meta h2 {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.np-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.requester-tag {
  background: #2b1124;
  border: 1px solid var(--magenta);
  color: #ff94cc;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
}

.vote-pill {
  background: #2b230c;
  border: 1px solid var(--gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 0.72rem;
  font-weight: 600;
}

.np-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.np-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Party Reaction Bar */
.reaction-strip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0c0e16;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 3px 6px;
}
.react-btn {
  border: none;
  background: transparent;
  font-size: 1rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.14s ease, background 0.14s ease;
}
.react-btn:hover {
  background: #22273c;
  transform: scale(1.22);
}
.react-btn:active {
  transform: scale(0.92);
}

/* Floating Reactions Overlay */
.reaction-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 90;
  overflow: hidden;
}

.floating-react {
  position: absolute;
  bottom: 70px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(17, 19, 29, 0.94);
  border: 1.5px solid var(--magenta);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  animation: floatUpReact 2.6s ease-out forwards;
}
.floating-react .emo {
  font-size: 1.35rem;
}

@keyframes floatUpReact {
  0% { opacity: 0; transform: translateY(20px) scale(0.75); }
  15% { opacity: 1; transform: translateY(0) scale(1.06); }
  100% { opacity: 0; transform: translateY(-290px) scale(0.95); }
}

/* Equalizer Animation */
.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 11px;
}
.eq-bars i {
  display: block;
  width: 3px;
  height: 4px;
  border-radius: 2px;
  background: var(--lime);
}
.eq-bars.playing i:nth-child(1) { animation: eq 0.75s infinite alternate; }
.eq-bars.playing i:nth-child(2) { animation: eq 0.55s 0.2s infinite alternate; }
.eq-bars.playing i:nth-child(3) { animation: eq 0.85s 0.1s infinite alternate; }
@keyframes eq {
  from { height: 3px; }
  to { height: 11px; }
}

/* ==================== QR CARD ==================== */
.qr-card {
  padding: 13px 14px;
  flex-shrink: 0;
}

.qr-top-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.qr-frame-sm {
  padding: 3px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--magenta), var(--gold), var(--cyan));
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.15s;
}
.qr-frame-sm:hover {
  transform: scale(1.04);
}

.qr-box-sm {
  width: 96px;
  height: 96px;
  background: #ffffff;
  border-radius: 9px;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qr-box-sm img,
.qr-box-sm svg {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-info {
  min-width: 0;
  flex: 1;
}

.qr-head-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 3px;
}
.qr-badge {
  font-size: 0.68rem;
  font-weight: 600;
  color: #67f3ff;
  background: #0d2530;
  border: 1px solid var(--cyan);
  padding: 1px 8px;
  border-radius: 999px;
}
.shield-mini {
  font-size: 0.68rem;
  font-weight: 600;
  color: #5ef2c2;
  background: #0e261e;
  border: 1px solid #15b886;
  padding: 1px 7px;
  border-radius: 999px;
}

.qr-code-big {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.2;
}
.qr-code-big #qr-room-code {
  color: var(--gold);
  letter-spacing: 0.12em;
}
.qr-url-link {
  display: block;
  font-size: 0.72rem;
  color: var(--cyan);
  text-decoration: underline;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 7px;
}
.qr-url-link:hover {
  color: #ffffff;
}

.qr-btn-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(82px, 1fr));
  gap: 6px;
}
.qr-btn-row .btn {
  width: 100%;
  min-height: 30px;
  padding: 4px 6px;
  justify-content: center;
  white-space: nowrap;
}

.qr-tools-row {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.qr-tools-row .btn {
  flex: 1 1 auto;
  min-height: 31px;
  padding: 5px 10px;
  justify-content: center;
  white-space: nowrap;
  background: #141827;
  color: #dce3ff;
  border: 1px solid var(--border-subtle);
  box-shadow: none;
  text-shadow: none;
  animation: none;
  font-weight: 600;
}
.qr-tools-row .btn:hover {
  background: #1a2036;
  border-color: var(--cyan);
  color: #ffffff;
}

@keyframes proFlowBg {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.tuner-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #8df6ff;
  background: #12182b;
  border: 1px solid rgba(0, 229, 255, 0.5);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}
.tuner-pill-btn:hover,
.float-pill-btn:hover {
  filter: brightness(1.15);
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.float-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: #e4d4ff;
  background: #18142c;
  border: 1px solid rgba(168, 85, 247, 0.5);
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.qr-tools-row .btn-rainbow-pro,
.btn-rainbow-pro:not(.tuner-pill-btn):not(.float-pill-btn) {
  background: linear-gradient(95deg, #d92682, #7c3aed, #0284c7, #d92682);
  background-size: 250% 100%;
  animation: proFlowBg 7s ease infinite;
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.28);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
}
.qr-tools-row .btn-rainbow-pro:hover,
.btn-rainbow-pro:hover {
  filter: brightness(1.12);
}

.members-strip {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}
.members-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kick-hint {
  font-size: 0.68rem;
  color: #7c85a6;
}
.member-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-height: 58px;
  overflow-y: auto;
}
.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.74rem;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--card-inner);
  border: 1px solid var(--border-subtle);
  color: #edf0ff;
}
.member-chip.host {
  background: #251335;
  border-color: var(--violet);
  color: #e4c6ff;
}
.kick-btn {
  border: none;
  background: #3a1420;
  color: #ff8ea5;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  font-size: 0.64rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kick-btn:hover {
  background: var(--danger);
  color: #ffffff;
}

/* ==================== QUEUE CARD ==================== */
.queue-card {
  flex: 1;
  min-height: 0;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  flex-shrink: 0;
}
.panel-header h3 {
  font-size: 0.94rem;
  font-weight: 700;
}

.queue-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.fair-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #132810;
  border: 1px solid var(--lime);
  color: var(--lime);
  font-weight: 600;
}
.fair-badge.off {
  background: var(--card-inner);
  border-color: var(--border-subtle);
  color: var(--text-muted);
}

.queue-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 2px;
}

.empty-queue {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 24px 12px;
  background: #0c0e16;
  border: 1.5px dashed var(--border-subtle);
  border-radius: 12px;
}

.queue-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 11px;
  background: var(--card-inner);
  border: 1px solid var(--border-subtle);
  animation: fadeSlideIn 0.2s ease;
}
.queue-item:first-child {
  border-color: var(--cyan);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.queue-index {
  width: 18px;
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  flex-shrink: 0;
}
.queue-item:first-child .queue-index {
  color: var(--cyan);
}

.track-thumb-wrap {
  position: relative;
  width: 60px;
  height: 38px;
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
  background: #07080d;
}
.track-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.track-info {
  min-width: 0;
  flex: 1;
}
.track-title {
  font-size: 0.82rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.track-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid var(--border-subtle);
  background: #11131d;
  color: var(--text);
  border-radius: 7px;
  padding: 4px 7px;
  font-family: inherit;
  font-size: 0.74rem;
  cursor: pointer;
}
.vote-btn.voted {
  background: #2b1124;
  border-color: var(--magenta);
  color: #ff94cc;
}

.mini-action-btn {
  border: 1px solid var(--border-subtle);
  background: #11131d;
  color: var(--text);
  border-radius: 7px;
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.74rem;
}
.mini-action-btn:hover {
  border-color: var(--cyan);
}
.mini-action-btn.del:hover {
  background: #36121f;
  border-color: var(--danger);
}

.room-settings-box {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.dur-select-compact {
  width: auto !important;
  padding: 4px 8px !important;
  font-size: 0.75rem !important;
  border-radius: 8px !important;
}

/* Preset Chips */
.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.center-chips {
  justify-content: center;
  margin-top: 6px;
}
.preset-chip {
  border: 1px solid var(--border-subtle);
  background: var(--card-inner);
  color: #eef2ff;
  border-radius: 999px;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 0.76rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.preset-chip:hover {
  border-color: var(--magenta);
  background: #281326;
  color: #ffffff;
}

/* ==================== FULLSCREEN QR MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(5, 6, 11, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  padding: 26px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--card-inner);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.95rem;
}
.modal-close:hover {
  border-color: var(--magenta);
}

.modal-brand {
  font-size: 1.8rem;
  font-weight: 800;
}
.modal-brand span {
  background: linear-gradient(95deg, var(--magenta), var(--gold), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.modal-brand small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
}
.modal-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.qr-frame-lg {
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--magenta), var(--gold), var(--cyan), var(--lime));
}
.qr-box-lg {
  width: 240px;
  height: 240px;
  background: #ffffff;
  border-radius: 13px;
  padding: 12px;
}
.qr-box-lg img,
.qr-box-lg svg {
  width: 100%;
  height: 100%;
  display: block;
}

.modal-code-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--card-inner);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 7px 18px;
  font-size: 0.9rem;
}
.modal-code-box strong {
  font-size: 1.55rem;
  color: var(--gold);
  letter-spacing: 0.16em;
}
.modal-url {
  font-size: 0.8rem;
  color: var(--cyan);
  text-decoration: underline;
  word-break: break-all;
}

/* ==================== LIVE SHOUTOUT BANNER (BELOW VIDEO, ZERO OVERLAY) ==================== */
.shoutout-banner {
  margin: 7px 10px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(13, 15, 24, 0.94);
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(rgba(13, 15, 24, 0.94), rgba(13, 15, 24, 0.94)),
    linear-gradient(90deg, var(--magenta), var(--gold), var(--cyan));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: shoutoutPop 0.25s ease;
  flex-shrink: 0;
}
.shoutout-from {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}
.shoutout-text {
  font-size: 0.86rem;
  font-weight: 600;
  color: #ffffff;
}
@keyframes shoutoutPop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.shoutout-trigger {
  border-left: 1px solid var(--border-subtle) !important;
  border-radius: 0 999px 999px 0 !important;
  padding-left: 6px;
}

.yt-attr-badge {
  font-size: 0.7rem;
  font-weight: 700;
  color: #ff6b81;
  text-decoration: none;
  border: 1px solid rgba(255, 107, 129, 0.45);
  border-radius: 999px;
  padding: 1px 7px;
  margin-left: 4px;
}
.yt-attr-badge:hover {
  background: rgba(255, 0, 51, 0.16);
  color: #ffffff;
}
.yt-attr-footer {
  text-decoration: none;
  opacity: 0.85;
}

/* ==================== TV PARTY MODE (FULLSCREEN FLEX — ZERO VIDEO OVERLAY) ==================== */
body.tv-mode .rainbow-topbar,
body.tv-mode .cockpit-right,
body.tv-mode .now-playing-bar,
body.tv-mode .mini-player-bar,
body.tv-mode .mobile-room-tabs {
  display: none !important;
}
body.tv-mode .host-cockpit {
  display: block !important;
  padding: 0 !important;
  max-width: none !important;
  height: 100vh !important;
  height: 100dvh !important;
}
body.tv-mode .cockpit-left,
body.tv-mode .stage-card {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
  display: flex !important;
  flex-direction: column !important;
  background: #070912 !important;
}
body.tv-mode .player-viewport {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  width: 100% !important;
  height: auto !important;
  border-radius: 0 !important;
  border: none !important;
}

.tv-hud {
  flex-shrink: 0;
  width: 100%;
  background: #0b0d15;
  border-top: 1.5px solid rgba(0, 229, 255, 0.35);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.tv-exit-btn {
  flex-shrink: 0;
  opacity: 0.85;
}
.tv-exit-btn:hover {
  opacity: 1;
}
.tv-qr-corner {
  flex-shrink: 0;
  background: #121626;
  border: 1.5px solid var(--cyan);
  border-radius: 10px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.tv-qr-box {
  width: 58px;
  height: 58px;
  background: #ffffff;
  border-radius: 6px;
  padding: 3px;
  flex-shrink: 0;
}
.tv-qr-box svg,
.tv-qr-box img {
  width: 100%;
  height: 100%;
  display: block;
}
.tv-qr-meta {
  text-align: left;
  line-height: 1.2;
}
.tv-qr-meta span {
  display: block;
  font-size: 0.65rem;
  color: var(--cyan);
}
.tv-qr-meta strong {
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.14em;
}
.tv-ticker {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tv-now,
.tv-next {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 0.92rem;
}
.tv-now strong {
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 44vw;
}
.tv-req {
  font-size: 0.8rem;
  color: #ff94cc;
}
.tv-pill-live {
  background: var(--magenta);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}
.tv-pill-next {
  background: #0d2530;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

/* ==================== QUEUE / HISTORY TABS ==================== */
.queue-tabs {
  display: inline-flex;
  background: #0b0d14;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}
.q-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.q-tab.active {
  background: var(--card-inner);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.queue-head-right {
  display: flex;
  align-items: center;
  gap: 5px;
}
.settings-toggles {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==================== SUPPORT / PRO / AFFILIATE MODAL (PHASE 3) ==================== */
.support-modal-card {
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  gap: 12px;
}
.support-section {
  width: 100%;
  background: var(--card-inner);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}
.support-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.support-sec-head strong {
  font-size: 0.88rem;
  color: #ffffff;
}
.support-badge-free {
  font-size: 0.7rem;
  color: var(--lime);
}
.support-badge-aff {
  font-size: 0.68rem;
  color: var(--cyan);
  background: #0d2530;
  border: 1px solid var(--cyan);
  padding: 1px 7px;
  border-radius: 999px;
}
.tip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.tip-actions .btn {
  flex: 1;
  text-decoration: none;
}

.pay-qr-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.pay-qr-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.pay-qr-card {
  background: #0b0d15;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pay-qr-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: #e4ebff;
}
.pay-qr-img-tall {
  width: 100%;
  max-width: 175px;
  border-radius: 8px;
  display: block;
  background: #ffffff;
}
.pay-qr-img-sq {
  width: 100%;
  max-width: 175px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 8px;
  padding: 6px;
  background: #ffffff;
  display: block;
}
.pay-qr-card .btn {
  width: 100%;
  text-decoration: none;
  margin-top: auto;
}

.pro-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  text-align: left;
}
.pro-card {
  background: var(--card-inner);
  border: 1.5px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pro-featured {
  border-color: var(--magenta);
  background: #1b1326;
}
.pro-tier {
  font-size: 0.84rem;
  font-weight: 700;
  color: #ffffff;
}
.pro-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gold);
}
.pro-price small {
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--text-muted);
}
.pro-list {
  padding-left: 16px;
  font-size: 0.75rem;
  color: #cbd5f0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 4px;
}
.pro-card .btn {
  margin-top: auto;
  width: 100%;
}

.aff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.aff-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 10px;
  background: #0d0f18;
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  transition: border-color 0.15s;
}
.aff-item:hover {
  border-color: var(--cyan);
}
.aff-item strong {
  font-size: 0.76rem;
  color: var(--cyan);
}
.aff-item span {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==================== PRO / PARTY PASS UI ==================== */
.pro-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #161002;
  background: linear-gradient(90deg, #ffcc00, #ff8a00);
  box-shadow: 0 0 14px rgba(255, 204, 0, 0.4);
  white-space: nowrap;
}

.pro-fields {
  background: #171422;
  border: 1.5px solid #ffcc00;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pro-fields-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--gold);
}

.pro-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pro-fields .field span {
  font-size: 0.72rem;
}

.pro-fields .field input {
  padding: 7px 10px;
  font-size: 0.82rem;
}

.pro-active-banner {
  background: #1f1a0a;
  border: 1px solid var(--gold);
  color: #ffe27a;
  border-radius: 9px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.redeem-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.redeem-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 11px;
  border-radius: 9px;
  border: 1.5px solid var(--border-subtle);
  background: #0d0f18;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.redeem-form input:focus {
  outline: none;
  border-color: var(--cyan);
}
.redeem-form input[type="email"] {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}

.tv-brand-banner {
  flex-shrink: 0;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  background: #0b0d15;
  border-bottom: 1.5px solid var(--gold);
  color: #ffe484;
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tv-promo-banner {
  flex-shrink: 0;
  width: 100%;
  height: 42px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 0;
  background: #0e0a1c;
  border-top: 1px solid rgba(0, 229, 255, 0.55);
}

.tv-promo-track {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffe999;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
  animation: tvPromoScroll 22s linear 1 forwards;
}

@keyframes tvPromoScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.pro-room-controls {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed rgba(255, 204, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-shrink: 0;
}

.pro-room-controls select {
  flex: 1;
  min-width: 0;
  border-color: rgba(255, 204, 0, 0.55) !important;
  color: #ffe588 !important;
  background: #171422 !important;
}

/* ==================== PRO AUDIO TUNER & EQUALIZER STUDIO DECK ==================== */
.tuner-modal-card {
  max-width: 560px;
  text-align: left;
  gap: 12px;
  max-height: 92vh;
  overflow-y: auto;
}

.tuner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-right: 32px;
}

.eq-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #0b0e17;
  border: 1px solid var(--border-subtle);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.eq-status-pill.active {
  border-color: var(--lime);
  color: var(--lime);
  background: #0d1f12;
  box-shadow: 0 0 14px rgba(163, 255, 18, 0.25);
}

.eq-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #64748b;
}

.eq-status-pill.active .eq-led {
  background: var(--lime);
  box-shadow: 0 0 8px var(--lime);
  animation: pulseDot 1.4s ease infinite;
}

.tuner-deck-screen {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 100%, #191332 0%, #070910 75%);
  border: 1.5px solid #2b3252;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.85), 0 6px 20px rgba(0, 0, 0, 0.45);
  height: 104px;
}

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

.tuner-deck-overlay {
  position: absolute;
  top: 8px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.eq-preset-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(11, 14, 24, 0.85);
  border: 1px solid rgba(0, 229, 255, 0.5);
  color: var(--cyan);
}

.eq-db-readout {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 6px;
  background: rgba(11, 14, 24, 0.88);
  border: 1px solid rgba(255, 204, 0, 0.5);
  color: var(--gold);
  letter-spacing: 0.06em;
}

.tuner-connect-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: 12px;
  background: #141727;
  border: 1px solid var(--border-subtle);
}

.tuner-connect-hint {
  font-size: 0.71rem;
  color: var(--text-muted);
}

.tuner-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  background: #0c0e17;
  padding: 4px;
  border-radius: 11px;
  border: 1px solid var(--border-subtle);
}

.tuner-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 7px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tuner-tab.active {
  background: linear-gradient(100deg, #2b1847, #162a42);
  color: #ffffff;
  border: 1px solid rgba(0, 229, 255, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.tuner-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tuner-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tuner-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--card-inner);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.tuner-toggle-row strong {
  display: block;
  font-size: 0.82rem;
  color: #ffffff;
}

.tuner-toggle-row small {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.tuner-toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--cyan);
  flex-shrink: 0;
  cursor: pointer;
}

.pro-mini-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffcc00, #ff8a00);
  color: #161002;
  margin-left: 4px;
  vertical-align: middle;
}

.tuner-master-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #0d101b;
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
}

.tuner-master-row input[type="range"] {
  flex: 1;
  accent-color: var(--gold);
  cursor: pointer;
}

.tuner-master-row strong {
  min-width: 42px;
  text-align: right;
  color: var(--gold);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.preset-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.eq-pad {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  padding: 11px 8px;
  border-radius: 12px;
  background: linear-gradient(160deg, #161a2b, #0e101c);
  border: 1.5px solid var(--border-subtle);
  color: #eef2ff;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}

.eq-pad:hover {
  border-color: var(--cyan);
  transform: translateY(-1px);
}

.eq-pad.active {
  border-color: var(--gold);
  background: linear-gradient(145deg, #2b1d0d, #191329);
  box-shadow: 0 0 16px rgba(255, 204, 0, 0.28);
}

.eq-pad-icon {
  font-size: 1.3rem;
}

.eq-pad strong {
  font-size: 0.78rem;
}

.eq-pad small {
  font-size: 0.66rem;
  color: var(--text-muted);
}

.tuner-speed-box {
  background: #0d101b;
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tuner-speed-head strong {
  font-size: 0.8rem;
  color: #ffffff;
}

.speed-chip-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.speed-chip {
  padding: 7px 6px;
  border-radius: 9px;
  border: 1.5px solid var(--border-subtle);
  background: #15192a;
  color: #dbe3ff;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.speed-chip:hover {
  border-color: var(--cyan);
}

.speed-chip.active {
  border-color: var(--gold);
  background: linear-gradient(145deg, #2b1d0d, #191329);
  color: #ffe680;
  box-shadow: 0 0 12px rgba(255, 204, 0, 0.25);
}

.tuner-tip-note {
  font-size: 0.71rem;
  line-height: 1.45;
  color: #8f98b8;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  padding: 8px 10px;
}

@media (max-width: 600px) {
  .preset-pad-grid,
  .speed-chip-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.qr-tools-row .btn:nth-child(6) { animation-delay: -4.5s; }

/* ==================== VIP PRO THEMES (VIBRANT & SOFT BACKGROUNDS + FLOWING BUTTONS) ==================== */
/* 1. Gold VIP (Vibrant) */
#room-view[data-pro-theme="gold"] {
  background: radial-gradient(circle at 20% 20%, #2a1f05 0%, #100d07 55%, #070604 100%);
}
#room-view[data-pro-theme="gold"] .rainbow-topbar,
#room-view[data-pro-theme="gold"] .qr-tools-row .btn,
#room-view[data-pro-theme="gold"] .btn-party,
#room-view[data-pro-theme="gold"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #b8860b, #ffcc00, #ff8c00, #ffe680, #b8860b);
  background-size: 300% 100%;
  animation: proFlowBg 5s ease infinite;
}
#room-view[data-pro-theme="gold"] .party-card::before {
  background: linear-gradient(135deg, #ffd700, #ff8c00, #fff0a8, #b8860b) !important;
}

/* 2. Cyberpunk (Vibrant) */
#room-view[data-pro-theme="cyber"] {
  background: radial-gradient(circle at 80% 15%, #2a0836 0%, #0d071c 55%, #050a14 100%);
}
#room-view[data-pro-theme="cyber"] .rainbow-topbar,
#room-view[data-pro-theme="cyber"] .qr-tools-row .btn,
#room-view[data-pro-theme="cyber"] .btn-party,
#room-view[data-pro-theme="cyber"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #ff007f, #9333ea, #00f5ff, #ff007f);
  background-size: 300% 100%;
  animation: proFlowBg 5s ease infinite;
}
#room-view[data-pro-theme="cyber"] .party-card::before {
  background: linear-gradient(135deg, #ff007f, #7c3aed, #00f5ff, #ff007f) !important;
}

/* 3. Neon Rave (Vibrant) */
#room-view[data-pro-theme="neonrave"] {
  background: radial-gradient(circle at 50% 0%, #330916 0%, #160711 55%, #09060c 100%);
}
#room-view[data-pro-theme="neonrave"] .rainbow-topbar,
#room-view[data-pro-theme="neonrave"] .qr-tools-row .btn,
#room-view[data-pro-theme="neonrave"] .btn-party,
#room-view[data-pro-theme="neonrave"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #ff0044, #ff6a00, #ffee00, #ff0099, #ff0044);
  background-size: 300% 100%;
  animation: proFlowBg 4.5s ease infinite;
}
#room-view[data-pro-theme="neonrave"] .party-card::before {
  background: linear-gradient(135deg, #ff0044, #ff6a00, #ffee00, #ff0099) !important;
}

/* 4. Sunset Glow (Vibrant) */
#room-view[data-pro-theme="sunset"] {
  background: radial-gradient(circle at 25% 10%, #351523 0%, #1b0e1e 55%, #0c0913 100%);
}
#room-view[data-pro-theme="sunset"] .rainbow-topbar,
#room-view[data-pro-theme="sunset"] .qr-tools-row .btn,
#room-view[data-pro-theme="sunset"] .btn-party,
#room-view[data-pro-theme="sunset"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #ff512f, #dd2476, #ff9966, #8e2de2, #ff512f);
  background-size: 300% 100%;
  animation: proFlowBg 6s ease infinite;
}
#room-view[data-pro-theme="sunset"] .party-card::before {
  background: linear-gradient(135deg, #ff512f, #dd2476, #ff9966, #8e2de2) !important;
}

/* 5. Matrix Neon (Vibrant) */
#room-view[data-pro-theme="emerald"] {
  background: radial-gradient(circle at 75% 20%, #062b1d 0%, #071410 55%, #040908 100%);
}
#room-view[data-pro-theme="emerald"] .rainbow-topbar,
#room-view[data-pro-theme="emerald"] .qr-tools-row .btn,
#room-view[data-pro-theme="emerald"] .btn-party,
#room-view[data-pro-theme="emerald"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #00c853, #00e676, #00e5ff, #1de9b6, #00c853);
  background-size: 300% 100%;
  animation: proFlowBg 5s ease infinite;
}
#room-view[data-pro-theme="emerald"] .party-card::before {
  background: linear-gradient(135deg, #00e676, #00e5ff, #1de9b6, #00c853) !important;
}

/* 6. Ocean Breeze (Soft) */
#room-view[data-pro-theme="ocean"] {
  background: radial-gradient(circle at 30% 15%, #0a2438 0%, #0b1624 55%, #070d16 100%);
}
#room-view[data-pro-theme="ocean"] .rainbow-topbar,
#room-view[data-pro-theme="ocean"] .qr-tools-row .btn,
#room-view[data-pro-theme="ocean"] .btn-party,
#room-view[data-pro-theme="ocean"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #0077b6, #00b4d8, #48cae4, #90e0ef, #0077b6);
  background-size: 300% 100%;
  animation: proFlowBg 6s ease infinite;
}
#room-view[data-pro-theme="ocean"] .party-card::before {
  background: linear-gradient(135deg, #48cae4, #00b4d8, #90e0ef, #0077b6) !important;
}

/* 7. Pastel Sakura (Soft) */
#room-view[data-pro-theme="pastel"] {
  background: radial-gradient(circle at 20% 20%, #2a1929 0%, #191322 55%, #110e18 100%);
}
#room-view[data-pro-theme="pastel"] .rainbow-topbar,
#room-view[data-pro-theme="pastel"] .qr-tools-row .btn,
#room-view[data-pro-theme="pastel"] .btn-party,
#room-view[data-pro-theme="pastel"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #f48fb1, #ce93d8, #90caf9, #f8bbd0, #f48fb1);
  background-size: 300% 100%;
  animation: proFlowBg 6.5s ease infinite;
}
#room-view[data-pro-theme="pastel"] .party-card::before {
  background: linear-gradient(135deg, #f48fb1, #ce93d8, #90caf9, #f8bbd0) !important;
}

/* 8. Lavender Mist (Soft) */
#room-view[data-pro-theme="lavender"] {
  background: radial-gradient(circle at 70% 15%, #231938 0%, #141124 55%, #0c0b16 100%);
}
#room-view[data-pro-theme="lavender"] .rainbow-topbar,
#room-view[data-pro-theme="lavender"] .qr-tools-row .btn,
#room-view[data-pro-theme="lavender"] .btn-party,
#room-view[data-pro-theme="lavender"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #7e57c2, #b39ddb, #80deea, #9575cd, #7e57c2);
  background-size: 300% 100%;
  animation: proFlowBg 6.5s ease infinite;
}
#room-view[data-pro-theme="lavender"] .party-card::before {
  background: linear-gradient(135deg, #b39ddb, #80deea, #9575cd, #7e57c2) !important;
}

/* 9. Matcha Cream (Soft) */
#room-view[data-pro-theme="matcha"] {
  background: radial-gradient(circle at 30% 20%, #17261c 0%, #101813 55%, #090e0b 100%);
}
#room-view[data-pro-theme="matcha"] .rainbow-topbar,
#room-view[data-pro-theme="matcha"] .qr-tools-row .btn,
#room-view[data-pro-theme="matcha"] .btn-party,
#room-view[data-pro-theme="matcha"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #66bb6a, #a5d6a7, #dce775, #81c784, #66bb6a);
  background-size: 300% 100%;
  animation: proFlowBg 6.5s ease infinite;
}
#room-view[data-pro-theme="matcha"] .party-card::before {
  background: linear-gradient(135deg, #a5d6a7, #dce775, #81c784, #66bb6a) !important;
}

/* 10. Midnight Minimal (Soft) */
#room-view[data-pro-theme="midnight"] {
  background: radial-gradient(circle at 50% 0%, #151c2e 0%, #0d111d 55%, #070910 100%);
}
#room-view[data-pro-theme="midnight"] .rainbow-topbar,
#room-view[data-pro-theme="midnight"] .qr-tools-row .btn,
#room-view[data-pro-theme="midnight"] .btn-party,
#room-view[data-pro-theme="midnight"] .btn-rainbow-pro {
  background: linear-gradient(90deg, #334155, #64748b, #94a3b8, #475569, #334155);
  background-size: 300% 100%;
  animation: proFlowBg 7s ease infinite;
}
#room-view[data-pro-theme="midnight"] .party-card::before {
  background: linear-gradient(135deg, #64748b, #94a3b8, #475569, #334155) !important;
}

@media (max-width: 600px) {
  .pro-grid,
  .pro-fields-grid,
  .aff-grid,
  .pay-qr-grid {
    grid-template-columns: 1fr;
  }
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}

/* ==================== TOASTS & STATUS ==================== */
.toast-container {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 32px));
}

.toast {
  background: #141724;
  border: 1.5px solid var(--cyan);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 11px;
  font-size: 0.84rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.75);
  animation: toastIn 0.2s ease;
}
.toast.error {
  border-color: var(--danger);
  background: #291019;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== LEGAL MODAL (TERMS / PRIVACY / CONTACT) ==================== */
.legal-modal-card {
  max-width: 520px;
  text-align: left;
  gap: 10px;
  max-height: 90vh;
  overflow-y: auto;
}

.legal-section {
  background: #141724;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.legal-section h4 {
  font-size: 0.84rem;
  color: var(--cyan);
}
.legal-section p {
  font-size: 0.76rem;
  line-height: 1.5;
  color: #cbd5f0;
}
.legal-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

/* ==================== COMPACT FLOATING MINI-PLAYER PILL BAR ==================== */
.mini-player-bar {
  position: fixed;
  top: 72px;
  right: 16px;
  left: auto;
  bottom: auto;
  transform: none;
  z-index: 65;
  display: flex;
  align-items: center;
  gap: 6px;
  width: min(340px, calc(100vw - 20px));
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  cursor: grab;
  background: rgba(12, 14, 24, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1.5px solid transparent;
  background-image:
    linear-gradient(rgba(12, 14, 24, 0.95), rgba(12, 14, 24, 0.95)),
    linear-gradient(90deg, var(--magenta), var(--gold), var(--cyan));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.78), 0 0 14px rgba(0, 229, 255, 0.16);
  animation: toastIn 0.2s ease;
}

.mini-player-bar.dragging {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.mini-drag-grip {
  color: #7d86a8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -1px;
  padding-left: 3px;
  cursor: grab;
  user-select: none;
  flex-shrink: 0;
}

.mini-track-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  background: #07080d;
}

.mini-track-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.mini-track-meta strong {
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-track-meta small {
  font-size: 0.62rem;
  color: var(--cyan);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.mini-ctrl-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: #1a1e30;
  color: #ffffff;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}
.mini-ctrl-btn:hover {
  transform: scale(1.06);
  border-color: var(--cyan);
  background: #252b44;
}
.mini-ctrl-btn.danger {
  background: #3d1220;
  border-color: #ff3b5c;
  color: #ffd4dc;
  font-weight: 800;
}
.mini-ctrl-btn.danger:hover {
  background: #ff2e55;
  border-color: #ff6b86;
  color: #ffffff;
}
.mini-progress-track {
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  pointer-events: none;
}
.mini-progress-fill {
  height: 100%;
  width: 0%;
  background: #ff0033;
  box-shadow: 0 0 8px rgba(255, 0, 51, 0.8);
  transition: width 0.4s linear;
}
.mini-ctrl-btn.muted {
  width: 24px;
  height: 24px;
  font-size: 0.68rem;
  background: transparent;
  border-color: transparent;
  color: #8b93b3;
}
.mini-ctrl-btn.muted:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-room-tabs {
  display: none;
}

.mobile-only-btn {
  display: none !important;
}

.black-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 9800;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.black-screen-inner {
  text-align: center;
  max-width: 88vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}
.black-screen-clock {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.2);
  font-variant-numeric: tabular-nums;
}
.black-screen-track {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.24);
  max-width: 80vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.black-screen-controls {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}
.black-ctrl-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.35);
  font-size: 1.05rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.black-ctrl-btn:active {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.75);
}
.black-screen-hint {
  margin-top: 18px;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.16);
}

.inapp-banner {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 75;
  width: calc(100vw - 16px);
  max-width: 520px;
  background: linear-gradient(120deg, #1b1230, #0d2130);
  border: 1px solid rgba(0, 229, 255, 0.55);
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  font-size: 0.74rem;
  color: #eef4ff;
}
.inapp-banner-text {
  line-height: 1.35;
  flex: 1;
}
.inapp-banner-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.inapp-close-btn {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #d7e0ff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.legal-section a {
  color: var(--cyan);
  text-decoration: underline;
}
.legal-data-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.legal-data-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.consent-banner {
  position: fixed;
  bottom: calc(10px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 75;
  width: calc(100vw - 20px);
  max-width: 640px;
  background: rgba(14, 17, 29, 0.97);
  border: 1px solid rgba(0, 229, 255, 0.45);
  border-radius: 14px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
  font-size: 0.76rem;
  line-height: 1.45;
  color: #dfe6ff;
}
.consent-text a,
.consent-link-btn {
  color: var(--cyan);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.consent-banner .btn {
  flex-shrink: 0;
}

.search-status {
  text-align: center;
  padding: 24px 14px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* ==================== RESPONSIVE (TABLET & MOBILE ONLY — DESKTOP UNTOUCHED) ==================== */
@media (max-width: 1024px) {
  #room-view.active {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: visible;
  }
  .rainbow-topbar {
    height: auto;
    padding: 10px 12px;
    flex-wrap: wrap;
    max-width: 100vw;
  }
  .topbar-search {
    order: 3;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    flex-basis: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .search-dropdown,
  .search-dropdown.mode-results {
    width: 100%;
    max-width: calc(100vw - 20px);
    left: 0;
    transform: none;
  }
  .host-cockpit {
    grid-template-columns: minmax(0, 1fr);
    height: auto;
    max-width: 100vw;
  }
  .cockpit-left,
  .cockpit-right,
  .party-card {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }
  .player-viewport {
    aspect-ratio: 16 / 9;
    flex: none;
    width: 100%;
  }
  .queue-card {
    max-height: 460px;
  }
}

@media (max-width: 720px) {
  #landing-view.active {
    align-items: flex-start;
    padding: calc(58px + env(safe-area-inset-top)) 12px calc(32px + env(safe-area-inset-bottom));
  }
  .landing-top-controls {
    top: calc(10px + env(safe-area-inset-top));
    left: 10px;
    right: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }
  .btn-install-hero {
    font-size: 0.76rem;
    padding: 6px 11px;
  }
  .landing-wrapper {
    max-width: 100%;
  }
  .hero {
    margin-bottom: 16px;
  }
  .brand-title {
    font-size: 2rem;
    gap: 8px;
  }
  .hero-sub {
    font-size: 0.84rem;
    line-height: 1.5;
    max-width: 310px;
  }
  .role-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  .role-card {
    padding: 16px;
    min-width: 0;
    max-width: 100%;
  }
  .inline-settings {
    gap: 8px;
  }
  .rainbow-topbar {
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
    gap: 7px;
    justify-content: space-between;
  }
  .rainbow-topbar {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 7px;
  }
  /* Mobile top bar = 3 tidy rows:
     1) logo + (install / PRO / lang / leave)  2) [dim mode] [QR]  3) search */
  .topbar-left {
    display: contents;
  }
  .logo-chip {
    order: 1;
    flex: 0 0 auto;
  }
  .topbar-right {
    order: 2;
    flex-wrap: nowrap;
    min-width: 0;
    margin-left: auto;
    gap: 4px;
  }
  .topbar-left .identity-pill {
    order: 3;
    flex: 1 1 100%;
    text-align: center;
  }
  .topbar-left .mobile-only-btn {
    order: 3;
    flex: 1 1 calc(50% - 4px);
    min-height: 32px;
    justify-content: center;
  }
  .topbar-search {
    order: 4;
  }
  .topbar-right .btn,
  .topbar-right .btn-install-topbar {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.7rem;
    border-radius: 8px;
    white-space: nowrap;
  }
  .topbar-right .pro-status-pill {
    padding: 3px 7px;
    font-size: 0.68rem;
  }
  #room-view .live-stats-pill,
  #room-view .logo-by {
    display: none;
  }
  .logo-chip {
    padding: 3px 9px;
  }
  .logo-mini {
    font-size: 1rem;
  }
  #room-view .yt-input-wrap input {
    padding: 6px 28px 6px 12px;
    font-size: 0.84rem;
  }
  #room-view .yt-search-submit {
    padding: 0 13px;
    font-size: 0.88rem;
  }
  .host-cockpit {
    padding: 8px 10px calc(24px + env(safe-area-inset-bottom));
    gap: 10px;
  }
  .mobile-room-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    background: #0d101b;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
  }
  .m-tab {
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 6px;
    border-radius: 9px;
    cursor: pointer;
    transition: all 0.16s ease;
  }
  .m-tab.active {
    background: linear-gradient(100deg, #281542, #12283d);
    color: #ffffff;
    border: 1px solid rgba(0, 229, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  }
  #room-view[data-mobile-tab="queue"] .qr-card,
  #room-view:not([data-mobile-tab]) .qr-card {
    display: none;
  }
  #room-view[data-mobile-tab="qr"] .queue-card {
    display: none;
  }
  .desktop-only-btn {
    display: none !important;
  }
  .mobile-only-btn {
    display: inline-flex !important;
  }
  .btn-black-screen-top,
  .btn-quick-qr-top {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    background: #0c0e17;
    color: #e2e8ff;
    border: 1px solid rgba(0, 229, 255, 0.45);
    white-space: nowrap;
  }
  .btn-quick-qr-top {
    border-color: rgba(255, 46, 151, 0.5);
  }
  .mini-drag-grip {
    display: none;
  }
  .mini-player-bar {
    display: none !important;
  }
  .vibe-bar {
    max-width: 100%;
  }
  .player-overlay {
    padding: 12px;
    gap: 6px;
  }
  .empty-wave {
    font-size: 1.8rem;
  }
  .player-overlay h3 {
    font-size: 1rem;
  }
  .player-overlay p {
    font-size: 0.76rem;
  }
  .preset-chip {
    padding: 4px 9px;
    font-size: 0.7rem;
  }
  .now-playing-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 9px 10px;
    gap: 8px;
  }
  .np-right {
    flex-direction: column;
    align-items: stretch;
    gap: 7px;
  }
  .reaction-strip {
    justify-content: space-between;
    width: 100%;
    gap: 5px;
  }
  .reaction-strip .react-btn {
    flex: 1;
    height: 34px;
  }
  .np-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .np-actions .btn {
    width: 100%;
    min-height: 36px;
    border-radius: 10px;
    font-size: 0.78rem;
    justify-content: center;
  }
  .qr-card,
  .queue-card {
    padding: 12px;
  }
  .queue-card {
    max-height: none;
    min-height: 260px;
  }
  .panel-header {
    flex-wrap: wrap;
    gap: 6px;
  }
  .qr-top-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .qr-box-sm {
    width: 124px;
    height: 124px;
  }
  .qr-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .qr-head-line {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 6px;
    margin-bottom: 6px;
  }
  .qr-head-line .tuner-pill-btn {
    flex: 1 1 100%;
    width: 100%;
    min-height: 34px;
    padding: 7px 12px;
    font-size: 0.78rem;
    margin-top: 2px;
  }
  .qr-url-link {
    max-width: 100%;
    text-align: center;
  }
  .qr-btn-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 6px;
  }
  .qr-btn-row .btn {
    width: 100%;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.76rem;
    border-radius: 10px;
    justify-content: center;
  }
  .qr-tools-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
  }
  .qr-tools-row .btn {
    flex: 1 1 calc(50% - 4px);
    width: auto;
    min-height: 36px;
    padding: 6px 8px;
    font-size: 0.76rem;
    border-radius: 10px;
    justify-content: center;
  }
  .qr-tools-row .btn-rainbow-pro {
    flex: 1 1 100%;
    padding: 8px 10px;
  }
  .yt-mv-row {
    gap: 8px;
    padding: 6px;
  }
  .yt-mv-thumb {
    width: 120px;
    height: 70px;
  }
  .yt-mv-title {
    font-size: 0.78rem;
  }
  .yt-mv-channel,
  .yt-mv-stats {
    font-size: 0.7rem;
  }
  .yt-mv-actions .btn-xs {
    padding: 4px 7px;
    font-size: 0.71rem;
  }
  .room-settings-box {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
  }
  .room-settings-box .settings-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
  }
  .room-settings-box .toggle-label.compact {
    background: var(--card-inner);
    border: 1px solid var(--border-subtle);
    border-radius: 9px;
    padding: 7px 8px;
    justify-content: center;
    font-size: 0.76rem;
  }
  .room-settings-box .dur-select-compact {
    width: 100% !important;
    min-height: 34px;
    padding: 6px 10px !important;
    font-size: 0.76rem !important;
  }
  .pro-room-controls:not(.hidden) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    margin-top: 7px;
  }
  .pro-room-controls .dur-select-compact {
    width: 100% !important;
    min-height: 34px;
    padding: 6px 8px !important;
    font-size: 0.74rem !important;
  }
  .modal-card {
    padding: 20px 16px;
  }
  .qr-box-lg {
    width: 200px;
    height: 200px;
  }
  .tv-hud {
    flex-wrap: wrap;
    padding: 8px 10px;
    gap: 8px;
  }
  .tv-ticker {
    flex-basis: 100%;
    order: 2;
  }
  #tv-next-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Very small phones: keep the top bar on one line (install is still available on the landing page) */
@media (max-width: 400px) {
  #room-view .btn-install-topbar {
    display: none !important;
  }
}

