/* ============================================================
   StreamHub - Estilos Principales
   Paleta: Negros, grises y morado como color de acento
   Fuente: Space Mono (mono) + DM Sans (cuerpo)
   ============================================================ */

/* --- Importar fuentes de Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

/* --- Variables CSS para el sistema de temas --- */
:root {
  /* Colores modo DARK (predeterminado) */
  --bg-primary: #0a0a0c;
  --bg-secondary: #111116;
  --bg-card: #16161d;
  --bg-card-hover: #1e1e28;
  --bg-input: #1a1a22;

  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #5a5a72;

  --accent: #8b5cf6;
  --accent-hover: #7c3aed;
  --accent-soft: rgba(139, 92, 246, 0.15);
  --accent-glow: rgba(139, 92, 246, 0.3);

  --border: rgba(255, 255, 255, 0.07);
  --border-accent: rgba(139, 92, 246, 0.4);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.4);

  --navbar-bg: rgba(10, 10, 12, 0.92);
  --live-badge: #ef4444;

  /* Transición suave para cambio de tema */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Variables CSS para modo LIGHT --- */
[data-theme="light"] {
  --bg-primary: #f4f4f8;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f0f0f7;
  --bg-input: #ededf5;

  --text-primary: #0a0a14;
  --text-secondary: #4a4a62;
  --text-muted: #8a8aa8;

  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-glow: rgba(124, 58, 237, 0.2);

  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(124, 58, 237, 0.35);

  --shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.08);

  --navbar-bg: rgba(244, 244, 248, 0.92);
}

/* ============================================================
   BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  transition: var(--transition);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Scrollbar personalizado */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-hover); }

/* ============================================================
   NAVBAR
   ============================================================ */
.streamhub-navbar {
  background: var(--navbar-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  padding: 0 1.5rem;
  height: 64px;
}

/* Logo con fuente monoespaciada para identidad de marca */
.navbar-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text-primary) !important;
  text-decoration: none;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.logo-dot {
  color: var(--accent);
}

/* Links del navbar */
.navbar-nav .nav-link {
  color: var(--text-secondary) !important;
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.2px;
  padding: 0.4rem 0.75rem !important;
  border-radius: 6px;
  transition: var(--transition);
  text-transform: uppercase;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--text-primary) !important;
  background: var(--accent-soft);
}

/* Botón de inicio de sesión */
.btn-login {
  background: var(--accent);
  color: #fff !important;
  border: none;
  padding: 0.4rem 1.1rem !important;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  letter-spacing: 0.3px;
}

.btn-login:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

/* Botón toggle de tema */
.btn-theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1rem;
}

.btn-theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Hamburger icon en móvil */
.navbar-toggler {
  border: 1px solid var(--border) !important;
  background: var(--bg-card) !important;
  color: var(--text-primary) !important;
}

/* ============================================================
   SECCIONES GENERALES
   ============================================================ */
.section {
  padding: 3.5rem 0;
}

.section-title {
  font-family: 'Space Mono', monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-left: auto;
  font-family: 'Space Mono', monospace;
}

/* ============================================================
   MATCHES SLIDER (Sección 1)
   ============================================================ */
.matches-section {
  background: var(--bg-primary);
  padding: 2.5rem 0;
}

.matches-slider-wrapper {
  position: relative;
  overflow: hidden;
}

.matches-slider {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 0.5rem 0 1rem;
  scrollbar-width: none; /* Esconde scrollbar en Firefox */
  -ms-overflow-style: none; /* Esconde en IE */
  cursor: grab;
}

.matches-slider::-webkit-scrollbar { display: none; }
.matches-slider.grabbing { cursor: grabbing; }

/* Tarjeta de partido */
.match-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  min-width: 260px;
  max-width: 260px;
  padding: 1.1rem;
  flex-shrink: 0;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.match-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent);
  opacity: 0;
  transition: var(--transition);
}

.match-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-card), 0 0 20px var(--accent-glow);
}

.match-card:hover::before {
  opacity: 1;
}

/* Cabecera de la tarjeta: liga */
.match-league {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.9rem;
}

.match-league-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: brightness(0.9);
}

.match-league-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex: 1;
}

/* Badge de estado: EN VIVO o próximo */
.match-status-badge {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}

.badge-live {
  background: var(--live-badge);
  color: white;
  animation: pulse-badge 2s infinite;
}

.badge-upcoming {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.badge-finished {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.team-box {
  color: var(--text-primary);
}

/* Animación de pulso para el badge LIVE */
@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Contenido del partido: equipos */
.match-teams {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.match-team {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.team-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.team-name {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
}

/* Marcador / VS en el centro */
.match-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 60px;
}

.score-numbers {
  font-family: 'Space Mono', monospace;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.score-vs {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
}

.score-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
}

/* Flechas de navegación del slider */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition);
  font-size: 0.85rem;
}

.slider-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.slider-arrow-left { left: -5px; }
.slider-arrow-right { right: -5px; }

/* ============================================================
   CHANNELS SECTION (Sección 2)
   ============================================================ */
.channels-section {
  background: var(--bg-secondary);
  padding: 3rem 0;
  border-top: 1px solid var(--border);
}

/* Pills de categorías */
.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.pill {
  padding: 0.3rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 10px var(--accent-glow);
}

/* Barra de búsqueda */
.search-wrapper {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 1rem 0.65rem 2.8rem;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Grid de canales */
.channels-grid {
  display: grid;
  /* Grid responsivo: min 160px por columna */
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

/* Tarjeta de canal */
.channel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  aspect-ratio: 1; /* Cuadrado */
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.channel-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-soft);
  opacity: 0;
  transition: var(--transition);
}

.channel-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card), 0 8px 24px var(--accent-glow);
  color: inherit;
}

.channel-card:hover::after {
  opacity: 1;
}

.channel-logo-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 8px;
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.channel-card:hover .channel-logo-wrapper {
  background: var(--bg-card);
}

.channel-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: var(--transition);
}

[data-theme="light"] .channel-logo {
  filter: none;
  opacity: 1;
}

.channel-card:hover .channel-logo {
  opacity: 1;
}

.channel-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.channel-category-label {
  font-size: 0.68rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

/* Mensaje de no resultados */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 0;
  font-size: 0.9rem;
}

/* ══════════════════════════════════════
   PROGRAMAS EN VIVO
══════════════════════════════════════ */
.section-programs { border-top: 1px solid var(--border); background: var(--bg-secondary); }
.program-row {
  display: grid; grid-template-columns: 200px 1fr auto;
  align-items: center; gap: 16px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 16px;
  cursor: pointer; transition: border-color .2s; text-decoration: none; margin-bottom: 10px;
  color: var(--text-primary);
}
.program-row:hover { border-color: var(--accent); background: var(--bg-card-hover); }
.program-ch { display: flex; align-items: center; gap: 12px; }
.program-ch-thumb {
  width: 56px; height: 56px; background: var(--bg-input);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  flex: 0 0 56px; overflow: hidden;
}
.program-ch-thumb img { width: 100%; height: 100%; object-fit: cover; }
.program-ch-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.program-ch-cat  { font-size: 11px; color: var(--text-muted); text-transform: capitalize; }
.program-info h4 { font-size: 14px; font-weight: 500; color: var(--text-primary); margin: 0 0 4px; }
.program-info p  { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.program-progress-wrap { min-width: 110px; text-align: right; }
.program-time { font-size: 11px; color: var(--text-muted); margin-bottom: 6px; display: block; font-family: 'Space Mono', monospace; }
.program-bar  { height: 3px; background: var(--border); border-radius: 2px; }
.program-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width .5s; }

/* ============================================================
   FOOTER
   ============================================================ */
.streamhub-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

/* ============================================================
   CHANNEL PAGE (Página de reproducción)
   ============================================================ */
.channel-page-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  padding: 1.5rem 0;
}

/* Columna izquierda: reproductor */
.player-column {}

/* Header del reproductor */
.player-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.player-channel-name {
  font-family: 'Space Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.live-pill {
  background: var(--live-badge);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: 'Space Mono', monospace;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  animation: pulse-badge 2s infinite;
}

.live-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  background: white;
  border-radius: 50%;
}

/* Wrapper del iframe con proporción 16:9 */
.player-iframe-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Proporción 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #000;
}

.player-iframe-wrapper iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Pantalla placeholder cuando no hay stream */
.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0a;
  color: var(--text-muted);
  gap: 1rem;
}

.player-placeholder-icon {
  font-size: 3rem;
  color: var(--accent);
  opacity: 0.4;
}

/* Info del canal bajo el reproductor */
.channel-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.channel-info-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.channel-avatar {
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  overflow: hidden;
  padding: 6px;
  flex-shrink: 0;
}

.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

[data-theme="light"] .channel-avatar img {
  filter: none;
}

.channel-title-group h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.channel-views {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Botones de interacción al estilo YouTube */
.interaction-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn-interact {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  border-radius: 100px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: 'DM Sans', sans-serif;
}

.btn-interact:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-interact.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Columna derecha: chat */
.chat-column {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chat-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 14px 14px 0 0;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-title {
  font-family: 'Space Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-users-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-input);
  padding: 2px 8px;
  border-radius: 100px;
}

.chat-messages {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-bottom: none;
  height: 400px;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Mensaje de chat */
.chat-message {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.chat-bubble {
  flex: 1;
}

.chat-user {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.chat-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Placeholder de chat no disponible */
.chat-unavailable {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-bottom: none;
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 2rem;
}

.chat-unavailable-icon {
  font-size: 2.5rem;
  opacity: 0.3;
}

.chat-input-area {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 14px 14px;
  padding: 0.75rem;
}

.chat-input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  color: var(--text-muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Sección de canales recomendados */
.recommended-section {
  padding: 2.5rem 0;
}

/* ============================================================
   AUTH PAGES (Login / Registro)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  padding: 2rem;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-logo {
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

.auth-tabs {
  display: flex;
  gap: 0;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.75rem;
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  border-radius: 7px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-muted);
  border: none;
  background: transparent;
  font-family: 'DM Sans', sans-serif;
}

.auth-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

/* Inputs del formulario */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  letter-spacing: 0.3px;
}

.form-control-sh {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 1rem;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: var(--transition);
  outline: none;
}

.form-control-sh:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-control-sh::placeholder {
  color: var(--text-muted);
}

.btn-auth-submit {
  width: 100%;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
  letter-spacing: 0.3px;
}

.btn-auth-submit:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.auth-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  margin: 1.25rem 0;
  position: relative;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.alert-sh {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.83rem;
  margin-bottom: 1rem;
  display: none;
}

.alert-sh.alert-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.alert-sh.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .channel-page-layout {
    grid-template-columns: 1fr;
  }

  .chat-messages, .chat-unavailable {
    height: 280px;
  }

  .channels-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .match-card {
    min-width: 220px;
  }
}

@media (max-width: 576px) {
  .channels-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section {
    padding: 2rem 0;
  }
}

/* ============================================================
   ANIMACIONES DE ENTRADA
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

.fade-in-delay-1 { animation-delay: 0.1s; opacity: 0; }
.fade-in-delay-2 { animation-delay: 0.2s; opacity: 0; }
.fade-in-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ============================================================
   BOOTSTRAP DROPDOWN - Override para dark/light theme
   ============================================================ */
.dropdown-menu {
  --bs-dropdown-bg: var(--bg-card);
  --bs-dropdown-border-color: var(--border);
  --bs-dropdown-color: var(--text-secondary);
  --bs-dropdown-link-color: var(--text-secondary);
  --bs-dropdown-link-hover-color: var(--accent);
  --bs-dropdown-link-hover-bg: var(--accent-soft);
  --bs-dropdown-link-active-bg: var(--accent);
  --bs-dropdown-link-active-color: white;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  margin-top: 0.35rem;
  box-shadow: var(--shadow);
}

.dropdown-item {
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.45rem 1rem;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.dropdown-item.active,
.dropdown-item:active {
  background: var(--accent);
  color: white;
}

/* ============================================================
   EVENTOS PAGE - Fix pill styles en hero
   ============================================================ */
.events-hero-pills .pill {
  font-size: 0.78rem;
}
