/* ============================================
   DRAGON PLAYLIST v6 - Medieval Video Sync Platform
   Home Page, Rooms, Guests, Context Menus
   ============================================ */

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

:root {
  --gold: #d4a824;
  --gold-light: #f0d050;
  --gold-dark: #a07810;
  --gold-glow: rgba(212, 168, 36, 0.4);
  --gold-subtle: rgba(212, 168, 36, 0.1);

  --ember: #ff6b35;
  --ember-dark: #c44536;
  --ember-glow: rgba(255, 107, 53, 0.3);
  --dragon-red: #8b0000;

  --online: #4ade80;
  --online-glow: rgba(74, 222, 128, 0.4);
  --offline: #6b7280;
  --away: #fbbf24;

  --bg-darkest: #060606;
  --bg-dark: #0a0a0a;
  --bg-medium: #111111;
  --bg-light: #181818;
  --bg-lighter: #222222;
  --bg-hover: #2a2a2a;

  --text-primary: #f5ede0;
  --text-secondary: #a89880;
  --text-muted: #605545;

  --border-color: #252015;
  --border-light: #352a1a;
  --border-focus: var(--gold);

  --success: #22c55e;
  --success-dark: #166534;
  --error: #ef4444;
  --error-dark: #991b1b;
  --warning: #f59e0b;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px var(--gold-glow);
  --shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.3);

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-full: 9999px;

  --transition-fast: 0.12s ease;
  --transition-normal: 0.2s ease;
  --transition-slow: 0.35s ease;
}

/* Theme: Dragon Gold (Default) */
[data-theme="gold"] {
  --gold: #d4a824;
  --gold-light: #f0d050;
  --gold-dark: #a07810;
  --gold-glow: rgba(212, 168, 36, 0.4);
  --gold-subtle: rgba(212, 168, 36, 0.1);
}

/* Theme: Ember Red */
[data-theme="ember"] {
  --gold: #ef4444;
  --gold-light: #f87171;
  --gold-dark: #b91c1c;
  --gold-glow: rgba(239, 68, 68, 0.4);
  --gold-subtle: rgba(239, 68, 68, 0.1);
}

/* Theme: Forest Green */
[data-theme="forest"] {
  --gold: #22c55e;
  --gold-light: #4ade80;
  --gold-dark: #16a34a;
  --gold-glow: rgba(34, 197, 94, 0.4);
  --gold-subtle: rgba(34, 197, 94, 0.1);
}

/* Theme: Ocean Blue */
[data-theme="ocean"] {
  --gold: #3b82f6;
  --gold-light: #60a5fa;
  --gold-dark: #2563eb;
  --gold-glow: rgba(59, 130, 246, 0.4);
  --gold-subtle: rgba(59, 130, 246, 0.1);
}

/* Theme: Royal Purple */
[data-theme="purple"] {
  --gold: #a855f7;
  --gold-light: #c084fc;
  --gold-dark: #9333ea;
  --gold-glow: rgba(168, 85, 247, 0.4);
  --gold-subtle: rgba(168, 85, 247, 0.1);
}

/* Theme: Sunset Orange */
[data-theme="sunset"] {
  --gold: #f97316;
  --gold-light: #fb923c;
  --gold-dark: #ea580c;
  --gold-glow: rgba(249, 115, 22, 0.4);
  --gold-subtle: rgba(249, 115, 22, 0.1);
}

/* Theme: Rose Pink */
[data-theme="rose"] {
  --gold: #ec4899;
  --gold-light: #f472b6;
  --gold-dark: #db2777;
  --gold-glow: rgba(236, 72, 153, 0.4);
  --gold-subtle: rgba(236, 72, 153, 0.1);
}

/* Theme: Cyan */
[data-theme="cyan"] {
  --gold: #06b6d4;
  --gold-light: #22d3ee;
  --gold-dark: #0891b2;
  --gold-glow: rgba(6, 182, 212, 0.4);
  --gold-subtle: rgba(6, 182, 212, 0.1);
}

html,
body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Crimson Text', Georgia, serif;
  background: var(--bg-darkest);
  color: var(--text-primary);
  line-height: 1.5;
}

#app {
  height: 100%;
}

/* ============================================
     Scrollbar
     ============================================ */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold-dark);
}

/* ============================================
     Icon Buttons
     ============================================ */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 14px;
}

.icon-btn:hover {
  background: var(--bg-hover);
  border-color: var(--gold-dark);
  color: var(--gold);
}

.icon-btn.sm {
  width: 26px;
  height: 26px;
  font-size: 12px;
}

.icon-btn.lg {
  width: 38px;
  height: 38px;
  font-size: 16px;
}

.icon-btn.primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-color: var(--gold);
  color: var(--bg-darkest);
}

.icon-btn.primary:hover {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  box-shadow: var(--shadow-glow);
}

.icon-btn.danger:hover {
  background: var(--error-dark);
  border-color: var(--error);
  color: white;
}

/* ============================================
     Standard Buttons
     ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-hover);
  border-color: var(--border-light);
}

.btn.primary {
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  border: none;
  color: var(--bg-darkest);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  box-shadow: var(--shadow-glow);
}

.btn.secondary {
  background: transparent;
  border-color: var(--gold-dark);
  color: var(--gold);
}

.btn.secondary:hover {
  background: var(--gold-subtle);
}

.btn.danger {
  background: var(--error-dark);
  border-color: var(--error);
  color: white;
}

.btn.danger:hover {
  background: var(--error);
}

.btn.ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 8px 12px;
}

.btn.ghost:hover {
  color: var(--gold);
  background: var(--gold-subtle);
}

.btn.sm {
  padding: 6px 12px;
  font-size: 11px;
}

.btn.lg {
  padding: 14px 28px;
  font-size: 15px;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================
     SVG Icons
     ============================================ */
.icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.icon.sm {
  width: 14px;
  height: 14px;
}
.icon.lg {
  width: 20px;
  height: 20px;
}
.icon.xl {
  width: 24px;
  height: 24px;
}

/* ============================================
     Loading Screen
     ============================================ */
.loading-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  height: 100%;
  background: radial-gradient(
    ellipse at center,
    var(--bg-medium) 0%,
    var(--bg-darkest) 100%
  );
}

.loading-dragon {
  font-size: 64px;
  animation: breathe 2s ease-in-out infinite;
  filter: drop-shadow(0 0 30px var(--ember));
}

.loading-text {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--gold);
  margin-top: 20px;
  letter-spacing: 0.2em;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ============================================
     Dragon Fire Particles - OPTIMIZED
     ============================================ */
.dragon-fire-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  content-visibility: auto;
  will-change: auto;
  isolation: isolate;
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.ember {
  position: absolute;
  bottom: -10px;
  width: 3px;
  height: 3px;
  background: var(--ember);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--ember), 0 0 12px var(--ember-dark);
  will-change: transform, opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
  contain: layout style;
  animation: rise linear infinite;
}

@keyframes rise {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate3d(0, -120px, 0) scale(0);
    opacity: 0;
  }
}

/* ============================================
     Auth Screen
     ============================================ */
.auth-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
      ellipse at top,
      rgba(212, 168, 36, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(ellipse at bottom, rgba(139, 0, 0, 0.1) 0%, transparent 50%),
    var(--bg-darkest);
  padding: 24px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.auth-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 30l15-15v30L30 30zM15 15l15 15-15 15V15z' fill='%23d4a824' fill-opacity='0.015'/%3E%3C/svg%3E");
  pointer-events: none;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 10;
}

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

.logo-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 20px var(--ember-glow));
}

.logo {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 30px var(--gold-glow);
  letter-spacing: 0.12em;
  margin: 0;
}

.tagline {
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  margin-top: 8px;
}

.auth-box {
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 10;
}

.auth-box h2 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 0.08em;
}

/* Form Inputs */
.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Crimson Text', serif;
  font-size: 15px;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast);
  outline: none;
  position: relative;
  z-index: 1;
}

.input-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

/* Messages */
.error-message,
.success-message {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.error-message {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid var(--error-dark);
  color: #fca5a5;
}

.success-message {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid var(--success-dark);
  color: #86efac;
}

/* Auth Buttons */
.auth-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
  border: none;
  border-radius: var(--radius-md);
  color: var(--bg-darkest);
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.auth-submit:hover {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
  box-shadow: var(--shadow-glow);
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* Google Button */
.google-btn {
  width: 100%;
  padding: 12px;
  background: white;
  border: 1px solid #dadce0;
  border-radius: var(--radius-md);
  color: #3c4043;
  font-family: 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all var(--transition-fast);
}

.google-btn:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.google-btn svg {
  width: 18px;
  height: 18px;
}

/* Auth Links */
.auth-links {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.auth-links span {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-links button {
  background: none;
  border: none;
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 14px;
  cursor: pointer;
  margin-left: 6px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-links button:hover {
  color: var(--gold-light);
}

/* ============================================
     Dashboard
     ============================================ */
.dashboard {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-darkest);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

/* Room Loading Overlay */
.room-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-darkest);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.room-loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loading-flames {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 60px;
}

.loading-flame {
  width: 12px;
  background: linear-gradient(to top, var(--ember), var(--gold), #fff8dc);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  animation: flameLoad 0.8s ease-in-out infinite;
}

.loading-flame:nth-child(1) { height: 30px; }
.loading-flame:nth-child(2) { height: 45px; }
.loading-flame:nth-child(3) { height: 55px; }
.loading-flame:nth-child(4) { height: 45px; }
.loading-flame:nth-child(5) { height: 30px; }

@keyframes flameLoad {
  0%, 100% { 
    transform: scaleY(1) scaleX(1);
    opacity: 0.8;
  }
  50% { 
    transform: scaleY(1.3) scaleX(0.9);
    opacity: 1;
  }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 14px;
  letter-spacing: 1px;
}

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

.dashboard-header,
.dashboard-content,
.sidebar,
.main-content,
.queue-panel,
.video-section {
  position: relative;
  z-index: 1;
}

/* Header */
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-medium);
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-small {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.logo-small .dragon-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 10px var(--ember-glow));
}

.home-header .logo-small {
  font-size: 18px;
}

.home-header .logo-small .dragon-icon {
  font-size: 28px;
}

.header-center {
  flex: 1;
  max-width: 600px;
}

.url-bar {
  display: flex;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.url-bar:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.url-bar input {
  flex: 1;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.url-bar input::placeholder {
  color: var(--text-muted);
}

.url-bar .icon-btn {
  border: none;
  border-left: 1px solid var(--border-color);
  border-radius: 0;
  height: auto;
  width: 42px;
}

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

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.user-menu:hover {
  border-color: var(--border-light);
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--bg-darkest);
  font-weight: 600;
}

.user-name {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--gold);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Room Title */
.room-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.room-title.editable {
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.room-title.editable:hover {
  opacity: 0.8;
}

.room-title-input {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold);
  background: var(--bg-dark);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  width: 200px;
  outline: none;
}

/* Dashboard Content */
.dashboard-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ============================================
     Sidebar
     ============================================ */
.sidebar {
  width: 260px;
  background: var(--bg-medium);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: all var(--transition-normal);
}

.sidebar.closed {
  margin-left: -260px;
  opacity: 0;
}

/* Sidebar overlay - hidden on desktop, shown on mobile */
.sidebar-overlay {
  display: none;
}

/* Sidebar close button - hidden on desktop, shown on mobile */
.sidebar-close-btn {
  display: none;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.create-playlist-form {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--gold-subtle);
}

.create-playlist-form input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 8px;
  outline: none;
}

.create-playlist-form input:focus {
  border-color: var(--gold);
}

.form-actions {
  display: flex;
  gap: 6px;
}

.form-actions .btn {
  flex: 1;
  padding: 6px;
  font-size: 11px;
}

.playlists-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}

.empty-playlists {
  padding: 24px 14px;
  text-align: center;
  color: var(--text-muted);
}

.empty-playlists p {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  margin-bottom: 4px;
}

/* Playlist Items */
.playlist-item {
  display: flex;
  align-items: center;
  margin: 2px 6px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.playlist-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.playlist-item.active {
  background: var(--gold-subtle);
  border-color: var(--gold);
}

.playlist-item.hidden-playlist {
  opacity: 0.6;
}

.playlist-item.hidden-playlist .playlist-name {
  font-style: italic;
}

.hidden-indicator {
  color: var(--text-muted);
  margin-right: 4px;
  display: flex;
  align-items: center;
}

.sidebar-header .header-actions {
  display: flex;
  gap: 4px;
}

.playlist-item .drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding: 2px;
  margin-right: 6px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.playlist-item:hover .drag-handle {
  opacity: 1;
}

.playlist-select {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  min-width: 0;
  padding: 0;
}

.playlist-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.playlist-count {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.playlist-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.playlist-item:hover .playlist-actions {
  opacity: 1;
}

.playlist-edit-input {
  flex: 1;
  padding: 6px 10px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

/* ============================================
     Main Content
     ============================================ */
.main-content {
  flex: 1;
  display: flex;
  overflow: hidden;
  min-width: 0;
  background: var(--bg-darkest);
}

/* Queue Panel */
.queue-panel {
  width: 380px;
  display: flex;
  flex-direction: column;
  background: var(--bg-medium);
  border-right: 1px solid var(--border-color);
  flex-shrink: 0;
}

.queue-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(17, 17, 17, 0.95);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Hide close button on desktop */
.queue-close-btn {
  display: none;
}

/* Hide queue overlay on desktop */
.queue-overlay {
  display: none;
}

.queue-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.02em;
}

.video-list {
  flex: 1;
  overflow-y: auto;
}

/* Video Items */
.video-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.2s ease;
  cursor: pointer;
}

.video-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.video-item.playing {
  background: var(--gold-subtle);
  border-left: 3px solid var(--gold);
  padding-left: 11px;
}

.video-item.dragging {
  opacity: 0.5;
}

.video-item.drag-over {
  background: var(--gold-subtle);
  border-top: 2px solid var(--gold);
}

.video-item-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.video-item .drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding: 2px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.video-item:hover .drag-handle {
  opacity: 1;
}

.video-index {
  min-width: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}

.video-thumbnail {
  width: 36px;
  height: 27px;
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity var(--transition-fast);
}

.video-thumbnail:hover {
  opacity: 0.8;
}

.video-thumbnail.placeholder {
  background: var(--bg-lighter);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 10px;
}

.video-title {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
}

.video-url {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 26px;
}

/* Video actions */
.video-actions {
  display: none;
  gap: 4px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-color);
}

.video-item:hover .video-actions {
  display: flex;
}

.video-actions .icon-btn {
  flex: 1;
}

.empty-videos,
.no-playlist-selected,
.empty-queue {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--text-muted);
  text-align: center;
}

.empty-icon {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.4;
}

/* ============================================
     Video Section
     ============================================ */
.video-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}

.video-container {
  flex: 1;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.video-frame {
  width: 100%;
  flex: 1;
  min-height: 400px;
  height: 400px;
  border: none;
  border-radius: var(--radius-sm);
  background: #000;
  position: relative;
  overflow: hidden;
}

.video-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  border: none;
  border-radius: var(--radius-sm);
}

.video-placeholder {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    ellipse at center,
    var(--bg-medium) 0%,
    var(--bg-dark) 100%
  );
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.dragon-logo {
  font-size: 64px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px var(--ember-glow));
}

.video-placeholder h2 {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  color: var(--gold);
  margin-bottom: 8px;
}

.video-placeholder p {
  font-size: 14px;
  color: var(--text-muted);
}

.video-error {
  width: 100%;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: var(--error);
  border-radius: var(--radius-sm);
}

/* Uploaded File Player Styles */
.uploaded-player {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #0a0a12 0%, #12121f 40%, #1a1520 100%);
  position: relative;
  overflow: hidden;
}

.uploaded-player::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(ellipse at 50% 100%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 30% 80%, rgba(255, 69, 0, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 140, 0, 0.1) 0%, transparent 40%);
  pointer-events: none;
  animation: flameGlow 3s ease-in-out infinite alternate;
}

@keyframes flameGlow {
  0% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Audio Player */
.audio-player {
  gap: 0;
  padding: 0;
  justify-content: flex-end;
}

/* Flame Visualizer - Full Width */
.flame-visualizer-container {
  width: 100%;
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  z-index: 1;
  padding: 20px 20px 0 20px;
  box-sizing: border-box;
}

.flame-visualizer-canvas {
  width: 100%;
  height: 100%;
  max-height: 250px;
  filter: drop-shadow(0 0 30px rgba(255, 107, 53, 0.6));
}

/* Ember glow at base */
.flame-visualizer-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 20px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 53, 0.8) 0%, transparent 70%);
  filter: blur(10px);
}

/* Audio Controls */
.audio-controls-wrapper {
  width: 100%;
  padding: 15px 30px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  z-index: 2;
  box-sizing: border-box;
}

.custom-audio-player {
  width: 100%;
  height: 40px;
  border-radius: 8px;
  outline: none;
}

/* Track Info at Bottom */
.audio-track-info {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 30px;
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(255, 107, 53, 0.2);
  z-index: 2;
  box-sizing: border-box;
}

.track-title {
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 15px;
}

.track-format {
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--ember) 0%, var(--gold) 100%);
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 1px;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Legacy styles for video badge */
.file-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2) 0%, rgba(255, 69, 0, 0.1) 100%);
  border: 1px solid rgba(255, 107, 53, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.2);
}

.file-badge.small {
  padding: 4px 10px;
  font-size: 11px;
}

.file-icon {
  font-size: 16px;
}

.file-type {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* Style audio player for WebKit browsers */
.custom-audio-player::-webkit-media-controls-panel {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(138, 43, 226, 0.2));
}

/* Video Player Wrapper */
.video-player-wrapper {
  position: relative;
}

.uploaded-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

.video-overlay-info {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.video-player-wrapper:hover .video-overlay-info {
  opacity: 1;
}

/* Upload Button Styles */
.icon-btn.uploading {
  opacity: 0.7;
  cursor: wait;
}

.upload-spinner {
  animation: spin 1s linear infinite;
  display: inline-block;
}

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

/* Playback Controls */
.playback-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  flex-shrink: 0;
}

.playback-toggles {
  display: flex;
  gap: 4px;
}

.playback-toggles .icon-btn.toggle {
  opacity: 0.5;
  transition: all var(--transition-fast);
}

.playback-toggles .icon-btn.toggle:hover {
  opacity: 0.8;
}

.playback-toggles .icon-btn.toggle.active {
  opacity: 1;
  color: var(--gold);
  background: var(--gold-subtle);
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--text-muted);
}

.volume-slider {
  width: 80px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--gold);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.now-playing {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.playing-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.playing-title {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 14px;
  color: var(--gold);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================
     Connected Users
     ============================================ */
.connected-users-section {
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  flex-shrink: 0;
  margin-top: 8px;
}

.connected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-light);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.connected-header h4 {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.online-count {
  font-size: 11px;
  color: var(--text-muted);
}

.online-count .count {
  color: var(--online);
  font-weight: 600;
}

.users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 12px;
  min-height: 40px;
  max-height: 100px;
  overflow-y: auto;
}

.no-users {
  padding: 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  width: 100%;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(20, 20, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.user-badge:hover {
  background: rgba(40, 40, 40, 0.9);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.user-badge.offline {
  opacity: 0.5;
}

.user-badge.is-you {
  border-color: var(--gold-dark);
  background: rgba(212, 168, 36, 0.12);
}

.user-badge.is-owner {
  border-color: var(--gold);
  background: linear-gradient(
    135deg,
    rgba(212, 168, 36, 0.18) 0%,
    rgba(212, 168, 36, 0.08) 100%
  );
}

.user-badge.is-owner.is-you {
  background: linear-gradient(
    135deg,
    rgba(212, 168, 36, 0.28) 0%,
    rgba(212, 168, 36, 0.12) 100%
  );
  box-shadow: 0 0 12px var(--gold-glow);
}

.owner-crown {
  font-size: 12px;
  margin-right: -2px;
  filter: drop-shadow(0 0 3px rgba(255, 215, 0, 0.6));
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.online {
  background: var(--online);
  box-shadow: 0 0 6px var(--online-glow);
  animation: statusPulse 2s ease-in-out infinite;
}

.status-indicator.offline {
  background: var(--offline);
}

.status-indicator.away {
  background: var(--away);
}

@keyframes statusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.user-badge .badge-name {
  color: var(--text-primary);
  font-weight: 500;
}

.user-badge.is-you .badge-name {
  color: var(--gold);
}

.user-badge[style*='background'] .badge-name {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.you-tag {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.8;
}

.guest-tag-badge {
  font-size: 9px;
  color: var(--text-muted);
  margin-left: 2px;
  opacity: 0.7;
}

.offline-divider {
  width: 100%;
  padding: 6px 12px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

/* ============================================
     Modals
     ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s;
  backdrop-filter: blur(4px);
}

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

.modal {
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  position: relative;
  animation: slideUp 0.2s;
  box-shadow: var(--shadow-lg);
  isolation: isolate;
  z-index: 1001;
}

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

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
  transition: color var(--transition-fast);
}

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

/* Mobile panel header - shown on both desktop and mobile */
.mobile-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
}

.mobile-panel-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold);
  margin: 0;
}

/* Hide mobile close button on desktop */
.mobile-panel-close {
  display: none;
}

.mobile-panel-content {
  padding: 20px;
}

/* Hide default modal-close when using mobile-panel-header */
.mobile-panel .modal-close {
  display: none;
}

.modal h2 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 8px;
}

.modal p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.modal-input-group {
  margin-bottom: 16px;
}

.modal-input-group label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.modal-input-group input {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  position: relative;
  z-index: 1;
}

.modal-input-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.modal-input-group input:disabled {
  opacity: 0.5;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

/* Settings Modal */
.settings-modal {
  max-width: 480px;
}

/* Desktop settings modal - hide on mobile */
.desktop-settings-modal {
  display: block;
}

/* Desktop share modal - hide on mobile */
.desktop-share-modal {
  display: block;
}

.share-modal {
  max-width: 450px;
}

.share-modal h2 {
  margin-bottom: 12px;
}

.share-modal p {
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.share-modal .share-link-box {
  display: flex;
  gap: 8px;
}

.share-modal .share-link-box input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 13px;
}

@media (max-width: 768px) {
  .desktop-settings-modal {
    display: none !important;
  }
  .desktop-share-modal {
    display: none !important;
  }
}

.settings-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.settings-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-family: 'Cinzel', serif;
  font-size: 12px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.settings-tab:hover {
  background: var(--bg-hover);
}

.settings-tab.active {
  background: var(--gold-subtle);
  color: var(--gold);
}

.settings-content {
  padding-top: 4px;
}

/* Danger Zone */
.danger-zone {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--error-dark);
}

.danger-zone h3 {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--error);
  margin-bottom: 12px;
}

.danger-zone p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* Theme Selector */
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.theme-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  background: var(--bg-dark);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-option:hover {
  border-color: var(--border-light);
  background: var(--bg-light);
}

.theme-option.active {
  border-color: var(--gold);
  background: var(--gold-subtle);
}

.theme-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.theme-name {
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.theme-option.active .theme-name {
  color: var(--gold);
  font-weight: 600;
}

/* Share Modal */
.share-link-box {
  display: flex;
  gap: 8px;
}

.share-link-box input {
  flex: 1;
  padding: 10px 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: monospace;
  font-size: 13px;
}

/* Guest Modal */
.guest-modal {
  text-align: center;
  max-width: 360px;
}

.guest-modal-icon {
  font-size: 64px;
  margin-bottom: 16px;
}

.guest-modal h2 {
  margin-bottom: 8px;
}

.guest-modal p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

.guest-modal .modal-input-group {
  margin-bottom: 16px;
}

.guest-modal .modal-input-group input {
  text-align: center;
  font-size: 16px;
}

.guest-modal-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
}

.guest-modal-divider::before,
.guest-modal-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

/* ============================================
     Import Playlist Modal
     ============================================ */
.import-modal {
  max-width: 500px;
}

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

.import-modal .modal-header h2 {
  margin: 0;
}

.import-modal .modal-body {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.import-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.import-loading,
.import-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.import-empty .text-muted {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.import-help {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.import-rooms-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.import-room {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.import-room-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--bg-dark);
  transition: background var(--transition-fast);
}

.import-room-header:hover {
  background: var(--bg-hover);
}

.import-room-header.expanded {
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-hover);
}

.import-room-name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-primary);
}

.import-room-count {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  background: var(--bg-lighter);
  border-radius: 10px;
}

.import-room-arrow {
  font-size: 12px;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

.import-playlists {
  background: var(--bg-darkest);
  padding: 6px;
}

.import-playlists-empty {
  padding: 16px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

.import-playlist-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.import-playlist-item:hover {
  background: var(--bg-hover);
}

.import-playlist-item.selected {
  background: var(--gold-subtle);
  border-color: var(--gold);
}

.import-playlist-name {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

.import-playlist-videos {
  font-size: 11px;
  color: var(--text-muted);
}

.import-playlist-check {
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
}

/* Import Options Dropdown */
.import-btn-container {
  position: relative;
}

.import-options-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 4px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  min-width: 180px;
  overflow: hidden;
}

.import-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.import-option:hover {
  background: var(--bg-hover);
  color: var(--gold);
}

.import-option:last-child {
  border-bottom: none;
}

/* ============================================
     User Menu Dropdown
     ============================================ */
.user-menu-container {
  position: relative;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 200;
  animation: fadeIn 0.15s;
}

.dropdown-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-header .name {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  color: var(--gold);
}

.dropdown-header .email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-all;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--bg-hover);
}

.dropdown-item.danger {
  color: var(--error);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

/* ============================================
     Context Menu - FIXED z-index
     ============================================ */
.context-menu {
  position: fixed !important;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  min-width: 160px;
  z-index: 10000 !important;
  overflow: hidden;
  animation: fadeIn 0.1s;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.context-menu-item:hover {
  background: var(--bg-hover);
}

.context-menu-item.danger {
  color: var(--error);
}

.context-menu-item.danger:hover {
  background: rgba(220, 53, 69, 0.1);
}

/* ============================================
     Notification
     ============================================ */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 16px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  animation: slideIn 0.2s, slideOut 0.2s 2.8s;
  z-index: 1001;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.success {
  border-left: 4px solid var(--success);
}
.notification.error {
  border-left: 4px solid var(--error);
}
.notification.warning {
  border-left: 4px solid var(--warning);
}
.notification.info {
  border-left: 4px solid var(--primary);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Hidden */
.hidden {
  display: none !important;
}

/* ============================================
     Home Page
     ============================================ */
.home-page {
  min-height: 100%;
  background: radial-gradient(
      ellipse at 30% 0%,
      rgba(212, 168, 36, 0.06) 0%,
      transparent 40%
    ),
    radial-gradient(
      ellipse at 70% 100%,
      rgba(139, 0, 0, 0.08) 0%,
      transparent 40%
    ),
    linear-gradient(180deg, #050505 0%, #080808 50%, #060606 100%);
  position: relative;
  overflow: auto;
  isolation: isolate;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(212, 168, 36, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.home-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 50px 24px 80px;
  position: relative;
  z-index: 1;
}

.home-welcome {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.home-welcome h1 {
  font-family: 'Cinzel', serif;
  font-size: 38px;
  color: var(--gold);
  margin-bottom: 12px;
  text-shadow: 0 0 60px var(--gold-glow);
  letter-spacing: 0.03em;
  position: relative;
}

.home-welcome p {
  color: var(--text-muted);
  font-size: 16px;
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
}

.rooms-section {
  background: linear-gradient(
    160deg,
    rgba(20, 18, 14, 0.95) 0%,
    rgba(10, 10, 10, 0.98) 100%
  );
  border: 1px solid rgba(212, 168, 36, 0.12);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.rooms-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rooms-header h2 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.02em;
}

.create-room-form {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  padding: 18px;
  background: linear-gradient(
    135deg,
    rgba(212, 168, 36, 0.06) 0%,
    rgba(212, 168, 36, 0.02) 100%
  );
  border: 1px dashed rgba(212, 168, 36, 0.25);
  border-radius: 14px;
}

.create-room-form input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 15px;
  outline: none;
  transition: all var(--transition-fast);
}

.create-room-form input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-subtle);
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.room-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(
    150deg,
    rgba(30, 27, 22, 0.95) 0%,
    rgba(15, 14, 12, 0.98) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.room-card:hover {
  border-color: rgba(212, 168, 36, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 168, 36, 0.08);
}

.room-card-content {
  position: relative;
  padding: 22px;
  z-index: 1;
}

.room-card-content h3 {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--text-primary);
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-card-content h3::before {
  content: '🐉';
  font-size: 16px;
}

.room-edit-input {
  width: 100%;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--gold);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 16px;
  outline: none;
}

.room-card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.room-card-actions .btn.primary {
  flex: 1;
}

/* Guest badge */
.guest-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.guest-name {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--text-primary);
}

.guest-tag {
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
     Responsive - Tablet
     ============================================ */
@media (max-width: 1024px) {
  .header-center {
    max-width: 300px;
  }
  .queue-panel {
    width: 320px;
  }
  .sidebar {
    width: 240px;
  }
}

@media (max-width: 900px) {
  .header-center {
    max-width: 280px;
  }
  .queue-panel {
    width: 280px;
  }
}

/* ============================================
     Responsive - Mobile (768px and below)
     ============================================ */
@media (max-width: 768px) {
  /* Header adjustments */
  .dashboard-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
    min-height: 52px;
  }

  .header-left {
    flex: 0 0 auto;
  }

  .header-center {
    order: 3;
    flex: 100%;
    max-width: none;
    margin-top: 4px;
  }

  .header-right {
    flex: 0 0 auto;
    gap: 6px;
  }

  .header-right .theme-select {
    display: none;
  }

  /* Room name in header */
  .room-name-display {
    font-size: 14px;
  }

  /* Sidebar - slide up panel on mobile (like queue) */
  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px; /* Above mobile nav */
    top: auto;
    width: 100%;
    height: 70vh;
    max-height: 70vh;
    z-index: 200;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.7);
    transform: translateY(0); /* Visible when open (no .closed class) */
    transition: transform 0.3s ease;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-top: 1px solid var(--border-color);
    border-right: none;
    margin-left: 0;
    opacity: 1;
  }

  /* Hidden when closed */
  .sidebar.closed {
    transform: translateY(100%);
    margin-left: 0;
    opacity: 1;
  }

  /* Drag handle indicator at top of slide-up panel */
  .sidebar::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 8px auto;
  }

  /* Add padding to playlist items */
  .sidebar .playlists-list {
    padding-top: 8px;
    padding-bottom: 20px;
    max-height: calc(70vh - 120px);
    overflow-y: auto;
  }

  .sidebar .sidebar-header {
    padding: 8px 16px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
  }

  .sidebar .sidebar-header h3 {
    font-size: 15px;
  }

  /* Close button for sidebar */
  .sidebar-close-btn {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
  }

  /* Sidebar overlay when open */
  .sidebar-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 56px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 199;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .sidebar-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Main content - stack vertically */
  .main-content {
    flex-direction: column;
    height: calc(100dvh - 52px - 56px); /* Use dvh for dynamic viewport (accounts for mobile browser chrome) */
    height: calc(100vh - 52px - 56px); /* Fallback for older browsers */
    padding-bottom: 0;
  }

  @supports (height: 100dvh) {
    .main-content {
      height: calc(100dvh - 52px - 56px);
    }
  }

  /* Queue panel - hidden by default on mobile, shown as slide-up panel */
  .queue-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px; /* Above mobile nav */
    top: auto;
    width: 100%;
    height: 70vh;
    max-height: 70vh;
    min-height: auto;
    border-right: none;
    border-top: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: var(--bg-medium);
    z-index: 150;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .queue-panel.mobile-open {
    transform: translateY(0);
  }

  /* Drag handle indicator at top of slide-up panel */
  .queue-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 8px auto;
  }

  .queue-header {
    padding: 8px 16px 12px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .queue-header h3 {
    font-size: 15px;
  }

  .queue-close-btn {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
  }

  .queue-panel .video-list {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
    gap: 8px;
    -webkit-overflow-scrolling: touch;
    max-height: calc(70vh - 80px);
  }

  .queue-panel .video-item {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: column;
    padding: 12px;
    scroll-snap-align: none;
    min-height: 70px;
  }

  .queue-panel .video-item-top {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .queue-panel .video-item .video-thumbnail {
    width: 100px;
    height: 56px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    object-fit: cover;
  }

  .queue-panel .video-item .video-title {
    font-size: 14px;
    line-height: 1.3;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .queue-panel .video-item .video-index {
    font-size: 12px;
  }

  .queue-panel .video-item .drag-handle {
    opacity: 1;
    padding: 8px;
  }

  /* Queue overlay when panel is open */
  .queue-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 56px;
    background: rgba(0, 0, 0, 0.5);
    z-index: 149;
  }

  .queue-overlay.visible {
    display: block;
  }

  /* Mobile slide-up panels for Share, Settings, Auth */
  .mobile-panel-overlay {
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-end;
    padding: 0;
  }

  .mobile-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    margin: 0 !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    animation: mobileSlideUp 0.3s ease;
    padding-bottom: env(safe-area-inset-bottom, 20px) !important;
  }

  @keyframes mobileSlideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .mobile-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 8px auto;
  }

  .mobile-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border-color);
  }

  .mobile-panel-header h2 {
    font-size: 16px;
    margin: 0;
  }

  .mobile-panel-close {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
  }

  .mobile-panel-content {
    padding: 16px;
  }

  /* Hide desktop modal elements on mobile panels */
  .mobile-panel .modal-close {
    display: none;
  }

  /* Share panel specific */
  .share-panel .mobile-panel-content p {
    margin-bottom: 16px;
    color: var(--text-secondary);
  }

  .share-panel .share-link-box {
    flex-direction: column;
    gap: 12px;
  }

  .share-panel .share-link-box input {
    width: 100%;
    font-size: 14px;
  }

  .share-panel .share-link-box .btn {
    width: 100%;
  }

  /* Settings panel specific */
  .settings-modal.mobile-panel {
    max-height: 80vh !important;
    overflow-y: auto;
  }

  .settings-modal.mobile-panel .settings-tabs {
    display: flex;
    overflow-x: auto;
    padding: 8px 12px;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .settings-modal.mobile-panel .settings-tab {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 12px;
  }

  .settings-modal.mobile-panel .settings-content {
    padding: 16px;
  }

  /* Auth panel specific */
  .auth-modal-in-room.mobile-panel {
    max-height: 90vh !important;
  }

  .auth-modal-in-room.mobile-panel .auth-embedded {
    padding: 16px;
  }

  .auth-modal-in-room.mobile-panel .auth-embedded h2 {
    display: none; /* Hide since we have header */
  }

  .auth-modal-in-room.mobile-panel .auth-subtitle {
    margin-top: 0;
  }

  /* Video section - takes remaining space */
  .video-section {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .video-container {
    flex: 1;
    min-height: 200px;
  }

  .video-frame {
    min-height: 180px;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  /* Video controls - larger touch targets */
  .video-controls {
    padding: 12px;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .video-controls .icon-btn {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .video-controls .control-group {
    gap: 8px;
  }

  /* Playback controls */
  .playback-controls {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .playback-controls .icon-btn {
    width: 48px;
    height: 48px;
  }

  .volume-control {
    padding: 0 8px;
  }

  .volume-slider {
    width: 100px;
  }

  /* Connected users - hidden on mobile (shown in slide-up panel) */
  .connected-users {
    display: none;
  }

  /* Playlist panel adjustments */
  .playlist-panel {
    height: 100%;
  }

  .playlist-header {
    padding: 12px;
  }

  .playlist-header h3 {
    font-size: 14px;
  }

  .playlist-item {
    padding: 12px;
    min-height: 48px;
  }

  .video-item {
    padding: 10px 12px;
    min-height: 44px;
  }

  .video-item .drag-handle {
    opacity: 1;
    padding: 8px;
  }

  /* Modals - full screen on mobile */
  .modal-overlay {
    padding: 0;
  }

  .modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
    margin: 0;
  }

  .modal-header {
    padding: 16px;
    position: sticky;
    top: 0;
    background: var(--bg-medium);
    z-index: 10;
  }

  .modal-body {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-actions {
    padding: 16px;
    position: sticky;
    bottom: 0;
    background: var(--bg-medium);
    border-top: 1px solid var(--border-color);
  }

  /* Smaller modals - not full screen */
  .modal.sm {
    width: 90%;
    max-width: 400px;
    height: auto;
    max-height: 90vh;
    border-radius: var(--radius-lg);
    margin: auto;
  }

  /* Input fields - larger for touch */
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS zoom */
    padding: 12px;
    min-height: 48px;
  }

  /* Buttons - larger touch targets */
  .btn {
    padding: 12px 20px;
    min-height: 44px;
    font-size: 14px;
  }

  .btn.sm {
    padding: 10px 16px;
    min-height: 40px;
  }

  .icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* Context menus - bottom sheet style */
  .context-menu {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding-bottom: env(safe-area-inset-bottom, 20px);
    animation: slideUp 0.25s ease;
  }

  @keyframes slideUp {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  .context-menu-item {
    padding: 16px 20px;
    font-size: 15px;
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  /* Dropdown menus */
  .user-dropdown {
    position: fixed;
    right: 8px;
    top: auto;
    bottom: 60px;
    width: calc(100% - 16px);
    max-width: 320px;
  }

  /* Home page adjustments */
  .home-content {
    padding: 16px;
  }

  .rooms-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .room-card {
    padding: 16px;
  }

  .hero-section {
    padding: 30px 16px;
  }

  .hero-section h1 {
    font-size: 1.8rem;
  }

  .hero-section p {
    font-size: 14px;
  }

  /* Auth page */
  .auth-container {
    padding: 16px;
  }

  .auth-box {
    padding: 24px 20px;
    width: 100%;
    max-width: 100%;
  }

  /* Hide decorative elements on mobile */
  .dragon-fire-container {
    display: none;
  }

  /* Notification toast */
  .notification {
    left: 16px;
    right: 16px;
    bottom: 20px;
    transform: none;
    max-width: none;
  }

  /* Settings panel */
  .settings-section {
    padding: 16px;
  }

  .settings-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Add video form */
  .add-video-form {
    flex-direction: column;
    gap: 8px;
  }

  .add-video-form input {
    width: 100%;
  }

  .add-video-form .btn {
    width: 100%;
  }
}

/* ============================================
     Responsive - Small Mobile (480px and below)
     ============================================ */
@media (max-width: 480px) {
  .dashboard-header {
    padding: 6px 10px;
  }

  .header-left .logo {
    font-size: 18px;
  }

  .header-center {
    margin-top: 6px;
  }

  .queue-panel {
    max-height: 110px;
  }

  .queue-item {
    width: 100px;
  }

  .queue-item .queue-thumb {
    height: 56px;
  }

  .video-controls {
    padding: 8px;
  }

  .video-controls .icon-btn {
    width: 40px;
    height: 40px;
  }

  .sidebar {
    width: 100%;
  }

  .connected-user {
    padding: 4px 8px;
    font-size: 12px;
  }

  .user-avatar {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .modal-header h2 {
    font-size: 18px;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
  }
}

/* ============================================
     Landscape Mode on Mobile
     ============================================ */
@media (max-width: 900px) and (orientation: landscape) {
  .main-content {
    flex-direction: row;
  }

  .queue-panel {
    width: 180px;
    height: 100%;
    max-height: none;
    border-right: 1px solid var(--border-color);
    border-bottom: none;
  }

  .queue-list {
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .queue-item {
    width: 100%;
    flex-direction: row;
  }

  .queue-item .queue-thumb {
    width: 60px;
    height: 34px;
    margin-right: 8px;
    margin-bottom: 0;
  }

  .video-section {
    flex: 1;
  }

  .video-controls {
    padding: 8px;
  }
}

/* ============================================
     Touch Device Optimizations
     ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects that don't work on touch */
  .btn:hover,
  .icon-btn:hover,
  .playlist-item:hover,
  .video-item:hover,
  .queue-item:hover {
    transform: none;
  }

  /* Add active states for touch feedback */
  .btn:active,
  .icon-btn:active {
    transform: scale(0.95);
    opacity: 0.8;
  }

  .playlist-item:active,
  .video-item:active,
  .queue-item:active {
    background: var(--bg-hover);
  }

  /* Always show drag handles on touch */
  .playlist-item .drag-handle,
  .video-item .drag-handle {
    opacity: 1;
  }

  /* Larger scrollbar for touch */
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
}

/* ============================================
     Safe Area Insets (notched phones)
     ============================================ */
@supports (padding: env(safe-area-inset-bottom)) {
  .dashboard-header {
    padding-top: env(safe-area-inset-top, 0);
  }

  .modal-actions {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
  }

  .context-menu {
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
  }

  .notification {
    bottom: calc(20px + env(safe-area-inset-bottom, 0));
  }
}

/* ============================================
     Slide-Up Panels (Share, Connected, Settings)
     ============================================ */
.slide-panel {
  display: none;
}

.panel-overlay {
  display: none;
}

@media (max-width: 768px) {
  .slide-panel {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 56px;
    width: 100%;
    max-height: 70vh;
    background: var(--bg-medium);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border-top: 1px solid var(--border-color);
    z-index: 180;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
  }

  .slide-panel.open {
    transform: translateY(0);
  }

  .slide-panel::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
    margin: 8px auto;
  }

  .slide-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px 12px;
    border-bottom: 1px solid var(--border-color);
  }

  .slide-panel-header h3 {
    font-family: 'Cinzel', serif;
    font-size: 15px;
    color: var(--gold);
    margin: 0;
  }

  .panel-close-btn {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--bg-hover);
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
  }

  .slide-panel-content {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(70vh - 80px);
    -webkit-overflow-scrolling: touch;
  }

  .panel-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
  }

  .panel-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 56px;
    background: rgba(0, 0, 0, 0.6);
    z-index: 175;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .panel-overlay.visible {
    opacity: 1;
    pointer-events: auto;
  }

  /* Share panel */
  .share-panel .share-link-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .share-panel .share-link-box input {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
  }

  .share-panel .share-link-box .btn {
    width: 100%;
  }

  /* Connected users panel */
  .users-list-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .user-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
  }

  .user-list-item.current {
    border-color: var(--gold-dark);
    background: var(--gold-subtle);
  }

  .user-list-item .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
  }

  .user-list-item .user-info {
    flex: 1;
    min-width: 0;
  }

  .user-list-item .user-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
  }

  .user-list-item .user-status {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
  }

  .user-list-item .user-status.online {
    color: var(--online);
  }

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

  /* Settings panel */
  .settings-panel-content {
    padding: 0 !important;
  }

  /* Settings panel needs more height for all tabs */
  .slide-panel.settings-panel {
    max-height: 80vh;
  }

  .settings-panel-content .settings-tabs {
    display: flex;
    gap: 4px;
    padding: 12px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border-color);
    -webkit-overflow-scrolling: touch;
  }

  .settings-panel-content .settings-tab {
    flex-shrink: 0;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
  }

  .settings-panel-content .settings-tab.active {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--bg-darkest);
  }

  .settings-panel-content .settings-tab.logout {
    margin-left: auto;
    background: var(--error-dark);
    border-color: var(--error);
    color: white;
  }

  .settings-panel-content .settings-section {
    padding: 16px;
  }

  .settings-panel-content .input-group {
    margin-bottom: 16px;
  }

  .settings-panel-content .input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
  }

  .settings-panel-content .input-group input {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
  }

  .settings-panel-content .input-group input:disabled {
    opacity: 0.6;
  }

  .settings-panel-content .section-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
  }

  .settings-panel-content .theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .settings-panel-content .theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .settings-panel-content .theme-option.active {
    border-color: var(--gold);
    background: var(--gold-subtle);
  }

  .settings-panel-content .theme-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
  }

  .settings-panel-content .theme-name {
    font-size: 13px;
    color: var(--text-primary);
  }

  .settings-panel-content .btn {
    width: 100%;
    margin-top: 8px;
  }

  .settings-panel-content .danger-zone {
    margin-top: 0;
    padding: 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius-md);
  }

  .settings-panel-content .danger-zone h4 {
    font-family: 'Cinzel', serif;
    font-size: 14px;
    color: var(--error);
    margin-bottom: 12px;
  }

  .settings-panel-content .danger-zone p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
  }

  /* Guest tag in mobile user list */
  .user-list-item .guest-tag {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: normal;
  }

  /* Owner styling in mobile user list */
  .user-list-item.owner {
    border-color: var(--gold-dark);
  }

  .user-list-item .user-status.offline {
    color: var(--text-muted);
  }
}

/* ============================================
     Mobile Bottom Navigation (optional enhancement)
     ============================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-medium);
  border-top: 1px solid var(--border-color);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.mobile-nav-items {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 56px;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 2px;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  min-width: 48px;
  flex: 1;
}

.mobile-nav-item.active {
  color: var(--gold);
}

.mobile-nav-item .icon {
  width: 22px;
  height: 22px;
  margin-bottom: 2px;
}

.mobile-nav-item span {
  font-size: 9px;
  font-family: 'Cinzel', serif;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .mobile-nav {
    display: block;
  }
}

/* ============================================
     Pull to Refresh Indicator (visual only)
     ============================================ */
.pull-indicator {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 16px;
  background: var(--bg-medium);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  color: var(--text-secondary);
  font-size: 12px;
  z-index: 1000;
}

/* ============================================
   Video Edit Input
   ============================================ */
.video-edit-input {
  flex: 1;
  padding: 4px 8px;
  background: var(--bg-dark);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  outline: none;
  min-width: 0;
}

.video-edit-input:focus {
  box-shadow: 0 0 0 2px var(--gold-subtle);
}

/* ============================================
   Playlist Panel Drag Handle
   ============================================ */
.playlist-panel {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.playlist-item .drag-handle {
  color: var(--text-muted);
  cursor: grab;
  padding: 2px;
  margin-right: 6px;
  opacity: 0;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.playlist-item:hover .drag-handle {
  opacity: 1;
}

.playlist-item.dragging {
  opacity: 0.5;
  background: var(--bg-light);
}

.playlist-item.drag-over {
  border-color: var(--gold);
  background: var(--gold-subtle);
}

/* ============================================
   Color Picker Modal
   ============================================ */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px;
  justify-items: center;
}

.color-option {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-option:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.color-option.selected {
  border-color: white;
  box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Uniform Playlist Fonts
   ============================================ */
.playlist-panel,
.playlist-item,
.playlist-name,
.playlist-count,
.video-item,
.video-title,
.video-index,
.playlist-edit-input,
.video-edit-input {
  font-family: var(--font-main);
}

.playlist-name,
.video-title {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.playlist-count,
.video-index {
  font-size: 11px;
  font-weight: 500;
}

.playlist-edit-input,
.video-edit-input {
  font-size: 13px;
  font-family: var(--font-main);
}

/* ============================================
   Visited Rooms Section
   ============================================ */
.visited-rooms-section {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.visited-rooms-section .rooms-header h2 {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.visited-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.visited-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
}

.room-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.room-owner {
  color: var(--text-secondary);
}

.online-badge {
  background: rgba(46, 204, 113, 0.2);
  color: #2ecc71;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.last-visited {
  color: var(--text-muted);
  font-style: italic;
}

/* ============================================
   Guest Menu Styles
   ============================================ */
.user-menu.guest {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar.guest {
  background: linear-gradient(135deg, #607d8b, #455a64);
}

.guest-tag-small {
  font-size: 10px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 8px;
  margin-left: 4px;
}

.dropdown-header .guest-notice {
  color: var(--text-muted);
  font-style: italic;
}

.dropdown-item.primary {
  color: var(--gold);
  font-weight: 500;
}

.dropdown-item.primary:hover {
  background: var(--gold-subtle);
}

.dropdown-hint {
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border);
  line-height: 1.4;
}

/* ============================================
   Embedded Auth Modal
   ============================================ */
.auth-modal-in-room {
  max-width: 400px;
  width: 90%;
  padding: 0;
  overflow: hidden;
}

.auth-embedded {
  padding: 24px;
}

.auth-embedded h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.auth-embedded .input-group {
  margin-bottom: 16px;
}

.auth-embedded .input-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-embedded .input-group input {
  width: 100%;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

.auth-embedded .input-group input:focus {
  border-color: var(--gold);
  outline: none;
}

.auth-embedded .btn.full-width {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
}

.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
}

.link-btn:hover {
  color: var(--gold-light);
}

.auth-embedded .error-message {
  background: rgba(231, 76, 60, 0.15);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}

/* Remove button for visited rooms */
.visited-card .room-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.visited-card .icon-btn.danger {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.visited-card:hover .icon-btn.danger {
  opacity: 1;
}

.visited-card .icon-btn.danger:hover {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

/* ============================================
   Notes Panel (Right Side)
   ============================================ */
.notes-panel {
  width: 300px;
  min-width: 300px;
  background: var(--bg-medium);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease;
  overflow: hidden;
}

.notes-panel.closed {
  width: 0;
  min-width: 0;
  opacity: 0;
  border-left: none;
}

.notes-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-dark);
}

.notes-panel-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  color: var(--gold);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.notes-header-actions {
  display: flex;
  gap: 4px;
}

.notes-panel-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.video-notes-editor {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.notes-video-info {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.notes-video-title {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  display: block;
  word-break: break-word;
}

.notes-textarea {
  flex: 1;
  min-height: 200px;
  width: 100%;
  padding: 12px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
}

.notes-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.notes-textarea::placeholder {
  color: var(--text-muted);
}

.notes-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.notes-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.notes-readonly {
  flex: 1;
}

.notes-content {
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  padding: 12px;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
}

.notes-empty,
.notes-empty-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 24px;
}

.notes-toggle {
  margin-left: 8px;
}

.notes-toggle.hidden-indicator {
  opacity: 0.5;
}

.notes-toggle.hidden-indicator:hover {
  opacity: 0.8;
}

/* ============================================
   Queue Sort Styles
   ============================================ */
.queue-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-dropdown {
  position: relative;
}

.sort-dropdown .icon-btn {
  display: flex;
  align-items: center;
  gap: 2px;
}

.sort-indicator {
  font-size: 10px;
  font-weight: bold;
  margin-left: 2px;
}

.queue-header-actions .icon-btn.active {
  background: var(--gold-subtle);
  color: var(--gold);
}

/* ============================================
   Mobile Notes Panel
   ============================================ */
@media (max-width: 768px) {
  .notes-panel {
    display: none;
  }
  
  .notes-toggle {
    display: none;
  }
  
  /* Notes in mobile slide-up panel */
  .slide-panel.notes-panel-mobile {
    display: block;
  }
  
  .slide-panel.notes-panel-mobile .notes-textarea {
    min-height: 150px;
  }
}

@media (max-width: 1024px) {
  .notes-panel {
    width: 250px;
    min-width: 250px;
  }
}

/* Adjust main-content to accommodate notes panel */
.main-content {
  display: flex;
  flex-direction: row;
  flex: 1;
  overflow: hidden;
}

.video-section {
  flex: 1;
  min-width: 0;
}

/* Mobile Notes Panel */
.slide-panel.notes-panel-mobile {
  max-height: 75vh;
}

.slide-panel.notes-panel-mobile .slide-panel-content {
  padding: 16px;
}

.slide-panel.notes-panel-mobile .notes-textarea {
  min-height: 200px;
  max-height: 40vh;
}

.slide-panel.notes-panel-mobile .notes-video-title {
  font-size: 14px;
  margin-bottom: 8px;
}

/* Desktop: show the notes-toggle button */
.notes-toggle {
  display: flex;
}

/* Ensure notes-toggle shows on mobile too */
@media (max-width: 768px) {
  .notes-toggle {
    display: flex !important;
  }
  
  .notes-panel-mobile .notes-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }
}

/* Sorted mode for video items */
.video-item.sorted {
  cursor: default;
}

.video-item.sorted .drag-handle {
  display: none;
}

/* Sort indicator styling */
.sort-dropdown .icon-btn {
  position: relative;
}

.sort-indicator {
  position: absolute;
  top: -2px;
  right: -2px;
  font-size: 9px;
  font-weight: bold;
  color: var(--gold);
}

/* Notes last edit info */
.notes-last-edit {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}
