/* Estilos Globales (Simulando Netflix) */
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #141414;
    color: #fff;
    padding: 20px;
    margin: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

/* --- Estilos para la Cartelera (index.html) --- */

.header {
    color: #e50914;
    font-size: 2em;
    margin-bottom: 30px;
    font-weight: bold;
}

.series-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.serie-item {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
     border-radius: 4px;
}

.serie-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.serie-poster {
    width: 100%;
    border-radius: 4px;
    aspect-ratio: 3/4;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    object-fit: contain; 
    display: block;
}

.serie-title {
    margin-top: 8px;
    font-size: 0.9em;
    font-weight: 500;
    text-align: left;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; 
}


/* --- Estilos para la Lista de serie(serie.html) --- */

.back-link {
    color: #fff;
    font-size: 1em;
    margin-bottom: 20px;
    display: inline-block;
    transition: color 0.2s;
}

.back-link:hover {
    color: #e50914;
}

.serie-info {
    display: flex;
    margin-bottom: 40px;
    align-items: flex-start;
}

.serie-info-poster {
    width: 250px;
    height: auto;
    border-radius: 6px;
    margin-right: 30px;
    background-color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-weight: bold;
    text-align: center;
}

.serie-details h1 {
    color: #e50914;
    font-size: 2.5em;
    margin-top: 0;
}

.serie-details p {
    font-size: 1.1em;
    line-height: 1.5;
    color: #ccc;
}

.capitulos-list h2 {
    color: #ccc;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-top: 30px;
}

.capitulo-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #222;
    transition: background-color 0.2s;
}

.capitulo-link {
    display: block; 
    cursor: pointer;
}

.capitulo-item:hover {
    background-color: #2a2a2a;
}

.capitulo-thumb {
    width: 150px;
    height: 84px;
    background-color: #444;
    border-radius: 4px;
    margin-right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9em;
    flex-shrink: 0;
    overflow: hidden; 
}

.capitulo-thumb .capitulo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.capitulo-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.2em;
    color: #fff;
}

.capitulo-details p {
    margin: 0;
    font-size: 0.9em;
    color: #aaa;
}


/* --- Estilos para la Página de Reproductor (reproductor.html) --- */

body.player-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content {
    display: flex;
    max-width: 1400px;
    width: 100%;
    margin: 20px auto;
    flex-grow: 1;
}

.video-player-area {
    flex: 3;
    padding-right: 30px;
}

.sidebar {
    flex: 1;
    min-width: 300px;
    background-color: #222;
    padding: 15px;
    border-radius: 6px;
    height: fit-content;
}

.video-player-area video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.video-meta h1 {
    font-size: 1.8em;
    color: #fff;
    margin-bottom: 5px;
}

.video-meta p {
    color: #aaa;
    font-size: 1em;
    margin-top: 0;
    line-height: 1.5;
}


/* Estilos de la lista de reproducción en la barra lateral */
.sidebar h3 {
    color: #e50914;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.next-episode-item {
    display: flex;
    margin-bottom: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    padding: 8px;
    border-radius: 4px;
}

.next-episode-item:hover {
    background-color: #333;
}

.next-thumb {
    width: 80px;
    height: 45px;
    background-color: #444;
    border-radius: 3px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    flex-shrink: 0;
}

.next-details strong {
    display: block;
    font-size: 0.9em;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.next-details span {
    font-size: 0.8em;
    color: #999;
}