body {
    font-family: 'Arial', sans-serif;
    background: #121212;
    color: #ffffff;
    margin: 0;
    padding: 20px;
}

a {
    color: #e50914;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.grid-container a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.grid-container a:hover {
    opacity: 0.85;
}

@media (max-width: 1400px) {
    .grid-container {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

.card, .pelicula {
    background: #1c1c1c;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.card:hover, .pelicula:hover {
    transform: scale(1.03);
}

.card img, .pelicula img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card-content {
    padding: 10px;
}

.card h2, .pelicula h2 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #fff;
}

.card p {
    font-size: 13px;
    color: #ccc;
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 14px;
    color: #888;
}

.pelicula h2 {
    font-size: 16px;
    color: #fff;
    margin: 10px 0 5px;
    height: 42px;
    overflow: hidden;
}

.pelicula .info-extra {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 14px;
    color: #ccc;
    padding: 10px;
}
.tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
}

.tab {
    padding: 10px 20px;
    border-radius: 9999px;
    background-color: #1e1e1e;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
    border: 2px solid transparent;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
}

.tab:hover {
    background-color: #2a2a2a;
    transform: scale(1.05);
}

.tab.active {
    background-color: #8b5cf6;
    color: #fff;
    border-color: #a78bfa;
}

.pelicula {
    background: #1c1c1c;
    border-radius: 10px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    text-align: center;
}

.pelicula img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.pelicula .overlay {
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    text-align: center;
}

.pelicula .overlay h2 {
    font-size: 15px;
    margin: 0;
    line-height: 1.2;
}

.busqueda {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px; /* centrado horizontal con margen inferior */
    text-align: center;
}

.busqueda input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #555;
    background: #1e1e1e;
    color: #fff;
    font-size: 16px;
}

.suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #2d2d2d;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.5);
    overflow-y: auto;
    max-height: 250px;
    list-style: none;
    margin-top: 5px;
    display: none;
}


.suggestions li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.suggestions li:hover {
    background-color: #444;
}

.filtros {
    margin-top: 10px;
    transition: margin-top 0.2s ease;
}

#buscar {
    display: block;
    margin: 0 auto;
    text-align: center;
}

.busqueda {
    position: relative; /* NECESARIO para anclar .suggestions */
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px;
}

.busqueda input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #555;
    background: #1e1e1e;
    color: #fff;
    font-size: 16px;
    text-align: center; /* centrado de texto */
}

.suggestions {
    position: absolute;
    top: 100%;       /* justo debajo del input */
    left: 0;         /* alineado al input */
    width: 100%;     /* igual ancho que el input */
    margin-top: 5px;
    z-index: 1000;
    background: #2d2d2d;
    color: #fff;
    border-radius: 8px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.5);
    overflow-y: auto;
    max-height: 250px;
    list-style: none;
    padding: 0;
    display: none;
}

.suggestions li {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.suggestions li:hover {
    background-color: #444;
}

.paginacion {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.paginacion a {
    padding: 8px 14px;
    border-radius: 8px;
    background-color: #1e1e1e;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
    display: inline-block;
}

.paginacion a:hover {
    background-color: #444;
    transform: scale(1.05);
}

.paginacion a.active {
    background-color: #8b5cf6;
    color: #fff;
    border-color: #a78bfa;
}

.navegacion-slider {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.navegacion-slider {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.navegacion-slider .paginador {
    padding: 8px 14px;
    border-radius: 8px;
    background-color: #1e1e1e;
    color: #fff;
    font-weight: bold;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.navegacion-slider .paginador:hover {
    background-color: #444;
    transform: scale(1.05);
}

.navegacion-slider .paginador.activa {
    background-color: #8b5cf6;
    border-color: #a78bfa;
    color: #fff;
}

/* === BOTONES DE ACCIÓN (mensajes, formularios) === */
.boton-accion {
    display: inline-block;
    padding: 8px 14px;
    margin: 5px 4px;
    border-radius: 8px;
    background-color: #272727;
    color: #fff;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: 2px solid transparent;
    font-size: 14px;
}

.boton-accion:hover {
    background-color: #444;
    transform: scale(1.05);
}

.boton-leer {
    background-color: #3b82f6;
}

.boton-leer:hover {
    background-color: #2563eb;
}

.boton-responder {
    background-color: #10b981;
}

.boton-responder:hover {
    background-color: #059669;
}

.boton-eliminar {
    background-color: #ef4444;
}

.boton-eliminar:hover {
    background-color: #dc2626;
}

/* === ACCIONES DE MENSAJE (Contenedor botones juntos) === */
.acciones-mensaje {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* === BLOQUES DE MENSAJE GENERALES === */
.bloque {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

/* === MENSAJES DE ESTADO === */
.mensaje {
    color: #10b981;
    font-weight: bold;
}

.error {
    color: #ef4444;
    font-weight: bold;
}
.scrollable {
    max-height: 700px;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #1e1e1e;
}
.scrollable::-webkit-scrollbar {
    width: 6px;
}
.scrollable::-webkit-scrollbar-thumb {
    background-color: #8b5cf6;
    border-radius: 4px;
}
.scrollable::-webkit-scrollbar-track {
    background: #1e1e1e;
}

/* Estilo para favoritos en grid */
.favoritos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}
.favorito {
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.favorito img.poster {
    width: 100%;
    height: auto;
    max-height: 220px;
}


