:root {
  --bg-primary: #0a0d14;
  --bg-surface: #121722;
  --bg-surface-elevated: #1a2232;
  --bg-surface-hover: #222c40;
  
  --border-subtle: #243046;
  --border-strong: #384b6c;
  
  --text-primary: #f0f4fc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --accent-cyan: #00e5ff;
  --accent-cyan-glow: rgba(0, 229, 255, 0.25);
  
  --broadcast-red: #ff2a4b;
  --broadcast-red-glow: rgba(255, 42, 75, 0.35);
  
  --studio-amber: #ffb300;
  --studio-amber-glow: rgba(255, 179, 0, 0.3);
  
  --radio-green: #00e676;
  --radio-green-glow: rgba(0, 230, 118, 0.3);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 20px rgba(0, 229, 255, 0.2);
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 20%, rgba(0, 229, 255, 0.04) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 42, 75, 0.03) 0%, transparent 40%);
}

/* Tipografía */
h1, h2, h3, h4, .brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mono {
  font-family: var(--font-mono);
}

/* Botones genéricos */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font-display);
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  user-select: none;
}

.btn-primary {
  background: linear-gradient(135deg, #00d2ff 0%, #0084ff 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(0, 132, 255, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2ae0ff 0%, #1994ff 100%);
  box-shadow: 0 6px 20px rgba(0, 132, 255, 0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: #fff;
  box-shadow: 0 4px 15px var(--broadcast-red-glow);
}

.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-strong);
}

.btn-icon {
  padding: 10px;
  border-radius: var(--radius-md);
}

/* Inputs & Selects */
.input-group {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-control, select.input-control {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

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

select.input-control {
  cursor: pointer;
}

/* Badges y Tags */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-live {
  background: rgba(255, 42, 75, 0.15);
  color: var(--broadcast-red);
  border: 1px solid rgba(255, 42, 75, 0.4);
  box-shadow: 0 0 10px var(--broadcast-red-glow);
}

.badge-live::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--broadcast-red);
  border-radius: 50%;
  animation: pulse-live 1.5s infinite;
}

.badge-connected {
  background: rgba(0, 230, 118, 0.15);
  color: var(--radio-green);
  border: 1px solid rgba(0, 230, 118, 0.4);
}

.badge-connected::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--radio-green);
  border-radius: 50%;
}

.badge-muted {
  background: rgba(255, 179, 0, 0.15);
  color: var(--studio-amber);
  border: 1px solid rgba(255, 179, 0, 0.4);
}

@keyframes pulse-live {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 10px var(--broadcast-red); }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Modales */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 20px;
}

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

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 28px;
  box-shadow: var(--shadow-card);
  position: relative;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0) scale(1);
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-surface-elevated);
}

/* Notificaciones Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-strong);
  border-left: 4px solid var(--accent-cyan);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 14px;
  min-width: 280px;
}

.toast.success { border-left-color: var(--radio-green); }
.toast.error { border-left-color: var(--broadcast-red); }
.toast.warn { border-left-color: var(--studio-amber); }

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