/* layout.css - Sistema de Disposición y Estructura Modular para la Suite de Streaming */

/* =======================================================
   1. CONTENEDORES PRINCIPALES Y WRAPPERS
   ======================================================= */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 50% 0%, rgba(145, 70, 255, 0.12) 0%, rgba(10, 10, 18, 0.95) 70%),
              radial-gradient(circle at 100% 100%, rgba(29, 185, 84, 0.08) 0%, transparent 50%),
              var(--bg-primary);
  background-attachment: fixed;
  overflow-x: hidden;
}

.layout-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem 2rem;
  flex: 1;
}

.layout-container-narrow {
  max-width: 960px;
}

.layout-container-wide {
  max-width: 1600px;
}

/* =======================================================
   2. CABECERA SUPERIOR UNIVERSAL (TOP NAVBAR)
   ======================================================= */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 2.2rem;
  background: var(--bg-glass-strong);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-sm);
}

.brand-icon.twitch-glow {
  background: rgba(145, 70, 255, 0.15);
  border-color: var(--twitch-purple);
  box-shadow: 0 0 16px rgba(145, 70, 255, 0.35);
}

.brand-icon.spotify-glow {
  background: rgba(29, 185, 84, 0.15);
  border-color: var(--spotify-green);
  box-shadow: 0 0 16px rgba(29, 185, 84, 0.35);
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* =======================================================
   3. HERO BANNER DE PÁGINA
   ======================================================= */
.page-hero {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-top: 1rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  background: rgba(145, 70, 255, 0.12);
  border: 1px solid rgba(145, 70, 255, 0.35);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--twitch-purple-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-hero h2 {
  font-size: 2.75rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 30%, #cbd5e1 70%, #94a3b8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.page-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* =======================================================
   4. GRID DEL HUB PRINCIPAL (2 COLUMNAS HERO)
   ======================================================= */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

/* =======================================================
   5. GRID DEL PANEL DE SUBATHON
   ======================================================= */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 1.5rem;
}

.dashboard-full-width {
  grid-column: 1 / -1;
}

/* =======================================================
   6. GRID DEL CONFIGURADOR SPOTIFY
   ======================================================= */
.spotify-workspace-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: start;
}

/* =======================================================
   7. FOOTER DE LA SUITE
   ======================================================= */
.app-footer {
  text-align: center;
  padding: 2rem;
  font-size: 0.85rem;
  color: var(--text-dim);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(10, 10, 18, 0.6);
}

.app-footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.app-footer a:hover {
  color: #ffffff;
}

/* =======================================================
   8. SISTEMA RESPONSIVE / MEDIA QUERIES
   ======================================================= */
@media (max-width: 1080px) {
  .hub-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .spotify-workspace-grid {
    grid-template-columns: 1fr;
  }

  .page-hero h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0.9rem 1.2rem;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .header-actions {
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .layout-container {
    padding: 1rem 1rem 2rem 1rem;
  }

  .page-hero h2 {
    font-size: 1.8rem;
  }

  .page-hero p {
    font-size: 0.95rem;
  }
}
