/* home.css · Portada (usa los tokens --ui-* de ui.css, ver DESIGN.md) */

/* Iconos SVG del sprite */
.btn-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.header-brand {
  color: inherit;
  text-decoration: none;
}

/* =======================================================
   TARJETAS DE HERRAMIENTAS (estilo original de hub.css)
   ui.css neutraliza los tokens heredados en todo el panel; aquí se
   devuelven sus valores originales solo dentro de la rejilla de la portada,
   para que las tarjetas conserven sus colores, fuente y botones.
   ======================================================= */
.hub-grid {
  --bg-card: rgba(23, 23, 46, 0.78);
  --bg-card-hover: rgba(32, 32, 64, 0.90);
  --border-subtle: rgba(145, 70, 255, 0.2);
  --border-glow: rgba(145, 70, 255, 0.45);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.65);
  --shadow-neon-purple: 0 0 20px rgba(145, 70, 255, 0.45), 0 0 40px rgba(145, 70, 255, 0.2);
  --shadow-neon-cyan: 0 0 20px rgba(0, 245, 212, 0.45), 0 0 40px rgba(0, 245, 212, 0.2);
  --shadow-neon-spotify: 0 0 20px rgba(29, 185, 84, 0.45), 0 0 40px rgba(29, 185, 84, 0.2);
  font-family: var(--font-main);
}

/* La rejilla original estaba pensada para 1400 px de ancho */
.layout-container.home {
  max-width: 1400px;
}

.hub-grid .btn {
  min-height: 0;
  padding: 0.65rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.hub-grid .btn:active {
  transform: scale(0.97);
}

.hub-grid .btn-primary {
  background: linear-gradient(135deg, var(--twitch-purple) 0%, #772ce8 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(145, 70, 255, 0.35);
}

.hub-grid .btn-primary:hover {
  background: linear-gradient(135deg, #a05eff 0%, var(--twitch-purple) 100%);
  box-shadow: var(--shadow-neon-purple);
  transform: translateY(-2px);
}

.hub-grid .btn-spotify {
  background: linear-gradient(135deg, var(--spotify-green) 0%, #15883e 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 16px rgba(29, 185, 84, 0.35);
}

.hub-grid .btn-spotify:hover {
  background: linear-gradient(135deg, var(--spotify-green-light) 0%, var(--spotify-green) 100%);
  box-shadow: var(--shadow-neon-spotify);
  transform: translateY(-2px);
}

.hub-grid .btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.hub-grid .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.hub-grid .btn-obs {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.4);
}

.hub-grid .btn-obs:hover {
  background: linear-gradient(135deg, #312e81 0%, #4338ca 100%);
  color: #ffffff;
  border-color: #818cf8;
  box-shadow: 0 0 16px rgba(99, 102, 241, 0.45);
  transform: translateY(-2px);
}

.hub-grid .status-badge,
.hub-grid .badge {
  font-weight: 700;
}

/* =======================================================
   CABECERA DE PÁGINA
   ======================================================= */
.home-hero {
  padding: var(--ui-space-6) 0 var(--ui-space-7);
  border-bottom: 1px solid var(--ui-border);
  margin-bottom: var(--ui-space-7);
}

.home-hero h2 {
  font-size: var(--ui-text-3xl);
  line-height: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ui-text);
  max-width: 20ch;
}

.home-hero p {
  margin-top: var(--ui-space-4);
  font-size: var(--ui-text-lg);
  line-height: 1.625rem;
  color: var(--ui-text-muted);
  max-width: 60ch;
}

/* =======================================================
   DIÁLOGO DEL ENLACE OBS
   ======================================================= */
.home-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  align-items: center;
  justify-content: center;
  padding: var(--ui-space-4);
  background: rgba(0, 0, 0, 0.6);
}

.home-dialog {
  width: 100%;
  max-width: 560px;
  padding: var(--ui-space-5);
  background: var(--ui-surface);
  border: 1px solid var(--ui-border);
  border-radius: var(--ui-radius-lg);
  box-shadow: var(--ui-shadow-pop);
}

.home-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--ui-space-3);
  margin-bottom: var(--ui-space-3);
}

.home-dialog-head h3 {
  font-size: var(--ui-text-lg);
  line-height: 1.625rem;
  font-weight: 600;
  color: var(--ui-text);
}

.home-dialog-close {
  width: 30px;
  padding: 0;
}

.home-dialog-desc {
  font-size: var(--ui-text-sm);
  color: var(--ui-text-muted);
  margin-bottom: var(--ui-space-4);
}

.home-dialog-desc strong {
  color: var(--ui-text);
  font-weight: 600;
}

.home-dialog-url {
  display: flex;
  gap: var(--ui-space-2);
}

.home-dialog-url .form-control {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 0 var(--ui-space-3);
  font-size: 0.8125rem;
}

.home-dialog-meta {
  margin-top: var(--ui-space-3);
  font-size: var(--ui-text-xs);
  color: var(--ui-text-dim);
}

.home-dialog-actions {
  display: flex;
  justify-content: space-between;
  gap: var(--ui-space-2);
  margin-top: var(--ui-space-5);
  padding-top: var(--ui-space-4);
  border-top: 1px solid var(--ui-border);
}

/* Toast */
.toast-notice {
  display: flex;
  align-items: center;
  gap: var(--ui-space-2);
  font-size: var(--ui-text-sm);
  border-radius: var(--ui-radius-sm);
}

.toast-notice .btn-icon {
  color: var(--ui-success);
}

/* =======================================================
   MÓVIL
   ======================================================= */
@media (max-width: 720px) {
  .home-hero {
    padding: var(--ui-space-4) 0 var(--ui-space-6);
    margin-bottom: var(--ui-space-6);
  }

  .home-hero h2 {
    font-size: var(--ui-text-2xl);
    line-height: 2.25rem;
  }

  .home-hero p {
    font-size: var(--ui-text-md);
    line-height: 1.5rem;
  }

  .home-dialog-url {
    flex-direction: column;
  }
}
