/* ============================================
   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;
}

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;
  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
     Completely isolated from document flow
     ============================================ */
.dragon-fire-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  /* Complete isolation from layout */
  contain: strict;
  content-visibility: auto;
  will-change: auto;
  isolation: isolate;
  /* Force GPU compositing layer */
  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);
  /* GPU acceleration for each ember */
  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;
  }
}

/* ============================================
     Ornate Border
     ============================================ */
.ornate-border {
  position: relative;
  background: linear-gradient(145deg, var(--bg-medium) 0%, var(--bg-dark) 100%);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.ornate-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    var(--gold-dark) 0%,
    transparent 25%,
    transparent 75%,
    var(--gold-dark) 100%
  );
  z-index: -1;
  opacity: 0.3;
}

.ornate-border .corner {
  position: absolute;
  width: 12px;
  height: 12px;
  border: 2px solid var(--gold);
  opacity: 0.6;
}

.ornate-border .corner.top-left {
  top: -1px;
  left: -1px;
  border-right: none;
  border-bottom: none;
  border-radius: var(--radius-sm) 0 0 0;
}
.ornate-border .corner.top-right {
  top: -1px;
  right: -1px;
  border-left: none;
  border-bottom: none;
  border-radius: 0 var(--radius-sm) 0 0;
}
.ornate-border .corner.bottom-left {
  bottom: -1px;
  left: -1px;
  border-right: none;
  border-top: none;
  border-radius: 0 0 0 var(--radius-sm);
}
.ornate-border .corner.bottom-right {
  bottom: -1px;
  right: -1px;
  border-left: none;
  border-top: none;
  border-radius: 0 0 var(--radius-sm) 0;
}

.ornate-border .border-content {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ============================================
     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;
  /* Isolate from ember animations */
  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: 1;
}

.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-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  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);
  /* Prevent layout shift on focus */
  outline: none;
  /* Isolate from animations */
  position: relative;
  z-index: 1;
}

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

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

/* Ensure auth container is above embers */
.auth-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 10;
}

/* Captcha */
.captcha-box {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 18px;
  text-align: center;
}

.captcha-question {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.captcha-input {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
}

.captcha-input input {
  width: 70px;
  padding: 8px;
  text-align: center;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Cinzel', serif;
  font-size: 16px;
  outline: none;
}

.captcha-input input:focus {
  border-color: var(--gold);
}

/* 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);
}

.forgot-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 13px;
  background: none;
  border: none;
  cursor: pointer;
}

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

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

/* Dashboard content layer above embers */
.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));
}

/* Larger logo for home page */
.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;
}

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

/* ============================================
     Sidebar
     ============================================ */
.sidebar {
  width: 200px;
  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: -200px;
  opacity: 0;
}

.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;
}

.empty-playlists span {
  font-size: 12px;
  font-style: italic;
}

/* 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: rgba(212, 168, 36, 0.12);
  border-color: rgba(212, 168, 36, 0.3);
}

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

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

.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;
}

.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: 280px;
  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);
}

.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 - Redesigned with full-width title */
.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: rgba(212, 168, 36, 0.1);
  border-left: 3px solid var(--ember);
  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-type-icon {
  font-size: 14px;
  flex-shrink: 0;
}

.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 - appear on hover at bottom */
.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 {
  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-container .border-content {
  flex: 1;
  display: flex;
}

.video-frame {
  width: 100%;
  height: 100%;
  border: none;
  flex: 1;
  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-silhouette {
  width: 80px;
  height: 56px;
  background: linear-gradient(
    135deg,
    var(--gold-dark) 0%,
    var(--gold) 50%,
    transparent 100%
  );
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M10 50 Q20 30 40 35 Q50 25 60 30 Q70 20 85 25 L90 20 Q80 30 85 35 Q90 45 80 50 Z'/%3E%3C/svg%3E")
    center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M10 50 Q20 30 40 35 Q50 25 60 30 Q70 20 85 25 L90 20 Q80 30 85 35 Q90 45 80 50 Z'/%3E%3C/svg%3E")
    center/contain no-repeat;
  opacity: 0.4;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.video-placeholder p {
  font-family: 'Cinzel', serif;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.video-placeholder .subtitle {
  font-size: 13px;
  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);
}

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

.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;
}

.add-playing-btn {
  margin-top: 8px;
}

/* ============================================
     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;
}

.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);
}

/* Custom colors maintain border treatment but use custom background */
.user-badge.online[style*='background'] {
  border-color: rgba(255, 255, 255, 0.2);
}

.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);
}

/* When badge has custom color, ensure name is readable */
.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;
}

.user-badge[style*='background'] .you-tag {
  color: rgba(255, 255, 255, 0.7);
}

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

/* ============================================
     Color Picker Modal
     ============================================ */
.color-picker-modal {
  max-width: 320px;
}

.color-picker-modal h2 {
  font-size: 18px;
  margin-bottom: 20px;
}

.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  padding: 10px 0;
}

.color-option {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
}

.color-option:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.color-option.selected {
  border-color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}

/* ============================================
     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);
  /* Isolate from animations */
  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);
}

.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-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);
}

/* 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;
}

/* 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;
}

.share-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12px;
}

/* ============================================
     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;
}

/* ============================================
     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);
}

@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;
}

.welcome-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 200px;
  background: radial-gradient(ellipse, var(--gold-glow) 0%, transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

.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;
}

.section-icon {
  font-size: 22px;
}

.room-count {
  font-family: inherit;
  font-size: 12px;
  color: var(--gold);
  background: rgba(212, 168, 36, 0.15);
  padding: 3px 10px;
  border-radius: 20px;
  margin-left: 8px;
}

.btn.glow {
  box-shadow: 0 0 20px var(--gold-glow);
}

.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);
}

.btn.ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}

.btn.ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.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);
}

.room-card-bg {
  position: absolute;
  inset: 0;
  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);
  border-radius: 16px;
  transition: all 0.35s ease;
}

.room-card:hover .room-card-bg {
  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-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

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

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

.room-status {
  display: flex;
  align-items: center;
}

.online-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--online);
  background: rgba(74, 222, 128, 0.1);
  padding: 4px 10px;
  border-radius: 20px;
}

.online-badge .pulse {
  width: 6px;
  height: 6px;
  background: var(--online);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.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 users preview */
.room-users-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 10px;
  min-height: 36px;
}

.mini-user {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.mini-user.online {
  background: rgba(74, 222, 128, 0.15);
}

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

.mini-user.away {
  background: rgba(251, 191, 36, 0.15);
}

.mini-crown {
  font-size: 10px;
}

.mini-name {
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-kick {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.2);
  border: none;
  border-radius: 50%;
  color: var(--error);
  font-size: 12px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  margin-left: 2px;
}

.mini-user:hover .mini-kick {
  opacity: 1;
}

.mini-kick:hover {
  background: var(--error);
  color: white;
}

.more-users {
  font-size: 10px;
  color: var(--text-muted);
  padding: 4px 8px;
}

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

.enter-btn {
  flex: 1;
  padding: 11px 16px;
  justify-content: center;
}

.room-tools {
  display: flex;
  gap: 6px;
}

.tool-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tool-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.tool-btn.danger:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Empty state for no rooms */
.no-rooms {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.no-rooms-icon {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.4;
}

.no-rooms h3 {
  font-family: 'Cinzel', serif;
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.no-rooms p {
  font-size: 14px;
  margin-bottom: 24px;
}

/* Host tag in room header */
.host-tag {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
  margin-left: 8px;
}

/* 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;
}

/* ============================================
     Kicked Screen
     ============================================ */
.kicked-screen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-darkest);
  position: relative;
}

.kicked-content {
  text-align: center;
  z-index: 10;
  padding: 40px;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 400px;
}

.kicked-icon {
  font-size: 64px;
  margin-bottom: 20px;
}

.kicked-content h1 {
  font-family: 'Cinzel', serif;
  color: var(--error);
  margin-bottom: 12px;
}

.kicked-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ============================================
     Context Menu
     ============================================ */
.context-menu {
  position: fixed;
  background: var(--bg-medium);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  z-index: 2000;
  overflow: hidden;
  top: 84%;
  left: 34%;
}

.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);
}

/* ============================================
     Responsive
     ============================================ */
@media (max-width: 900px) {
  .header-center {
    max-width: 350px;
  }
  .queue-panel {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .dashboard-header {
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

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

  .sidebar {
    position: fixed;
    left: 0;
    top: 52px;
    bottom: 0;
    z-index: 99;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }

  .sidebar.closed {
    margin-left: -200px;
  }

  .main-content {
    flex-direction: column;
  }

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

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

/* ============================================
     Join Room Modal - Enhanced
     ============================================ */
.join-modal {
  max-width: 420px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.join-header {
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.join-dragon {
  font-size: 48px;
  display: block;
  margin-bottom: 12px;
  animation: dragonBounce 2s ease-in-out infinite;
}

@keyframes dragonBounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.join-header h2 {
  margin: 0 0 4px 0;
  font-size: 22px;
}

.join-room-name {
  color: var(--gold);
  font-size: 14px;
  margin: 0;
}

.join-content {
  padding: 0;
}

.join-description {
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
}

.join-option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 20px;
}

.join-option-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.join-option-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dim);
  border-radius: 10px;
}

.join-option-header > div {
  display: flex;
  flex-direction: column;
}

.join-option-header strong {
  font-size: 15px;
  color: var(--text-primary);
}

.join-option-header span {
  font-size: 12px;
  color: var(--text-muted);
}

.join-option-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-option-content input {
  padding: 12px 14px;
  font-size: 15px;
  border-radius: 8px;
  background: var(--input-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.join-option-content input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}

.join-option-content .btn {
  justify-content: center;
  padding: 12px;
}

.join-error {
  color: var(--error);
  font-size: 13px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 6px;
}

.join-note {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
}

.join-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
}

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

.join-divider span {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.join-account-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.join-account-options .btn.secondary {
  justify-content: center;
  padding: 12px;
}

.join-account-options .btn.ghost {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 12px;
  font-size: 13px;
}

.join-account-options .btn.ghost:hover {
  color: var(--gold);
}

.join-account-options .btn.ghost strong {
  color: var(--gold);
  margin-left: 4px;
}

.join-cancel {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.join-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* Guest badge in header */
.guest-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

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

.guest-tag {
  font-size: 10px;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
