:root {
  --bg-main: #09090b;
  --bg-surface: #111114;
  --bg-surface-elevated: #18181b;
  --bg-hover: #27272a;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.04);
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #ffffff;
  --accent-hover: #e4e4e7;
  --accent-glow: rgba(255, 255, 255, 0.15);
  --success: #22c55e;
  --warning: #eab308;
  --danger: #ef4444;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  height: 100vh;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==========================================================================
   Minimalist Navigation Bar
   ========================================================================== */

.navbar {
  height: 48px;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  color: #000000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.host-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  margin-left: 6px;
}

.host-status-badge.online {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
  background-color: rgba(34, 197, 94, 0.06);
}

.host-status-badge.offline {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
  background-color: rgba(239, 68, 68, 0.06);
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #71717a;
  display: inline-block;
}

.host-status-badge.online .status-indicator-dot {
  background-color: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.host-status-badge.offline .status-indicator-dot {
  background-color: #ef4444;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-surface-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.nav-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-btn.active {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.party-btn {
  position: relative;
}

.party-btn.in-room {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.party-pulse-dot {
  width: 6px;
  height: 6px;
  background-color: #22c55e;
  border-radius: 50%;
  animation: pulseDot 1.5s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ==========================================================================
   Main Layout & Full Screen Coverage
   ========================================================================== */

.main-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  flex: 1;
  height: calc(100vh - 48px);
  overflow: hidden;
  transition: grid-template-columns 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Collapsed state: Video takes 100% full screen width */
.main-layout.sidebar-collapsed {
  grid-template-columns: 1fr 0px;
}

/* Player Section */
.player-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000000;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.video-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000000;
  overflow: hidden;
}

#mediaVideo {
  width: 100%;
  height: 100%;
  max-height: calc(100vh - 48px);
  object-fit: contain;
  background-color: #000000;
}

/* Mouse Idle Auto-hide for controls and title */
.video-wrapper.idle {
  cursor: none;
}

.video-wrapper.idle .player-controls {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.video-wrapper.idle .video-title-overlay {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}

/* Video Overlay Loader */
.video-overlay-loader {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  z-index: 15;
  font-size: 0.82rem;
  color: var(--text-secondary);
  backdrop-filter: blur(4px);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Big Play Overlay Button */
.big-play-btn {
  position: absolute;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s;
  z-index: 8;
}

.big-play-btn:hover {
  transform: scale(1.08);
  background: rgba(255, 255, 255, 0.25);
}

/* Notification Toast */
.player-toast {
  position: absolute;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 20, 0.92);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  color: #fafafa;
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
  z-index: 20;
}

.player-toast.show {
  opacity: 1;
}

/* Floating Video Title Overlay (Top Left) */
.video-title-overlay {
  position: absolute;
  top: 18px;
  left: 24px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.video-title-text {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
  max-width: 50vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Modern Floating Bottom Video Controls
   ========================================================================== */

.player-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 12;
  padding: 32px 24px 18px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 60%, transparent 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Seek / Progress Bar */
.progress-bar-container {
  position: relative;
  width: 100%;
  height: 16px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 4px;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  overflow: visible;
  transition: height 0.15s ease;
}

.progress-bar-container:hover .progress-track {
  height: 6px;
}

.progress-buffered {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
  width: 0%;
}

.progress-played {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background-color: #ffffff;
  border-radius: 2px;
  width: 0%;
}

.progress-scrubber {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 12px;
  height: 12px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
}

.progress-bar-container:hover .progress-scrubber {
  opacity: 1;
}

.progress-hover-time {
  position: absolute;
  bottom: 20px;
  background-color: rgba(18, 18, 20, 0.95);
  border: 1px solid var(--border-color);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  color: #fff;
  pointer-events: none;
  display: none;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
}

/* Controls Buttons Row */
.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.controls-left, .controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.control-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

.control-btn:hover {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.volume-container {
  display: flex;
  align-items: center;
  gap: 4px;
}

.volume-slider {
  width: 65px;
  accent-color: #ffffff;
  cursor: pointer;
  height: 4px;
}

.time-display {
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-secondary);
  padding: 0 6px;
  white-space: nowrap;
}

.time-separator {
  margin: 0 3px;
  opacity: 0.5;
}

/* Selectors (Audio, Subtitles, Speed) */
.track-selector-group, .speed-selector-group {
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  backdrop-filter: blur(8px);
}

.select-dropdown {
  background-color: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 0.78rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  max-width: 180px;
}

.select-dropdown option {
  background-color: var(--bg-surface);
  color: var(--text-primary);
}

.speed-dropdown {
  max-width: 60px;
}

/* Badges */
.meta-badges {
  display: flex;
  align-items: center;
  gap: 5px;
}

.badge {
  font-size: 0.68rem;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.badge-format {
  color: #e4e4e7;
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-res {
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.25);
  background-color: rgba(52, 211, 153, 0.08);
}

.badge-codec {
  color: #a1a1aa;
}

/* ==========================================================================
   Collapsible Library Sidebar
   ========================================================================== */

.sidebar-container {
  width: 340px;
  min-width: 340px;
  background-color: var(--bg-surface);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.main-layout.sidebar-collapsed .sidebar-container {
  width: 0;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  border-left: none;
}

.sidebar-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

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

.count-badge {
  font-size: 0.7rem;
  background-color: var(--bg-surface-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.sidebar-action-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.sidebar-action-btn:hover {
  background-color: var(--bg-hover);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background-color: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  gap: 6px;
}

.search-box input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.8rem;
  width: 100%;
  outline: none;
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.clear-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1rem;
  cursor: pointer;
}

/* Media List Items */
.media-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.media-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.media-card:hover {
  background-color: var(--bg-hover);
  border-color: rgba(255, 255, 255, 0.18);
}

.media-card.active {
  border-color: rgba(255, 255, 255, 0.35);
  background-color: rgba(255, 255, 255, 0.08);
}

.media-card-icon {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  background-color: var(--bg-main);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.media-card.active .media-card-icon {
  background-color: #ffffff;
  color: #000000;
}

.media-card-details {
  flex: 1;
  min-width: 0;
}

.media-card-title {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.media-card-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 4px 0;
}

.media-card-pills {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pill {
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 3px;
  background-color: var(--bg-main);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.pill-mkv {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e4e4e7;
}

.loading-state, .empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
}

/* ==========================================================================
   Watch Party & Video Call Overlay Styles
   ========================================================================== */

.party-call-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 240px;
  background: rgba(18, 18, 20, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  z-index: 25;
  user-select: none;
  transition: border-color 0.2s ease;
}

.party-call-overlay.speaking {
  border-color: #22c55e;
}

.party-call-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  cursor: grab;
}

.party-call-header:active {
  cursor: grabbing;
}

.party-call-user {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.voice-wave {
  width: 6px;
  height: 6px;
  background-color: var(--text-muted);
  border-radius: 50%;
  transition: all 0.2s;
}

.party-call-overlay.speaking .voice-wave {
  background-color: #22c55e;
  box-shadow: 0 0 6px #22c55e;
}

.party-call-actions {
  display: flex;
  align-items: center;
  gap: 3px;
}

.call-action-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.call-action-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.party-call-body, .party-call-videos {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  overflow: hidden;
}

#remoteVideo, .remote-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#localVideo, .local-video {
  position: absolute;
  bottom: 6px;
  right: 6px;
  width: 60px;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  z-index: 2;
  background: #111;
}

.remote-placeholder, .video-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.72rem;
  background: #09090b;
}

.party-buffering-toast {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 18, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #f4f4f5;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 20;
}

.spinner-sm {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ==========================================================================
   Watch Party Modal
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-card {
  width: 90%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-surface-elevated);
}

.modal-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 1.4rem;
}

.modal-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 1px;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s;
}

.modal-close-btn:hover {
  color: var(--text-primary);
}

.modal-body {
  padding: 20px;
}

.modal-tabs {
  display: flex;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 16px;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  padding: 7px 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn.active {
  background: #ffffff;
  color: #000000;
}

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

.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.form-input {
  width: 100%;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

.form-input:focus {
  border-color: rgba(255, 255, 255, 0.4);
}

.input-with-action {
  display: flex;
  gap: 6px;
}

.small-action-btn {
  background: var(--bg-hover);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
}

.small-action-btn:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: #ffffff;
  color: #000000;
}

.primary-btn {
  width: 100%;
  background: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  color: #000000;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  margin-top: 6px;
}

.primary-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Connected Party View */
.party-status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.party-status-indicator {
  position: relative;
  width: 12px;
  height: 12px;
}

.status-pulse-ring {
  position: absolute;
  inset: -3px;
  border: 2px solid #22c55e;
  border-radius: 50%;
  animation: pulseDot 1.6s infinite;
}

.status-pulse-dot {
  position: absolute;
  inset: 0;
  background: #22c55e;
  border-radius: 50%;
}

.status-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.status-subtitle {
  font-size: 0.78rem;
  color: #4ade80;
  margin-top: 1px;
}

.code-highlight {
  background: var(--bg-surface-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  color: #fafafa;
}

.share-invite-box {
  margin-bottom: 16px;
}

.share-invite-box label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.qr-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.qr-display {
  padding: 8px;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.party-call-actions-row {
  display: flex;
  gap: 10px;
}

.video-call-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #22c55e;
  border: none;
  border-radius: var(--radius-sm);
  color: #000000;
  font-weight: 600;
  padding: 10px 14px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: opacity 0.15s;
}

.video-call-btn:hover {
  opacity: 0.9;
}

.leave-party-btn {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #f87171;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}

.leave-party-btn:hover {
  background: #ef4444;
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-container {
    position: fixed;
    top: 48px;
    right: 0;
    bottom: 0;
    width: 300px;
    min-width: 300px;
    z-index: 50;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.6);
    transform: translateX(0);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }
  .main-layout.sidebar-collapsed .sidebar-container {
    transform: translateX(100%);
    width: 300px;
    min-width: 300px;
    opacity: 1;
    pointer-events: none;
  }
  .track-selector-group, .speed-selector-group {
    display: none;
  }
  .video-title-overlay {
    top: 12px;
    left: 12px;
  }
}
