﻿/* --- Filmoteca --- */
.filmoteca-header {
    margin-bottom: 20px;
}

.filmoteca-header h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: #2c3e50;
    border-left: 4px solid #d32f2f;
    padding-left: 10px;
}

.filmoteca-header p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.filmoteca-filters {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
}

.filter-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 200px;
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    min-width: 120px;
}

.filter-action {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.filter-btn-primary {
    padding: 8px 16px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.filter-btn-primary:hover {
    background: #b71c1c;
}

.filter-btn-secondary {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.filter-btn-secondary:hover {
    background: #e0e0e0;
}

/* Grid de Filmes */
.filmoteca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.film-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.film-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.film-cover {
    position: relative;
    width: 100%;
    padding-top: 145%; /* Aspect Ratio 2:3 (Pôster) */
    background: #f9f9f9;
    overflow: hidden;
}

.film-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.film-year {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
}

.film-info {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.film-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px 0;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.film-original {
    font-size: 0.8rem;
    color: #777;
    margin: 0 0 4px 0;
    font-style: italic;
}

.film-genre {
    font-size: 0.85rem;
    color: #555;
    margin: 0 0 10px 0;
}

.view-details-btn {
    margin-top: auto;
    padding: 8px 12px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
    align-self: flex-start;
}

.view-details-btn:hover {
    background: #b71c1c;
}

/* Paginação */
.filmoteca-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Responsividade */
@media (max-width: 768px) {
    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-input, .filter-select {
        width: 100%;
    }
    
    .filmoteca-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

     .video-placeholder, #video-player iframe {
        height: 250px;
    }
    
    .video-cards-container {
        justify-content: center;
    }
}

/* --- Estilos dos Cards de Vídeo --- */
.film-videos-list {
    margin-top: 20px;
}

.film-videos-list h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.video-cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.video-card {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    min-width: 140px;
}

.video-card:hover {
    background: #e0e0e0;
    border-color: #d32f2f;
    transform: translateY(-2px);
}

.video-card-icon {
    font-size: 1.2rem;
    color: #d32f2f;
    background: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.video-card-info {
    display: flex;
    flex-direction: column;
}

.video-card-type {
    font-weight: 700;
    font-size: 0.85rem;
    color: #333;
}

.video-card-lang {
    font-size: 0.75rem;
    color: #666;
}

/* Player e Placeholder */
.video-placeholder {
    width: 100%;
    max-width: 800px;
    height: 450px;
    background: #000;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.no-videos-msg {
    padding: 20px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 10px;
}

/* Responsividade do Player 
@media (max-width: 768px) {
    .video-placeholder, #video-player iframe {
        height: 250px;
    }
    
    .video-cards-container {
        justify-content: center;
    }
}*/

/* --- Layout de Detalhes do Filme --- */

/* Container principal que segura as duas colunas */
.film-detail-content {
    display: flex;
    gap: 30px;
    align-items: flex-start; /* Alinha ao topo */
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Coluna Esquerda: Capa e Player */
.film-detail-left {
    flex: 0 0 300px; /* Largura fixa para a capa */
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.film-detail-cover img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    object-fit: cover;
}

.film-player-container {
    width: 100%;
    max-width: 100%;
}

/* Coluna Direita: Informações e Vídeos */
.film-detail-right {
    flex: 1; /* Ocupa o restante do espaço disponível */
    min-width: 0; /* Previne overflow em flexbox */
}

/* Estilos Gerais de Texto */
.detail-title {
    font-size: 2rem;
    color: #2c3e50;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.detail-original {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
    margin: 0 0 15px 0;
}

.detail-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-tag {
    background: #f0f0f0;
    color: #555;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-synopsis, .detail-cast {
    margin-bottom: 25px;
}

.detail-synopsis h3, .detail-cast h3, .film-videos-list h3 {
    font-size: 1.2rem;
    color: #d32f2f;
    margin-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 5px;
}

.detail-synopsis p {
    line-height: 1.6;
    color: #444;
    text-align: justify;
}

.detail-cast ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.detail-cast li {
    font-size: 0.95rem;
    color: #555;
    background: #f9f9f9;
    padding: 8px;
    border-radius: 4px;
}

.detail-cast li strong {
    color: #333;
    margin-right: 5px;
}

/* Botão Voltar */
.film-detail-header {
    margin-bottom: 20px;
}

.back-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.back-btn:hover {
    background: #e0e0e0;
    border-color: #ccc;
    color: #333;
}

/* Responsividade para Mobile */
@media (max-width: 900px) {
    .film-detail-content {
        flex-direction: column;
        align-items: center;
    }

    .film-detail-left {
        flex: 0 0 auto;
        max-width: 100%;
        width: 100%;
        align-items: center;
    }

    .film-detail-cover img {
        max-width: 250px; /* Limita o tamanho da capa no mobile */
    }

    .film-detail-right {
        width: 100%;
    }
    
    .detail-title {
        text-align: center;
    }
    
    .detail-original {
        text-align: center;
    }
    
    .detail-meta {
        justify-content: center;
    }
}