/* ==========================================================================
   DropLink — Modern Light Theme Design System (Text Box Centric)
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;

  /* Premium Light Palette */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --bg-hover: #f1f5f9;

  --border-light: #e2e8f0;
  --border-active: #cbd5e1;
  --border-focus: #3b82f6;

  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-gradient: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  --primary-glow: rgba(37, 99, 235, 0.22);

  --success: #10b981;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --danger: #ef4444;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 40px -8px rgba(15, 23, 42, 0.12);

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.light-theme {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-body);
  line-height: 1.5;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient Glow background */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

.glow-1 {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.02) 70%);
  top: -120px;
  right: -80px;
}

.glow-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.08) 0%, rgba(59, 130, 246, 0.02) 70%);
  bottom: -60px;
  left: -80px;
}

/* Header */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-light);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  flex-shrink: 0;
}

.brand-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-gradient);
  color: #ffffff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.brand-icon svg {
  width: 20px;
  height: 20px;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Short Domain Bar (Center) */
.short-domain-bar {
  display: flex;
  align-items: center;
  background: var(--bg-card-subtle);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px 6px 3px 14px;
  max-width: 420px;
  flex: 1;
  transition: all var(--transition-fast);
}

.short-domain-bar:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.domain-host {
  font-weight: 700;
  color: var(--text-faint);
  font-size: 0.9rem;
  user-select: none;
  white-space: nowrap;
}

.room-input-wrap {
  display: flex;
  align-items: center;
  flex: 1;
}

#currentRoomInput {
  flex: 1;
  border: none;
  background: transparent;
  padding: 6px 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  outline: none;
  font-family: var(--font-mono);
  min-width: 60px;
}

#currentRoomInput::placeholder {
  color: var(--text-faint);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 0.85rem;
}

.btn-room-go {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.btn-room-go:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.history-count-badge {
  font-size: 0.72rem;
  background: var(--primary);
  color: #fff;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-weight: 700;
  margin-left: 2px;
}

/* Main Workspace */
.main-workspace {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 18px 60px;
  position: relative;
  z-index: 1;
}

/* Smart Link Detection Banner */
.smart-link-banner {
  background: #ffffff;
  border: 1.5px solid #bfdbfe;
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  animation: slideDown 0.25s ease-out;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.link-banner-info {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.link-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: #eff6ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.link-banner-icon svg {
  width: 20px;
  height: 20px;
}

.link-banner-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.banner-link-url {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.banner-link-url:hover {
  text-decoration: underline;
}

/* Card Component */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
}

/* Editor Container (ช่องข้อความหลัก) */
.editor-container {
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
  border: 1.5px solid var(--border-light);
}

.editor-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 12px 36px -4px rgba(37, 99, 235, 0.12);
}

.editor-top-bar {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.sync-indicator {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.sync-dot.saving {
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
  animation: pulse 1s infinite;
}

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

.editor-top-tools {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Textarea Area (ช่องข้อความ) */
.textarea-container {
  position: relative;
  background: #ffffff;
}

.main-textarea {
  width: 100%;
  min-height: 380px;
  padding: 20px 22px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  outline: none;
  resize: vertical;
  tab-size: 2;
}

.main-textarea::placeholder {
  color: var(--text-faint);
  font-family: var(--font-sans);
  line-height: 1.6;
}

/* Instant Real-time Received Pulse Animation */
.main-textarea.receiving-update {
  animation: receivedFlash 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes receivedFlash {
  0% {
    background-color: rgba(16, 185, 129, 0.15);
    box-shadow: inset 0 0 0 2px #10b981;
  }
  100% {
    background-color: transparent;
    box-shadow: inset 0 0 0 0 transparent;
  }
}

/* Editor Bottom Toolbar */
.editor-bottom-bar {
  padding: 10px 18px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-card-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.editor-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.stat-divider {
  color: var(--border-active);
}

.editor-options {
  display: flex;
  align-items: center;
  gap: 8px;
}

.expire-label {
  font-weight: 600;
  font-size: 0.8rem;
}

.select-compact {
  background: #ffffff;
  border: 1px solid var(--border-light);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  cursor: pointer;
}

/* Cross Device Guide Cards */
.cross-device-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.guide-item {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.guide-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #bfdbfe;
}

.guide-text {
  font-size: 0.86rem;
  color: var(--text-body);
  line-height: 1.45;
}

.guide-text code {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary);
  font-weight: 700;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 3px 10px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(37, 99, 235, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-light);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover {
  background: var(--bg-hover);
  border-color: var(--border-active);
  color: var(--primary);
}

.btn-subtle {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.btn-subtle:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

.btn-icon {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.3rem;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-card-subtle);
  color: var(--text-main);
}

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

.icon-sm {
  width: 17px;
  height: 17px;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

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

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-xl);
  max-width: 360px;
  width: 100%;
  padding: 22px;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
}

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

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-title-wrap h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.qr-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-large-img {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  padding: 6px;
  background: #ffffff;
}

.qr-room-code-tag {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.copy-input-group {
  display: flex;
  gap: 6px;
  width: 100%;
}

.form-control-compact {
  flex: 1;
  background: #ffffff;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 7px 10px;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  font-family: var(--font-mono);
}

/* History Drawer */
.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  max-width: 88vw;
  height: 100vh;
  background: #ffffff;
  border-left: 1px solid var(--border-light);
  box-shadow: var(--shadow-xl);
  z-index: 300;
  display: flex;
  flex-direction: column;
  animation: slideDrawer 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDrawer {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-light);
}

.drawer-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-title-wrap h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-code {
  font-family: var(--font-mono);
  font-weight: 800;
  color: var(--primary);
  font-size: 0.95rem;
}

.history-time {
  font-size: 0.72rem;
  color: var(--text-faint);
}

.history-preview {
  font-size: 0.82rem;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
}

.empty-state {
  text-align: center;
  padding: 40px 10px;
  color: var(--text-faint);
  font-size: 0.88rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: 11px 16px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  animation: toastIn 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-width: 320px;
}

.toast.toast-success {
  border-left: 4px solid var(--success);
}

.toast.toast-error {
  border-left: 4px solid var(--danger);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mt-2 { margin-top: 8px; }
.hidden { display: none !important; }

/* ==========================================================================
   Scene Backdrop & Ambient Video / Image Controls
   ========================================================================== */
.scene-backdrop {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg-main);
  transition: background-color 0.4s ease;
}

.scene-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.4s ease;
}

.scene-media-el {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s ease-out;
}

/* Built-in scene styles */
body.scene-image_aurora .scene-backdrop {
  background: radial-gradient(circle at 20% 20%, #bfdbfe 0%, #ddd6fe 40%, #fed7aa 80%, #fef08a 100%);
}
body.scene-image_aurora .scene-overlay {
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

body.scene-video_waves .scene-backdrop {
  background: linear-gradient(135deg, #a7f3d0 0%, #7dd3fc 50%, #c4b5fd 100%);
  background-size: 300% 300%;
  animation: dynamicWaves 12s ease infinite;
}
@keyframes dynamicWaves {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
body.scene-video_waves .scene-overlay {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ==========================================================================
   Scene Dropdown Menu
   ========================================================================== */
.scene-dropdown-wrap {
  position: relative;
}

.scene-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 8px;
  z-index: 220;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: popDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.scene-menu-header {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-faint);
  padding: 6px 10px 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.scene-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  color: var(--text-main);
  width: 100%;
}

.scene-option:hover {
  background: var(--bg-hover);
}

.scene-option.active {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.scene-opt-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.scene-opt-text strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
}

.scene-opt-text small {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
  line-height: 1.25;
}

/* ==========================================================================
   Attached Media Display Card (Image / Video)
   ========================================================================== */
.media-preview-card {
  margin: 14px 18px 6px;
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  animation: cardFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.media-view-wrapper {
  background: #0f172a;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 480px;
  overflow: hidden;
}

.media-element {
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  display: block;
}

.media-bar {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.media-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.media-tag {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 8px;
  background: #dbeafe;
  color: var(--primary);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.media-filename {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

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

.text-danger {
  color: var(--danger) !important;
}

.text-danger:hover {
  background: var(--danger-bg) !important;
}

/* ==========================================================================
   Drag & Drop Zone Overlay
   ========================================================================== */
.editor-container {
  position: relative;
}

.dropzone-overlay {
  position: absolute;
  inset: 0;
  background: rgba(239, 246, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 3px dashed var(--primary);
  border-radius: var(--radius-xl);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dropIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes dropIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 24px;
}

.dropzone-icon {
  width: 56px;
  height: 56px;
  color: var(--primary);
  stroke-width: 1.8;
  animation: bounceSlow 1.5s infinite;
}

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

.dropzone-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
}

/* ==========================================================================
   TV & Presentation Fullscreen Mode
   ========================================================================== */
body.fullscreen-scene-mode {
  overflow: hidden;
}

body.fullscreen-scene-mode .app-header,
body.fullscreen-scene-mode .cross-device-guide,
body.fullscreen-scene-mode .ambient-glow {
  display: none !important;
}

body.fullscreen-scene-mode .scene-overlay {
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

body.fullscreen-scene-mode .main-workspace {
  max-width: 1400px;
  height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
}

body.fullscreen-scene-mode .editor-container {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.7);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}

body.fullscreen-scene-mode .media-view-wrapper {
  max-height: 55vh;
}

body.fullscreen-scene-mode .main-textarea {
  font-size: 1.35rem;
  line-height: 1.7;
}

.btn-exit-fullscreen {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all var(--transition-fast);
}

.btn-exit-fullscreen:hover {
  background: rgba(15, 23, 42, 1);
  transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-container {
    flex-wrap: wrap;
    padding: 8px 12px;
  }

  .short-domain-bar {
    order: 3;
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
  }

  .btn-text-desktop {
    display: none;
  }

  .main-textarea {
    min-height: 280px;
    padding: 14px 16px;
    font-size: 0.95rem;
  }

  .cross-device-guide {
    grid-template-columns: 1fr;
  }

  .media-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

