@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Obsidian & Neon Orange Palette */
  --bg-dark: #070709;
  --bg-card: rgba(18, 18, 22, 0.82);
  --bg-card-hover: rgba(26, 26, 32, 0.92);
  --border-color: rgba(249, 115, 22, 0.12);
  --border-focus: rgba(249, 115, 22, 0.6);
  
  --primary: #f97316;
  --primary-hover: #ea580c;
  --primary-glow: rgba(249, 115, 22, 0.38);

  --success: #ff781f;
  --success-glow: rgba(249, 115, 22, 0.45);
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.4);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.4);

  --text-main: #f8fafc;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  --terminal-bg: #050507;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(249, 115, 22, 0.14) 0px, transparent 55%),
    radial-gradient(at 100% 100%, rgba(234, 88, 12, 0.10) 0px, transparent 50%),
    radial-gradient(at 50% 20%, rgba(217, 119, 6, 0.05) 0px, transparent 80%),
    radial-gradient(at 50% 80%, rgba(10, 10, 12, 0.8) 0px, transparent 100%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  transition: all 0.25s ease;
}

.glass-panel:hover {
  border-color: rgba(249, 115, 22, 0.25);
  box-shadow: 0 12px 35px -8px rgba(249, 115, 22, 0.08);
}

/* Pulsing Status Badges */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.status-live {
  background: rgba(249, 115, 22, 0.15);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 15px rgba(249, 115, 22, 0.2);
}

.status-reconnecting {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.status-offline {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.pulsing-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  position: relative;
}

.status-live .pulsing-dot {
  background-color: #f97316;
  box-shadow: 0 0 10px #f97316;
  animation: pulse-orange 1.5s infinite;
}

.status-reconnecting .pulsing-dot {
  background-color: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
  animation: pulse-yellow 1.2s infinite;
}

.status-offline .pulsing-dot {
  background-color: #ef4444;
}

@keyframes pulse-orange {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(249, 115, 22, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

@keyframes pulse-yellow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Custom Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(249, 115, 22, 0.55);
}

.btn-success {
  background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(249, 115, 22, 0.4);
}

.btn-success:hover {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(249, 115, 22, 0.6);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--danger-glow);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
  background: rgba(249, 115, 22, 0.08);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(249, 115, 22, 0.16);
  border-color: rgba(249, 115, 22, 0.35);
  color: #ffedd5;
}

/* Custom Input Controls */
.input-control {
  width: 100%;
  background: rgba(8, 8, 10, 0.85);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.92rem;
  transition: all 0.2s ease;
  outline: none;
}

.input-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.input-control::placeholder {
  color: var(--text-dim);
}

/* Terminal Console Styling */
.terminal-window {
  background: var(--terminal-bg);
  border: 1px solid rgba(249, 115, 22, 0.18);
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background: rgba(249, 115, 22, 0.04);
  padding: 10px 16px;
  border-bottom: 1px solid rgba(249, 115, 22, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; }
.dot-yellow { background: #f97316; }
.dot-green { background: #fbbf24; }

.terminal-body {
  height: 480px;
  overflow-y: auto;
  padding: 14px;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-body::-webkit-scrollbar {
  width: 6px;
}
.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.25);
  border-radius: 3px;
}
.terminal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.45);
}

.log-line {
  margin-bottom: 3px;
}

.log-supervisor { color: #fb923c; font-weight: 600; }
.log-telemetry { color: #fed7aa; }
.log-error { color: #f87171; font-weight: 600; }
.log-warning { color: #f59e0b; }
.log-timestamp { color: #71717a; margin-right: 6px; }

/* Video Playlist Item */
.playlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(249, 115, 22, 0.08);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.playlist-item:hover {
  border-color: rgba(249, 115, 22, 0.35);
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.08);
}

.playlist-item.is-selected {
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.09) 0%, rgba(18, 18, 22, 0.75) 100%);
  border-color: rgba(249, 115, 22, 0.4);
}

.playlist-item.is-unselected {
  background: rgba(10, 10, 12, 0.4);
  border-color: rgba(255, 255, 255, 0.04);
  opacity: 0.65;
}

.playlist-item.is-unselected:hover {
  opacity: 0.9;
}

.video-checkbox {
  width: 17px;
  height: 17px;
  accent-color: #f97316;
  cursor: pointer;
  border-radius: 4px;
}

.badge-ready {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.badge-skipped {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 3, 5, 0.88);
  backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: #0f0f13;
  border: 1px solid rgba(249, 115, 22, 0.25);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(249, 115, 22, 0.15);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}
