/* YouTube Factory OS - Futuristic Design System (Carbon Gloss) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #030712; /* Fondo más profundo */
  --bg-deep: #010309;
  --bg-card: #222d3f; /* Gris azulado más claro para MUCHO contraste */
  --bg-card-glass: rgba(34, 45, 63, 0.9);
  --bg-hover: rgba(0, 183, 233, 0.15);
  --yt-red: #ff0000; /* Rojo YouTube Logo */
  --yt-red-glow: rgba(255, 0, 0, 0.4);
  --vidiq-blue: #00b7e9; /* Cian IA Logo */
  --vidiq-blue-glow: rgba(0, 183, 233, 0.4);
  --success: #10b981;
  --warning: #f59e0b;
  --text: #ffffff;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.2);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  background-image: 
    linear-gradient(rgba(0, 245, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 245, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

body::before {
  content: "";
  position: absolute;
  top: -10%; left: -10%;
  width: 40%; height: 40%;
  background: radial-gradient(circle, rgba(255, 31, 75, 0.08) 0%, transparent 70%);
  z-index: -1;
  filter: blur(60px);
}

body::after {
  content: "";
  position: absolute;
  bottom: -10%; right: -10%;
  width: 50%; height: 50%;
  background: radial-gradient(circle, rgba(0, 245, 255, 0.08) 0%, transparent 70%);
  z-index: -1;
  filter: blur(80px);
}

/* ─── SIDEBAR ─── */
.sidebar {
  width: 280px;
  background: #0a0f1a; /* Más oscuro y sólido para contraste lateral */
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 2rem 1.2rem;
  gap: 0.6rem;
  flex-shrink: 0;
  z-index: 20;
}

.sidebar-logo {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 0.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  letter-spacing: -0.02em;
}
.sidebar-logo .yt { color: var(--yt-red); text-shadow: 0 0 15px var(--yt-red-glow); }
.sidebar-logo .os { color: var(--vidiq-blue); text-shadow: 0 0 15px var(--vidiq-blue-glow); }

.nav-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
  border: 1px solid transparent;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
  border-color: rgba(255,255,255,0.05);
  transform: translateX(4px);
}
.nav-btn.active {
  background: rgba(255, 31, 75, 0.1);
  color: white;
  border-color: rgba(255, 31, 75, 0.2);
  box-shadow: inset 0 0 15px rgba(255, 31, 75, 0.05);
}

.nav-btn .icon { width: 18px; text-align: center; }
.new-video-btn {
  background: var(--yt-red);
  color: white;
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  transition: var(--transition);
}
.new-video-btn:hover { background: var(--yt-red-dark); transform: translateY(-1px); }

/* ─── MAIN CONTENT ─── */
.main {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2.5rem;
  background: rgba(10, 15, 25, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar h1 { 
  font-family: 'Outfit', sans-serif; 
  font-size: 1.5rem; 
  font-weight: 800; 
  letter-spacing: -0.01em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.topbar .subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

.content { padding: 2.5rem; }

/* ─── CARDS AND HUD ELEMENTS ─── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.card:hover { 
  border-color: var(--vidiq-blue); 
  box-shadow: 0 0 30px var(--vidiq-blue-glow);
  transform: translateY(-2px);
}

.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
  pointer-events: none;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.5rem;
  position: relative;
}
.stat-card::after {
  content: "";
  position: absolute;
  bottom: 0; left: 10%; width: 80%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--vidiq-blue), transparent);
  opacity: 0.4;
}
.stat-val { 
  font-family: 'Outfit', sans-serif; 
  font-size: 2.2rem; 
  font-weight: 800; 
  text-shadow: 0 0 20px rgba(255,255,255,0.1);
}
.stat-lbl { 
  font-size: 0.75rem; 
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted); 
  margin-top: 4px; 
}

/* ─── KANBAN ─── */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-bottom: 3rem;
}
.kanban-col { display: flex; flex-direction: column; gap: 1rem; }
.kanban-header {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 0 0.5rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.kanban-tag {
  background: rgba(0, 245, 255, 0.1);
  color: var(--vidiq-blue);
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
}
.k-card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1.2rem;
  cursor: pointer;
  transition: var(--transition);
}
.k-card:hover { 
  border-color: var(--vidiq-blue); 
  background: rgba(0, 245, 255, 0.05);
  transform: scale(1.02);
}
.k-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.k-meta { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.btn-primary { 
  background: var(--vidiq-blue); 
  color: #000; 
  box-shadow: 0 0 20px var(--vidiq-blue-glow);
}
.btn-primary:hover { 
  background: #fff; 
  box-shadow: 0 0 30px rgba(255,255,255,0.4);
  transform: translateY(-2px);
}
.btn-red { 
  background: var(--yt-red); 
  color: white;
  box-shadow: 0 0 20px var(--yt-red-glow);
}
.btn-red:hover { 
  background: #ff4d71; 
  box-shadow: 0 0 30px var(--yt-red-glow);
  transform: translateY(-2px);
}
.btn-ghost { 
  background: rgba(255,255,255,0.03); 
  border: 1px solid var(--glass-border); 
  color: var(--text); 
}
.btn-ghost:hover { 
  background: rgba(255,255,255,0.08); 
  border-color: rgba(255,255,255,0.2);
}

/* ─── INPUTS ─── */
.input-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.8rem 1.1rem;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 1.2rem;
  transition: var(--transition);
}
.input-field:focus { 
  outline: none; 
  border-color: var(--vidiq-blue); 
  box-shadow: 0 0 0 4px rgba(0, 245, 255, 0.1);
  background: rgba(0, 0, 0, 0.5);
}

/* ─── WIZARD STEPS HUD ─── */
.steps-bar {
  display: flex;
  align-items: center;
  background: rgba(5, 7, 10, 0.6);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 1.2rem 2rem;
  margin-bottom: 2rem;
}
.step-num {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem; font-weight: 700;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
}
.step.active .step-num { 
  background: var(--yt-red); 
  color: white; 
  border-color: var(--yt-red);
  box-shadow: 0 0 15px var(--yt-red-glow);
}
.step.done .step-num { background: var(--success); color: #000; border-color: var(--success); }

/* Custom Score HUD */
.score-badge {
  font-family: 'JetBrains Mono', monospace;
  padding: 0.4rem 1rem;
  border-radius: 10px;
  border: 1px solid currentColor;
  font-size: 0.85rem;
  font-weight: 700;
}

.pulse {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.02); }
}

.hidden { display: none !important; }
.divider { border: none; border-top: 1px solid var(--glass-border); margin: 1.5rem 0; }

.wizard-grid {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 1.8rem;
  align-items: start;
}

/* ====== DASHBOARD CHARTS & HUD ====== */
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-top: 1.5rem;
  position: relative;
  overflow: hidden;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}
.chart-bar-group {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 120px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--vidiq-blue-glow), var(--vidiq-blue));
  border-radius: 4px 4px 0 0;
  transition: var(--transition);
  position: relative;
  min-height: 5px;
}
.chart-bar:hover {
  filter: brightness(1.3);
  box-shadow: 0 0 15px var(--vidiq-blue-glow);
}
.chart-bar::after {
  content: '';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 8px white;
  opacity: 0;
}
.chart-bar:hover::after { opacity: 1; }

.status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
}
.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}
.status-badge.live { color: #f87171; border-color: rgba(248,113,113,0.3); background: rgba(248,113,113,0.1); }
.status-badge.ai { color: var(--vidiq-blue); border-color: var(--vidiq-blue-glow); background: rgba(0,183,233,0.1); }

/* Responsive tweaks */
@media (max-width: 1024px) {
  .wizard-grid { grid-template-columns: 1fr; }
}
