/* SyncCinema — Ultra-Modern Dark Cinema UI Stylesheet (`public/style.css`) */


:root {
  --bg-cinema: #070a12;
  --bg-cinema-card: #111827;
  --bg-cinema-subtle: #162032;
  --bg-panel-glass: rgba(17, 24, 39, 0.82);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(99, 102, 241, 0.45);
  
  --primary-indigo: #6366f1;
  --primary-violet: #8b5cf6;
  --accent-pink: #ec4899;
  --accent-amber: #f59e0b;
  --accent-emerald: #10b981;
  --accent-cyan: #06b6d4;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
}

* {
  box-sizing: border-box;
}

/* Enforce Tailwind .hidden precedence against ID selectors */
.hidden {
  display: none !important;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-cinema);
  color: var(--text-primary);
  overflow-x: hidden;
  user-select: none;
}

/* Custom Sleek Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}

::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.35);
  border-radius: 9999px;
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.7);
}

/* Glassmorphism Styles */
.glass-panel {
  background: var(--bg-panel-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--border-glass);
}

.glass-card {
  background: rgba(22, 32, 50, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.6);
}

/* Backlight Ambilight Canvas */
#ambilight-canvas {
  position: absolute;
  top: -12%;
  left: -12%;
  width: 124%;
  height: 124%;
  filter: blur(65px);
  opacity: 0.82;
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#ambilight-canvas.off {
  opacity: 0 !important;
}

/* 16:9 Cinema Player Viewport with Strict Screen Constraint */
.video-viewport,
#player-container {
  position: relative;
  width: 100% !important;
  max-height: calc(100vh - 250px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background-color: #000;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.video-viewport iframe,
.video-viewport video,
#html5-player,
#yt-player {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  object-fit: contain !important;
  display: block;
}

/* Telestrator Drawing & Laser Overlay Canvas */
#drawing-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 25;
  pointer-events: none !important;
}

#drawing-canvas.active {
  pointer-events: auto !important;
  cursor: crosshair;
}

/* Telestrator Laser Pointer Dot */
.laser-dot {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ff0055;
  box-shadow: 0 0 14px 4px #ff0055, 0 0 24px 8px rgba(255, 0, 85, 0.8);
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 26;
  animation: laserPulse 0.8s infinite alternate;
}

@keyframes laserPulse {
  from { transform: translate(-50%, -50%) scale(0.9); }
  to { transform: translate(-50%, -50%) scale(1.2); }
}

/* Shared Subtitle Overlay */
#subtitle-overlay {
  position: absolute;
  bottom: 8%;
  left: 5%;
  right: 5%;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none !important;
  z-index: 20;
}

#subtitle-text {
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-size: clamp(14px, 2.1vw, 26px);
  font-weight: 700;
  line-height: 1.35;
  padding: 6px 18px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.8);
  max-width: 90%;
}

/* Snack Break Timer Overlay */
#snack-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 35;
}

#snack-overlay.hidden,
#autoplay-overlay.hidden,
#subtitle-overlay.hidden,
#empty-player-state.hidden,
#embed-player.hidden,
#mkv-audio-warning.hidden,
#modal-pin-prompt.hidden,
#modal-create-room.hidden,
#modal-profile.hidden,
#modal-auth.hidden,
#modal-vip.hidden,
#modal-admin.hidden,
#modal-create-poll.hidden,
#modal-settings.hidden,
.modal-backdrop.hidden,
[id^="modal-"].hidden {
  display: none !important;
}

#btn-toggle-proxy.active, #btn-toggle-proxy-mobile.active {
  background: rgba(99, 102, 241, 0.25) !important;
  color: #a5b4fc !important;
  border-color: rgba(99, 102, 241, 0.6) !important;
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.4) !important;
}

.snack-timer-pulse {
  animation: snackPulse 2s infinite ease-in-out;
}

@keyframes snackPulse {
  0%, 100% {
    box-shadow: 0 0 35px rgba(245, 158, 11, 0.25);
  }
  50% {
    box-shadow: 0 0 60px rgba(245, 158, 11, 0.5);
  }
}

/* Autoplay Blocked Recovery Overlay */
#autoplay-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}

/* Empty Cinema Stage Placeholder */
#empty-player-state {
  position: absolute;
  inset: 0;
  background: rgba(7, 10, 18, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

/* In-Video Action Toast Pill */
#action-toast {
  position: absolute;
  top: 18px;
  left: 20px;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#action-toast.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Floating Emoji Reactions */
#reactions-container {
  position: absolute;
  bottom: 12px;
  right: 20px;
  width: 140px;
  height: 280px;
  pointer-events: none !important;
  overflow: hidden;
  z-index: 28;
}

.floating-emoji {
  position: absolute;
  bottom: 0;
  font-size: 32px;
  animation: floatUpEmoji 2.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  pointer-events: none;
}

@keyframes floatUpEmoji {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.6) rotate(0deg);
  }
  15% {
    opacity: 1;
    transform: translateY(-20px) scale(1.25) rotate(-8deg);
  }
  75% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateY(-260px) scale(1) rotate(16deg);
  }
}

/* WebRTC Voice Chat Active Speaking Ring Pulse */
.speaking {
  position: relative;
}

.speaking::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  border: 2px solid #10b981;
  animation: speakingPulse 1.2s infinite ease-in-out;
  pointer-events: none;
}

@keyframes speakingPulse {
  0% {
    transform: scale(1);
    opacity: 0.9;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1.15);
    opacity: 0;
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Live Card Indicators */
.live-indicator {
  animation: livePing 1.8s infinite cubic-bezier(0, 0, 0.2, 1);
}

@keyframes livePing {
  75%, 100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Custom Sliders */
input[type="range"].custom-slider {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9999px;
  outline: none;
  height: 5px;
  transition: background 0.15s ease;
}

input[type="range"].custom-slider:hover {
  background: rgba(255, 255, 255, 0.2);
}

input[type="range"].custom-slider#progress-bar {
  background: transparent !important;
}

input[type="range"].custom-slider#progress-bar::-webkit-slider-runnable-track {
  background: transparent !important;
  border: none;
}

input[type="range"].custom-slider#progress-bar::-moz-range-track {
  background: transparent !important;
  border: none;
}

input[type="range"].custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary-indigo);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.85);
  cursor: pointer;
  transition: transform 0.1s ease;
}

input[type="range"].custom-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
}

/* Dual-Layer Video & Audio Buffer Bars on Timeline */
.timeline-track-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  pointer-events: none;
}

#video-buffer-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.22);
  transition: width 0.2s ease;
  pointer-events: none;
}

#audio-buffer-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.55), rgba(6, 182, 212, 0.75));
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

#playback-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  pointer-events: none;
}

/* Live Audio Buffer Readiness Pill */
#audio-buffer-pill.converting {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
  color: #fbbf24 !important;
}

#audio-buffer-pill.ready {
  background: rgba(16, 185, 129, 0.15) !important;
  border-color: rgba(16, 185, 129, 0.4) !important;
  color: #34d399 !important;
}

/* Custom Switch Toggle */
.switch-input:checked ~ .switch-track {
  background-color: #6366f1;
}

.switch-input:checked ~ .switch-thumb {
  transform: translateX(100%);
}

/* Chat Messages */
.chat-bubble-system {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  color: #c7d2fe;
}

.chat-bubble-self {
  background: #6366f1;
  color: #ffffff;
}

.chat-bubble-other {
  background: #1f2c44;
  color: #e2e8f0;
}

/* Modal Backdrop & Animations */
.modal-backdrop {
  background: rgba(4, 7, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.modal-content {
  animation: modalEnter 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Category Filter Pill Active State */
.category-pill.active {
  background: var(--primary-indigo);
  color: #ffffff;
  border-color: var(--primary-indigo);
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
}

/* Reaction Button Bounce */
.reaction-btn {
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reaction-btn:hover {
  transform: scale(1.35) translateY(-3px);
}

.reaction-btn:active {
  transform: scale(0.9);
}

/* Meme Soundboard Button */
.soundboard-btn {
  transition: all 0.15s ease;
}

.soundboard-btn:hover {
  border-color: rgba(236, 72, 153, 0.45);
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.2);
  transform: translateY(-1px);
}

.soundboard-btn:active {
  transform: scale(0.95);
}

/* Cinema Mode Expansion */
body.cinema-mode #room-sidebar {
  display: none !important;
}

/* Role Badges */
.role-badge {
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 5px;
  border-radius: 4px;
}

.role-owner {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.role-mod {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #818cf8;
}

/* Verified Check Badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.7));
}

.verified-pill {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
}

/* OTP Monospace 6-Digit Code Box */
.otp-input-field {
  letter-spacing: 0.5em;
  font-family: 'JetBrains Mono', monospace;
  text-align: center;
  font-size: 1.75rem;
  font-weight: 800;
}

/* Auth Modal Tabs */
.auth-tab.active {
  background: rgba(99, 102, 241, 0.18);
  border-color: rgba(99, 102, 241, 0.5);
  color: #ffffff;
}

/* 💎 VIP Supporter Badge & Animation */
.vip-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #ec4899, #8b5cf6, #3b82f6);
  background-size: 200% 200%;
  animation: vipShimmer 3s ease infinite;
  color: #ffffff;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 9999px;
  border: 1px solid rgba(236, 72, 153, 0.4);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.45);
}

@keyframes vipShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 🌈 Rainbow Neon Text for VIP Users */
.rainbow-neon-text {
  background: linear-gradient(90deg, #ff007f, #ffaa00, #00ffaa, #00aaff, #aa00ff, #ff007f);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  display: inline-block;
  animation: rainbowFlow 4s linear infinite;
  font-weight: 800 !important;
  filter: drop-shadow(0 0 6px rgba(255, 0, 127, 0.45));
}

@keyframes rainbowFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* 👑 Gold VIP Text */
.gold-neon-text {
  color: #fbbf24 !important;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.65), 0 0 20px rgba(245, 158, 11, 0.4);
  font-weight: 800 !important;
}

/* Live Polls Styling */
.poll-card {
  background: linear-gradient(135deg, rgba(22, 32, 50, 0.95), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(99, 102, 241, 0.35);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 0 15px rgba(99, 102, 241, 0.2);
}

.poll-option-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.poll-option-btn:hover {
  border-color: rgba(99, 102, 241, 0.6);
  transform: translateY(-1px);
}

.poll-progress-fill {
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 📱 MOBILE CINEMA RESPONSIVE LAYOUT (max-width: 768px)
   Sticky 16:9 Stage at Top + Scrollable Bottom Sidebar for Live Chat */
@media (max-width: 768px) {
  #room-view {
    height: 100vh !important;
    height: 100dvh !important;
    overflow: hidden !important;
  }

  #room-view > .flex-1 {
    display: flex !important;
    flex-direction: column !important;
    height: calc(100dvh - 56px) !important;
    overflow: hidden !important;
  }

  #video-stage-col {
    flex: 0 0 auto !important;
    width: 100% !important;
    max-height: 60%;
    padding: 0.25rem 0.5rem 0.5rem 0.5rem !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
    background: #070a12 !important;
    overflow-y: visible !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  #video-stage-col .relative.w-full.max-w-6xl {
    max-height: 40vh;
  }

  #player-container {
    aspect-ratio: 16 / 9 !important;
    max-height: 34vh !important;
    width: 100% !important;
  }

  #room-sidebar {
    flex: 1 1 0% !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .tab-panel {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }

  #chat-messages {
    flex: 1 1 0% !important;
    min-height: 0 !important;
    overflow-y: auto !important;
  }
}

/* 🎥 P2P Local Video Streaming Live Badge */
.p2p-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 9999px;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* Twitch & Vimeo Embed Wrappers */
#twitch-player, #vimeo-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* 🛡️ GLOBAL ADMIN ("GOD MODE") & COMMAND CENTER STYLING */

#modal-admin.hidden,
#global-announcement-banner.hidden {
  display: none !important;
}

/* Crimson-Gold Glowing Admin Badge */
.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #ef4444, #f59e0b, #dc2626);
  background-size: 200% 200%;
  animation: adminShimmer 2.5s ease infinite;
  color: #ffffff;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 1px 7px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 158, 11, 0.6);
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.6), 0 0 4px rgba(245, 158, 11, 0.8);
}

@keyframes adminShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Crimson Flame Neon Text for Admin Usernames */
.admin-neon-text {
  background: linear-gradient(90deg, #ff3333, #ffaa00, #ff0055, #ff3333);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
  display: inline-block;
  animation: adminFlame 3s linear infinite;
  font-weight: 900 !important;
  filter: drop-shadow(0 0 7px rgba(239, 68, 68, 0.7));
}

@keyframes adminFlame {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Screen Shake Effect */
@keyframes admin-screen-shake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  10% { transform: translate(-4px, -3px) rotate(-1deg); }
  20% { transform: translate(4px, 3px) rotate(1deg); }
  30% { transform: translate(-3px, 4px) rotate(0deg); }
  40% { transform: translate(3px, -4px) rotate(1deg); }
  50% { transform: translate(-4px, 2px) rotate(-1deg); }
  60% { transform: translate(4px, -2px) rotate(0deg); }
  70% { transform: translate(-2px, 3px) rotate(-1deg); }
  80% { transform: translate(2px, -3px) rotate(1deg); }
  90% { transform: translate(-1px, 2px) rotate(0deg); }
}

.admin-shake-active {
  animation: admin-screen-shake 0.8s ease-in-out infinite;
}

/* Global Announcement Styles */
.announcement-alert {
  background: linear-gradient(90deg, rgba(220, 38, 38, 0.95), rgba(153, 27, 27, 0.95)) !important;
  border-bottom: 2px solid #ef4444 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4) !important;
}

.announcement-event {
  background: linear-gradient(90deg, rgba(147, 51, 234, 0.95), rgba(219, 39, 119, 0.95)) !important;
  border-bottom: 2px solid #ec4899 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(219, 39, 119, 0.4) !important;
}

.announcement-info {
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(14, 165, 233, 0.95)) !important;
  border-bottom: 2px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 20px rgba(56, 189, 248, 0.4) !important;
}

.p2p-recovery { position:absolute; inset:0; z-index:70; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; padding:24px; background:rgba(7,10,18,.94); color:#e5e7eb; text-align:center; }
.p2p-recovery button,.p2p-stats-button { border:1px solid #ffffff26; border-radius:8px; background:#312e81; color:#e5e7eb; padding:8px 12px; font-size:12px; cursor:pointer; }
#host-view-dialog a { display:block; padding:12px; border-radius:8px; background:#312e81; color:#e5e7eb; text-align:center; }
.cinelite-overlay { position:absolute; inset:0; z-index:5; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:16px; background:#080c18; color:#e5e7eb; }
.cinelite-overlay[hidden] { display:none; }
.cinelite-overlay img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; opacity:.25; pointer-events:none; }
.cinelite-overlay p,.cinelite-overlay button { position:relative; }
.cinelite-overlay button { padding:12px 20px; border-radius:10px; background:#4f46e5; font-weight:600; min-height:44px; }
.cinelite-overlay.cinelite-recovery { inset:auto 12px 12px auto; width:min(360px,calc(100% - 24px)); padding:12px; gap:8px; border:1px solid #ffffff24; border-radius:12px; background:#101827ed; font-size:12px; text-align:center; }
#catalog-direct[open] { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; width:min(100%,420px); }
#catalog-direct summary,#catalog-direct input:first-of-type { grid-column:1/-1; }
#catalog-direct input,#catalog-direct select,#catalog-direct button { min-width:0; padding:8px; border-radius:8px; background:#182132; color:#e5e7eb; }
.p2p-stats { position:absolute; top:12px; right:12px; z-index:80; max-width:95%; padding:14px; border:1px solid #ffffff26; border-radius:12px; background:#070a12de; color:#a7f3d0; font:11px/1.7 monospace; white-space:pre-wrap; pointer-events:none; }
#sync-status-badge[data-state="recovering"],#sync-status-badge[data-state="connecting"],#sync-status-badge[data-state="waiting"],#sync-status-badge[data-state="buffering"] { color:#fbbf24; border-color:#f59e0b55; }
#player-stage:fullscreen { width:100%; max-width:none; height:100dvh; background:#070a12; padding:12px; justify-content:center; }
#player-stage:fullscreen #player-container { flex:1; min-height:0; max-height:calc(100dvh - 155px) !important; width:100%; }
#player-stage:fullscreen #html5-player { object-fit:contain; }
@media(max-width:768px) {
 #room-view { height:var(--visible-height,100dvh) !important; }
 #room-view > .flex-1 { height:auto !important; min-height:0; }
 #video-stage-col { max-height:55%; overflow-y:auto !important; position:relative !important; }
 #player-container { max-height:30dvh !important; }
 #player-stage { height:auto; }
 #btn-play-pause,#btn-fullscreen,#btn-pip,#btn-settings,#btn-volume { min-width:44px; min-height:44px; }
 #progress-bar { min-height:30px; touch-action:pan-y; }
 #volume-slider { min-height:30px; }
 #chat-input { font-size:16px; }
 #audio-buffer-pill { max-width:100%; white-space:normal; }
 #sync-status-badge { max-width:170px; font-size:10px; }
 #player-stage > div:has(#sync-status-badge) { flex-wrap:wrap; gap:6px; }
}

.hidden, .tab-panel.hidden, #room-sidebar.hidden { display:none !important; }
#personal-audio-controls[hidden], #personal-audio-controls [hidden] { display:none !important; }
.media-submit-desktop { display:none; min-width:0; }
.media-submit-desktop input { min-width:0; }
@media(min-width:768px){ .media-submit-desktop { display:block; } }
@media(max-width:768px){ #btn-settings-room,#btn-volume-mute {min-width:44px;min-height:44px;} }

/* Compact room UI: details are discoverable with mouse, keyboard and touch. */
#room-view { height:100dvh; display:flex; }
#room-view > .flex-1 { min-height:0; }
#video-stage-col { overflow-y:auto !important; overflow-x:hidden; min-height:0; }
#player-stage { height:auto; min-height:100%; justify-content:flex-start; gap:6px; padding-bottom:8px; }
#player-container { flex-shrink:0; min-height:160px; max-height:calc(100dvh - 310px); }
#room-view.theater-mode #player-stage { max-width:100%; }
#room-view.theater-mode #player-container { max-height:calc(100dvh - 270px); }
.minimal-icon { min-width:34px; min-height:34px; display:inline-flex; align-items:center; justify-content:center; gap:7px; border:1px solid #ffffff14; border-radius:10px; background:#ffffff08; color:#b6c2d6; cursor:pointer; padding:6px 9px; font-size:13px; }
.minimal-icon:hover,.minimal-icon:focus-visible { background:#6366f126; color:#e0e7ff; outline:2px solid #818cf8; outline-offset:2px; }
.minimal-icon::-webkit-details-marker { display:none; }
.minimal-icon::marker { content:''; }
.minimal-disclosure { position:relative; flex-shrink:0; }
.minimal-panel { display:none; position:absolute; right:0; top:calc(100% + 4px); width:min(360px,calc(100vw - 28px)); max-height:min(60dvh,440px); overflow:auto; padding:14px; border:1px solid #ffffff26; border-radius:14px; box-shadow:0 16px 40px #0009; background:#111827; z-index:95; color:#cbd5e1; font-size:12px; line-height:1.6; }
.minimal-panel h3 { color:#f1f5f9; font-weight:700; margin:0 0 10px; }
.minimal-disclosure[open] > .minimal-panel { display:flex; flex-direction:column; gap:10px; }
.minimal-disclosure[data-state="live"] > summary { color:#34d399; }
.minimal-disclosure[data-state="paused"] > summary { color:#c4b5fd; }
.minimal-disclosure[data-state="connecting"] > summary,.minimal-disclosure[data-state="recovering"] > summary,.minimal-disclosure[data-state="waiting"] > summary,.minimal-disclosure[data-state="buffering"] > summary,.minimal-disclosure[data-attention="true"] > summary { color:#fbbf24; }
.minimal-status-group { margin-left:auto; }
.minimal-tool-group { display:flex; gap:8px; align-items:center; flex-wrap:wrap; min-width:0; }
#room-tools .minimal-panel > button { width:100%; min-height:36px; justify-content:flex-start; }
#audio-details #mkv-audio-warning { position:static; inset:auto; padding:0; border:0; box-shadow:none; background:none; }
#audio-details #mkv-audio-warning > div { flex-wrap:wrap; }
#audio-details #mkv-audio-warning h4 { font-size:12px; }
#audio-details #mkv-audio-icon,#audio-details #mkv-autofix-badge,#audio-details #mkv-audio-desc,#audio-details #mkv-audio-warning > div:first-child > div:first-child > div:last-child > div > span { display:none !important; }
#audio-details #mkv-audio-buttons { width:100%; flex-wrap:wrap; justify-content:flex-start; }
#audio-details #audio-buffer-pill { border:0; padding:0; background:none; border-radius:0; flex-wrap:wrap; font-size:11px; }
#personal-audio-controls { display:flex; flex-direction:column; align-items:stretch; gap:10px; width:100%; }
#personal-audio-controls button,#personal-audio-track { min-height:36px; padding:7px 10px; border:1px solid #ffffff20; border-radius:8px; background:#162032; color:#e2e8f0; }
#personal-audio-status { color:#94a3b8; font-size:11px; }
.minimal-reactions { flex-wrap:wrap; gap:5px !important; min-width:0; }
.minimal-reactions > span { display:none; }
.reaction-btn { display:inline-flex; align-items:center; justify-content:center; width:36px; height:36px; line-height:1; font-size:23px; border-radius:9px; flex-shrink:0; }
.minimal-interactions { padding:6px 8px; }
.minimal-interactions .minimal-panel { top:auto; bottom:calc(100% + 4px); }
.minimal-drawing-tools { border:0; padding:0; flex-wrap:wrap; }
.minimal-soundboard-tools { padding:8px 0; background:none; border:0; }
.minimal-soundboard-tools > div { flex-wrap:wrap; }
.minimal-media-card { margin-top:0; position:relative; z-index:35; }
.minimal-status-group .minimal-panel { top:auto; bottom:calc(100% + 4px); }
.minimal-player-controls { margin-top:0; }
button:disabled,input:disabled,select:disabled { opacity:.4; cursor:not-allowed; }
.room-policy-panel { width:min(560px,100%); max-height:90dvh; overflow-y:auto; border-radius:20px; padding:20px; color:#e2e8f0; }
.room-policy-panel header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:16px; }
.room-policy-panel h2 { font-weight:800; font-size:18px; }
.room-policy-panel p { font-size:12px; color:#94a3b8; margin:8px 0; }
.room-policy-fields { display:flex; flex-direction:column; gap:8px; }
.room-policy-row { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; padding:8px 0; border-bottom:1px solid #ffffff0c; }
.room-policy-row select { background:#162032; color:#e2e8f0; border:1px solid #ffffff24; padding:8px; border-radius:8px; max-width:53%; }
.room-policy-panel button { padding:8px 12px; min-height:36px; border-radius:9px; background:#ffffff0c; border:1px solid #ffffff24; font-size:12px; }
.room-policy-panel footer { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.modal-content { max-height:calc(100dvh - 24px); overflow-y:auto; }
[id^="modal-"] button[id^="btn-close-"] { min-width:32px; min-height:32px; display:inline-flex; align-items:center; justify-content:center; }
#modal-settings label:has(.switch-input) { min-width:44px; min-height:44px; justify-content:center; }
@media (max-width:640px) {
  [id^="modal-"] button[id^="btn-close-"] { min-width:44px; min-height:44px; }
}
#room-policy-save { background:#4f46e5; color:white; }
#player-stage:fullscreen { position:relative; display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr) auto auto; row-gap:12px; width:100vw; height:100dvh; min-height:0; max-width:none; overflow:hidden; padding:0 12px 8px; background:#000; }
#player-stage:fullscreen #player-container { position:absolute; inset:0; width:100%; height:100%; min-height:0; max-height:none !important; aspect-ratio:auto; border-radius:0; border:0; }
#player-stage:fullscreen .minimal-media-card { position:absolute; top:0; left:0; right:0; z-index:85; border:0; border-radius:0; padding:12px 16px; background:linear-gradient(#000c,#0000); }
#player-stage:fullscreen .minimal-player-controls { position:relative; grid-row:2; bottom:auto; left:auto; right:auto; margin:0; z-index:85; }
#player-stage:fullscreen > .minimal-interaction-bar { position:relative; grid-row:3; bottom:auto; left:auto; right:auto; margin:0; z-index:86; }
#player-stage:fullscreen #ambilight-canvas { display:none; }
#player-stage:fullscreen .minimal-panel { max-height:65dvh; }
#player-stage:fullscreen .minimal-status-group .minimal-panel { top:calc(100% + 4px); bottom:auto; }
@media(max-width:768px) {
  #room-view > header { height:auto; min-height:56px; flex-wrap:wrap; padding:8px; gap:6px; }
  #room-view > header > div:first-child { min-width:0; flex-shrink:1; gap:6px; }
  #room-view > header > div:last-child { gap:4px; flex-wrap:wrap; }
  #room-name-badge,#btn-copy-code > .text-gray-500 { display:none; }
  #audio-details > .minimal-panel { right:-42px; }
  #player-stage { min-height:0; }
  #video-stage-col { max-height:60%; }
  #room-view.theater-mode #video-stage-col { max-height:none; flex:1 1 auto !important; }
  #player-container { max-height:35dvh !important; }
  .minimal-media-card { flex-direction:row; align-items:center; }
  .minimal-media-card > div:first-child { flex:1; min-width:0; }
  .minimal-media-card > div:first-child > div:first-child { display:none; }
  .minimal-media-card #now-playing-addedby { display:none; }
  .minimal-player-controls > div:last-child { gap:4px; flex-wrap:wrap; }
  .minimal-player-controls button,#btn-cinema-mode { min-width:38px; min-height:38px; }
  #volume-slider { width:50px; }
  .minimal-tool-group { gap:4px; }
  .minimal-interactions #room-tools > summary span { display:none; }
  .minimal-interactions { gap:4px; }
  #room-secondary-ribbon { padding:6px 8px; gap:6px; }
  #player-stage:fullscreen #player-container { max-height:none !important; }
}

/* Room polish: quiet status, top-layer menus, no dedicated empty tool ribbons. */
.minimal-disclosure[hidden],[data-room-category][hidden],#room-pin-row[hidden] { display:none !important; }
.minimal-panel:popover-open { display:flex; flex-direction:column; gap:10px; background:#111827; border:1px solid #ffffff26; color:#cbd5e1; box-shadow:0 18px 65px #000a; border-radius:14px; padding:14px; }
.minimal-panel { overscroll-behavior:contain; scrollbar-gutter:stable; }
.minimal-panel::backdrop { background:transparent; pointer-events:none; }
.local-file-queue { width:min(620px,calc(100vw - 24px)); max-height:min(80dvh,680px); padding:18px; border:1px solid #ffffff26; border-radius:16px; background:#101622; color:#e2e8f0; box-shadow:0 20px 80px #000a; }
.local-file-queue[open] { display:flex; flex-direction:column; gap:14px; }
.local-file-queue::backdrop { background:#0009; }
.local-file-queue header,.local-queue-actions,.local-file-queue button { display:flex; align-items:center; gap:8px; }
.local-file-queue header { justify-content:space-between; }
.local-file-queue h2 { font-size:16px; font-weight:700; }
.local-file-queue header,.local-queue-actions,.local-file-queue footer { flex-shrink:0; }
.local-file-queue button { justify-content:center; min-width:36px; min-height:36px; padding:7px 10px; border:1px solid #ffffff1a; border-radius:8px; background:#ffffff08; font-size:12px; }
.local-file-queue button:hover:enabled { background:#6366f133; }
.local-file-queue button:focus-visible { outline:2px solid #818cf8; outline-offset:2px; }
.local-file-queue button:disabled { opacity:.35; cursor:default; }
.local-queue-actions { flex-wrap:wrap; }
.local-queue-actions #local-queue-clear { margin-left:auto; }
#local-file-queue-list { list-style:none; margin:0; padding:0; overflow-y:auto; overscroll-behavior:contain; min-height:0; }
#local-file-queue-list li { display:grid; grid-template-columns:22px minmax(0,1fr) auto; gap:8px; align-items:center; padding:8px 4px; border-bottom:1px solid #ffffff0d; }
#local-file-queue-list li.is-current { background:#10b98112; }
#local-file-queue-list li.is-loading { background:#6366f112; }
.local-queue-number { font:11px monospace; color:#94a3b8; cursor:grab; }
.local-queue-name { font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.local-queue-row-actions { display:flex; gap:3px; }
.local-queue-status { font-size:12px; color:#94a3b8; }
.local-queue-status:empty { display:none; }
.local-file-queue footer p { margin-top:10px; font-size:11px; color:#94a3b8; }
.local-file-queue .local-queue-primary { background:#4f46e5; width:100%; }
@media (max-width:640px) {
  .local-file-queue { padding:12px; max-height:85dvh; }
  .local-file-queue button { min-height:44px; min-width:40px; padding:7px; }
  #local-file-queue-list li { grid-template-columns:16px minmax(0,1fr) auto; gap:4px; }
}
.minimal-panel button { min-height:38px; border-radius:9px; padding:8px 10px; white-space:normal; }
.minimal-panel button:hover { background-color:#6366f133; }
#room-tools .minimal-panel > button { display:flex; align-items:center; gap:10px; }
.minimal-drawing-tools { display:grid; grid-template-columns:1fr 1fr auto; gap:6px; }
.minimal-drawing-tools > span { display:none; }
.minimal-soundboard-tools > div { display:block; width:100%; }
.minimal-soundboard-tools > div > div { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:8px; }
#source-tools .minimal-tool-group { flex-direction:column; align-items:stretch; width:100%; }
#p2p-live-indicator { max-width:100%; }
#p2p-live-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#god-tools > summary { color:#fbbf24; }
#god-tools #room-admin-bar { display:flex; flex-direction:column; padding:0; margin:0; background:none; border:0; gap:14px; }
#god-tools #room-admin-bar > div { display:grid; grid-template-columns:1fr 1fr; width:100%; gap:6px; }
#god-tools #room-admin-bar > div > span { grid-column:1/-1; }
#god-tools #room-admin-bar .text-gray-500 { display:none; }
#god-tools #btn-admin-nuke-room { background:#ef444420; border-color:#ef444455; }
.minimal-player-controls > div:last-child > div:last-child { flex-wrap:wrap; justify-content:flex-end; }
.minimal-interactions { justify-content:center; background:transparent; border-color:transparent; box-shadow:none; }
.minimal-reactions { justify-content:center; }
#player-container { max-height:var(--stage-video-limit,calc(100dvh - 270px)) !important; }
#audio-buffer-pill { min-height:38px; line-height:1.6; }
#audio-buffer-pill .animate-pulse { animation:none; }
#audio-buffer-text { overflow-wrap:anywhere; }
#personal-audio-status:empty { display:none; }
.room-policy-panel { width:min(400px,100%); max-height:min(640px,calc(100dvh - 28px)); padding:16px; border-radius:18px; }
.room-policy-panel header { margin-bottom:8px; }
.room-policy-panel header p { display:none; }
.room-policy-panel #room-policy-access { font-size:11px; margin:4px 0 12px; }
.room-settings-tabs { display:flex; gap:4px; margin-bottom:12px; padding:4px; border-radius:10px; background:#ffffff05; }
.room-settings-tabs button { flex:1; padding:7px 4px; border:0; min-height:32px; font-size:11px; background:transparent; }
.room-settings-tabs button[aria-pressed="true"] { background:#4f46e5; color:white; }
.room-settings-body { min-height:210px; max-height:350px; overflow-y:auto; padding-right:4px; }
.room-policy-fields { display:contents; }
.room-policy-row { padding:6px 0; }
.room-policy-row select { font-size:11px; padding:7px 5px; max-width:51%; }
.room-general-fields { display:grid; gap:12px; }
.room-general-fields label { display:grid; gap:6px; color:#cbd5e1; font-size:12px; }
.room-general-fields input,.room-general-fields select { min-height:36px; border:1px solid #ffffff20; background:#162032; color:#e2e8f0; border-radius:8px; padding:8px; width:100%; }
.room-defaults-panel button { width:100%; margin-top:8px; }
.room-policy-panel .room-policy-note { font-size:10px; line-height:1.5; }
.room-policy-panel footer { margin-top:8px; justify-content:flex-end; }
.admin-directory-search { width:100%; background:#162032; border:1px solid #ffffff20; border-radius:9px; padding:10px; color:#e2e8f0; font-size:12px; margin-bottom:10px; }
#admin-users-tbody td { padding:10px; font-size:12px; }
#admin-users-tbody td:last-child { min-width:200px; }
.admin-role-button { padding:5px 8px; border:1px solid #ffffff20; border-radius:7px; background:#ffffff08; margin:2px; font-size:11px; }
.admin-role-button[aria-pressed="true"] { color:#c4b5fd; background:#6366f11f; }
#chat-messages { overflow-wrap:anywhere; overflow-x:hidden; }
#admin-vip-codes-list small { font-size:9px; opacity:.65; margin-left:6px; }
@media(max-width:768px){
 #video-stage-col { max-height:70%; }
 #player-container { max-height:var(--stage-video-limit,35dvh) !important; }
 .minimal-player-controls > div:last-child { align-items:flex-start; }
 #player-stage:fullscreen #player-container { max-height:none !important; }
}

@media(max-width:767px){
  #mobile-room-menu-panel > button { width:100%; justify-content:center; }
  #mobile-playback-menu-panel { flex-direction:row; flex-wrap:wrap; align-items:center; gap:10px; }
  #mobile-playback-menu-panel > h3 { width:100%; }
  #mobile-playback-menu-panel select { min-height:44px; }
  .minimal-player-controls > div:last-child { flex-wrap:nowrap; align-items:center; gap:6px; }
  .minimal-player-controls > div:last-child > div:last-child { flex-wrap:nowrap; }
  .minimal-player-controls #volume-slider { width:48px; }
  .minimal-player-controls button,.minimal-player-controls summary { min-width:44px; min-height:44px; }
  .minimal-interactions { padding:0; }
  #mobile-reactions-menu-panel .minimal-reactions { display:flex; gap:8px; }
  #mobile-reactions-menu-panel .reaction-btn { min-width:44px; min-height:44px; }
  #mobile-room-menu > summary,#mobile-reactions-menu > summary { min-width:44px; min-height:44px; }
}

@media(max-width:359px){.minimal-player-controls #volume-slider{width:30px}.minimal-player-controls > div:last-child > div:first-child{gap:4px}}
