/* ===== Estilos generales ===== */
body {
  background-color: #121212;
  color: #fff;
  font-family: "Poppins", sans-serif;
}

/* ===== Contenedor ===== */
#contenedor {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ===== Cards ===== */
.card {
  width: 20rem;
  min-height: 40rem; /* altura fija para uniformidad */
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background-color: #2b2b2b;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

/* ===== Imágenes ===== */
.card img {
  width: 100%;
  height: 500px;
  object-fit: cover;      /* mantiene proporción */
  object-position: center;
}

/* ===== Cuerpo de la card ===== */
.card-body {
  flex-grow: 1;
  padding: 0.75rem;
  text-align: center;
}

/* ===== Título y texto ===== */
.card-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #ff5555;
}

.card-text {
  max-height: 80px;        /* controla cuánto texto se muestra */
  overflow: hidden;        /* oculta el resto */
  text-overflow: ellipsis; /* añade los "..." visualmente */
}

/* ===== Modal flotante ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #1a1a1a;
  border-radius: 10px;
  padding: 20px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  margin: 20px;
  border: 1px solid #333;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: #ff6b6b;
  transition: color 0.3s;
}

.modal-close:hover {
  color: #ff4444;
}

/* ===== Cards clicables ===== */
.serie-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(255, 193, 7, 0.3);
}
