body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #141414; /* Fondo oscuro principal */
  color: #fff;
}

.main-header {
  background-color: #101010;
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #303030;
}

.main-header h2 {
  margin: 0;
  font-size: 1.8rem;
  color: #e50914; /* Color rojo distintivo */
  text-transform: uppercase;
  font-weight: bold;
}

.container {
    padding: 20px;
}

.page-title {
    text-align: center;
    margin-bottom: 30px;
}

.movie-grid {
    display: grid;
    /* Crea columnas automáticas que miden como mínimo 200px */
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px; /* Espacio entre los posters */
}

.movie-card {
    background-color: #222;
    border-radius: 8px;
    overflow: hidden; /* Asegura que la imagen no se salga del borde redondeado */
    transition: transform 0.2s ease;
}

.movie-card:hover {
    transform: scale(1.05); /* Efecto de zoom al pasar el ratón */
    cursor: pointer;
}

.movie-card img {
    width: 100%;
    display: block; /* Elimina un pequeño espacio debajo de la imagen */
}

.movie-card-title {
    padding: 10px;
    font-size: 0.9rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; /* Pone "..." si el título es muy largo */
}

.main-footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #303030;
    color: #888;
}
/* --- Estilos para la página de detalles --- */

.movie-details-container {
    display: flex; /* Usamos flexbox para alinear poster e info */
    align-items: flex-start; /* Alinea los items arriba */
    padding: 50px;
    gap: 40px; /* Espacio entre el poster y la información */
    background-size: cover;
    background-position: center;
    min-height: 80vh;
}

.details-poster img {
    width: 300px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.details-info {
    flex: 1; /* Permite que esta sección ocupe el espacio restante */
}

.details-title {
    font-size: 3rem;
    margin-top: 0;
    margin-bottom: 5px;
}

.details-title span {
    font-weight: 300;
    color: #ccc;
}

.details-meta {
    font-size: 1rem;
    color: #ccc;
    margin-bottom: 20px;
}

.details-rating {
    font-size: 1.2rem;
    font-weight: bold;
    background-color: #e50914;
    display: inline-block;
    padding: 8px 15px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.details-tagline {
    font-style: italic;
    color: #aaa;
    margin-bottom: 20px;
}

.details-overview {
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Para pantallas más pequeñas (móviles) */
@media (max-width: 768px) {
    .movie-details-container {
        flex-direction: column; /* Pone el poster encima de la info */
        align-items: center;
        padding: 20px;
    }

    .details-info {
        text-align: center;
    }
}
/* --- Estilos para la sección de Reseña --- */

.details-review {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3); /* Fondo semi-transparente */
    border-radius: 8px;
    border-left: 4px solid #e50914; /* Borde de acento rojo */
}

.details-review h3 {
    margin-top: 0;
    font-size: 1.4rem;
    color: #fff;
}

.details-review p {
    font-size: 1rem;
    color: #ddd; /* Un gris un poco más claro para la lectura */
    line-height: 1.7;
    font-style: italic;
}
/* --- Estilos para la sección "Dónde Ver" --- */

.where-to-watch {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05); /* Fondo muy sutil para diferenciar */
    border-radius: 8px;
}

.where-to-watch h2 {
    margin-top: 0;
    border-bottom: 2px solid #e50914;
    padding-bottom: 10px;
    display: inline-block;
}

.provider-category {
    margin-bottom: 20px;
}

.provider-category h3 {
    color: #ccc;
    font-weight: normal;
    margin-bottom: 15px;
}

.provider-list {
    display: flex;
    flex-wrap: wrap; /* Permite que los items pasen a la siguiente línea */
    gap: 15px; /* Espacio entre logos */
}

.provider-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 8px;
    text-decoration: none;
    color: #fff;
    transition: background-color 0.2s ease;
}

.provider-item:hover {
    background-color: rgba(229, 9, 20, 0.7); /* Rojo al pasar el ratón */
}

.provider-item img {
    width: 40px;
    height: 40px;
    border-radius: 50%; /* Logos redondos */
}
/* --- Estilos para el Header y el Formulario de Búsqueda --- */

.main-header {
    display: flex; /* Usamos flexbox para alinear logo y buscador */
    justify-content: space-between; /* Pone espacio entre los elementos */
    align-items: center; /* Centra verticalmente */
    flex-wrap: wrap; /* Permite que el buscador pase abajo en pantallas pequeñas */
    gap: 20px;
}

.logo-link {
    text-decoration: none; /* Quita el subrayado del logo */
}

.search-form {
    display: flex; /* Alinea el campo de texto y el botón */
}

.search-form input[type="text"] {
    padding: 10px;
    font-size: 1rem;
    border: 1px solid #333;
    border-radius: 5px 0 0 5px; /* Redondea solo las esquinas izquierdas */
    background-color: #222;
    color: #fff;
    outline: none; /* Quita el borde azul al hacer clic */
}

.search-form button {
    padding: 10px 20px;
    font-size: 1rem;
    border: none;
    border-radius: 0 5px 5px 0; /* Redondea solo las esquinas derechas */
    background-color: #e50914; /* Rojo distintivo */
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-form button:hover {
    background-color: #f6121d; /* Un rojo un poco más brillante */
}
/* --- Estilos para el Dashboard --- */

.dashboard-form {
    max-width: 800px;
    margin: 40px auto; /* Centra el formulario */
    padding: 30px;
    background-color: #1c1c1c;
    border-radius: 8px;
    border: 1px solid #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 1.1rem;
}

.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background-color: #222;
    border: 1px solid #444;
    border-radius: 5px;
    color: #fff;
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
}

.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e50914;
    box-shadow: 0 0 8px rgba(229, 9, 20, 0.5);
}

.btn-submit {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
    background-color: #e50914;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: #f6121d;
}
/* --- Estilos para la sección de Aporte con Tráiler y Botones --- */
.aporte-manual {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    border-left: 4px solid #17a2b8; /* Cambiamos el color para diferenciar */
}
.aporte-manual h3 {
    margin-top: 0;
    font-size: 1.4rem;
}
.aporte-manual p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Contenedor responsivo para el tráiler */
.trailer-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding-top: 56.25%; /* Proporción 16:9 */
    margin-bottom: 20px;
    background-color: #000; /* Fondo negro mientras carga */
    border-radius: 8px;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0; /* Quita cualquier borde del iframe */
}

/* --- Estilos MEJORADOS para los Botones de Aporte --- */

.aporte-botones {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center; /* ¡AQUÍ LOS CENTRAMOS! */
}

.btn-aporte {
    /* Hacemos el botón más grande */
    padding: 12px 24px; 
    font-size: 1.1rem; /* Texto un poco más grande */
    font-weight: bold;
    
    /* Usamos flexbox para alinear el icono y el texto dentro del botón */
    display: inline-flex;
    align-items: center;
    gap: 10px; /* Espacio entre el icono y el texto */

    color: #fff;
    text-decoration: none;
    border-radius: 8px; /* Bordes un poco más redondeados */
    border: none;
    
    /* Fondo con gradiente para llamar la atención */
    background: linear-gradient(45deg, #1d97ab, #17a2b8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Sombra para darle profundidad */

    transition: all 0.3s ease;
}

.btn-aporte:hover {
    /* Efecto al pasar el ratón */
    transform: translateY(-3px) scale(1.05); /* Se levanta y crece un poco */
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.4); /* La sombra se hace más pronunciada y con color */
    background: linear-gradient(45deg, #1dc5e3, #19bcca);
}

.btn-aporte i {
    /* Estilo opcional para el icono, por si queremos hacerlo más grande */
    font-size: 1.3em;
}
/* --- Estilos para la Página de Error 404 (Versión Centrada Definitiva) --- */

.error-page-container {
    display: flex;
    flex-direction: column; /* Apila los elementos (texto y anuncio) verticalmente */
    align-items: center;    /* Centra todo horizontalmente */
    justify-content: center;
    text-align: center;     /* Centra el texto por defecto */
    padding: 40px 20px;
    min-height: 70vh;
}

.error-content {
    display: flex;          /* Habilita flexbox para el contenido */
    flex-direction: column; /* Apila los elementos del texto verticalmente */
    align-items: center;    /* Centra los elementos de texto (título, párrafo, etc.) */
    max-width: 100%;
}

.error-title {
    font-size: 8rem;
    font-weight: 900;
    color: #e50914;
    line-height: 1;
    margin: 0;
    text-shadow: 4px 4px 0px #1c1c1c, 6px 6px 0px #333;
}

.error-content h2 {
    font-size: 2rem;
    margin-top: 10px;
}

.error-content p {
    font-size: 1.1rem;
    color: #ccc;
    max-width: 600px;
}

.error-actions {
    margin-top: 30px;
}

.error-search {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;

    /* --- LÍNEAS NUEVAS PARA CENTRAR --- */
    display: flex;
    justify-content: center;
}

.error-ad {
    margin-top: 40px;
}

.ad-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
}

.error-ad img {
    border: 1px solid #333;
    border-radius: 8px;
}
/* --- Estilos para la Paginación --- */
.paginacion-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.btn-paginacion {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #e50914;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-paginacion:hover {
    background-color: #f6121d;
    transform: scale(1.05);
}

.pagina-info {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ccc;
}