/* Importar variables globales */
@import url('../components/variables.css');

/* Estilos para la página de lista de hosts */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
}

.main-content {
  flex: 1;
  background-color: var(--col-bac);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero Section */
.hosts-hero {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9), rgba(118, 75, 162, 0.9));
  color: white;
  padding: 60px 20px;
  text-align: center;
}

.hero-content h1 {
  font-size: 2.8rem;
  margin-bottom: 15px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.search-bar {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.search-bar input {
  flex: 1;
  padding: 15px 20px;
  border: none;
  background: transparent;
  color: white;
  font-size: 1rem;
  outline: none;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-bar button {
  padding: 15px 20px;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-bar button:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Content Section */
.hosts-content {
  padding: 60px 0;
}

/* Hosts Grid */
.hosts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.host-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
}

.host-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Host Image */
/* Avatar circular al estilo player.html */
.host-image {
  position: relative;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 16px;
}

.host-image img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--col-pri-60);
  box-shadow: 0 4px 18px rgba(0,0,0,.18);
}

.live-indicator {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #2ecc71; /* verde en vivo */
  color: white;
  padding: 5px 12px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
  animation: pulse-live 2s infinite;
}

.verified-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #4CAF50;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

@keyframes pulse-live {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Host Info */
.host-info {
  padding: 20px 22px 22px 22px;
}

.host-info h3 {
  font-size: 1.5rem;
  color: var(--col-fon);
  margin-bottom: 8px;
}

.host-category {
  color: var(--col-pri);
  font-weight: bold;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;           /* una sola línea */
  overflow: hidden;              /* evitar desbordes */
  text-overflow: ellipsis;       /* agrega '...' si no entra */
}

.host-description {
  color: #666;
  line-height: 1.5;
  margin-bottom: 20px;
  /* Fijar altura a 2 líneas para alinear cards */
  display: -webkit-box;
  display: box; /* fallback */
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.5em * 2);
  max-height: calc(1.5em * 2);
}

/* Host Stats */
.host-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 10px;
}

.stat {
  text-align: center;
  flex: 1;
}

.stat-number {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--col-pri);
}

.stat-label {
  font-size: 0.8rem;
  color: #666;
}

/* Current Trivia */
.current-trivia {
  background: linear-gradient(135deg, var(--col-pri), #7b4397);
  color: white;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.current-trivia h4 {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.current-trivia p {
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.trivia-link {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 15px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: bold;
  transition: all 0.3s ease;
  display: inline-block;
}

.trivia-link:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

/* Premio en la card */
.prize-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 10px;
  background: #f8f9ff;
  border: 1px solid #e8eaf6;
  margin-bottom: 16px;
}

.prize-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #ddd;
}

.prize-info h5 { margin: 0 0 4px 0; font-size: 0.95rem; color: var(--col-fon); }
.prize-info p { margin: 0; font-size: 0.85rem; color: #555; }

/* Social Links */
.social-links {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.social-links a i { line-height: 1; }

.social-links a[aria-label="YouTube"] {
  background: #FF0000;
}

.social-links a[aria-label="Twitch"] {
  background: #9146FF;
}

.social-links a[aria-label="Instagram"] {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-links a[aria-label="Twitter"] {
  background: #1DA1F2;
}

.social-links a[aria-label="TikTok"] {
  background: #000000;
}

.social-links a[aria-label="Spotify"] {
  background: #1DB954;
}

.social-links a:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Load More */
.load-more {
  text-align: center;
  margin: 50px 0;
}

.load-more-btn {
  background: var(--col-pri);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-more-btn:hover {
  background: #7b4397;
  transform: translateY(-2px);
}

/* Back Link */
.back-link {
  text-align: center;
  margin-top: 40px;
  padding: 0 20px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--col-pri);
  color: white;
  padding: 14px 20px;
  border-radius: 28px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  width: 100%;                 /* ocupar el ancho disponible */
  max-width: 100%;
  justify-content: center;
}

.btn-back:hover {
  background: #7b4397;
  transform: translateY(-2px);
}

/* Media Queries */
@media (max-width: 768px) {
  /* Centrado y padding uniforme en móvil */
  .container { padding-left: 16px; padding-right: 16px; }
  .hero-content h1 {
    font-size: 2rem;
  }
  
  .hosts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    justify-items: center; /* centra la tarjeta en la celda */
  }
  
  .host-card {
    margin: 0;                /* sin margen para evitar desbalance */
    width: 100%;
    max-width: 600px;         /* evita que crezca demasiado en tablets */
  }
  
  .host-info {
    padding: 18px 16px 20px 16px; /* centrar visualmente contenidos */
  }
  
  .host-stats {
    flex-direction: column;
    gap: 10px;
  }
  
  .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .search-bar {
    margin: 0 20px;
  }
  
  .hosts-content {
    padding: 40px 0;
  }
  
  .social-links a {
    width: 34px;
    height: 34px;
    font-size: 1rem;
  }

  /* Asegurar centrado de bloques internos */
  .current-trivia,
  .prize-block,
  .host-stats { margin-left: auto; margin-right: auto; }
  .current-trivia { width: 100%; }
}

/* Hidden class for search functionality */
.hidden {
  display: none;
}