/* ========================================
   DETAIL PAGE - Tela Cheia Premium Netflix
   Sinopse, elenco, temporadas, episódios
   ======================================== */

/* Tela Cheia */
.detail-overlay {
    position: fixed;
    inset: 0;
    background: #141414;
    z-index: 9000;
    display: none;
    overflow-y: auto;
    overflow-x: hidden;
    animation: fadeIn 0.3s ease;
}

.detail-overlay.active {
    display: block;
}

/* Full-screen modal container */
.detail-modal {
    width: 100%;
    min-height: 100vh;
    background: #141414;
}

/* Botão Voltar */
.detail-close {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.7);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 22px;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.detail-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* ====== HERO CINEMATOGRÁFICO ====== */
.detail-hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 500px;
    overflow: hidden;
}

.detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.detail-hero-placeholder {
    width: 100%;
    height: 100%;
}

/* Gradientes do hero */
.detail-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #141414 0%, rgba(20, 20, 20, 0.8) 15%, transparent 50%),
        linear-gradient(to right, rgba(20, 20, 20, 0.9) 0%, transparent 50%);
}

/* Conteúdo sobre o Hero */
.detail-hero-content {
    position: absolute;
    bottom: 15%;
    left: 5%;
    right: 40%;
    z-index: 2;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.detail-title {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: 3px;
    margin-bottom: 16px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
}

/* Botões de ação */
.detail-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    letter-spacing: 0.5px;
}

.detail-btn-play {
    background: white;
    color: black;
}

.detail-btn-play:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.detail-btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(4px);
}

.detail-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ====== CORPO DO DETALHE ====== */
.detail-body {
    padding: 0 5% 60px;
    position: relative;
    z-index: 5;
    margin-top: -10vh;
}

/* Grid de informações */
.detail-info-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    margin-bottom: 32px;
}

/* Meta info (rating, ano, duração) */
.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.detail-meta-item {
    font-size: 14px;
    color: #aaa;
}

.detail-rating {
    color: #46d369;
    font-weight: 700;
    font-size: 16px;
}

.detail-year {
    border: 1px solid #666;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #ccc;
}

.detail-duration {
    color: #aaa;
    font-size: 14px;
}

/* Sinopse */
.detail-plot {
    font-size: 15px;
    line-height: 1.7;
    color: #d2d2d2;
    margin-bottom: 8px;
    max-width: 700px;
}

/* Informações laterais */
.detail-side-info {
    font-size: 14px;
    color: #777;
    line-height: 2;
}

.detail-side-info span {
    color: #bbb;
}

.detail-side-label {
    color: #666;
}

/* ====== TEMPORADAS & EPISÓDIOS ====== */
.detail-episodes-section {
    margin-top: 40px;
    border-top: 1px solid #333;
    padding-top: 32px;
}

.detail-episodes-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.detail-episodes-title {
    font-size: 24px;
    font-weight: 700;
}

/* Seletor de temporada */
.detail-season-select {
    background: #242424;
    color: white;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 10px 40px 10px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.2s;
}

.detail-season-select:hover {
    border-color: #e50914;
}

/* Lista de episódios */
.detail-episodes-list {
    display: flex;
    flex-direction: column;
}

.detail-episode {
    display: grid;
    grid-template-columns: 60px 180px 1fr;
    gap: 20px;
    align-items: center;
    padding: 20px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #252525;
    border-radius: 4px;
}

.detail-episode:hover {
    background: #252525;
}

.episode-number {
    font-size: 28px;
    font-weight: 500;
    color: #777;
    text-align: center;
}

.episode-thumb {
    width: 180px;
    aspect-ratio: 16/9;
    border-radius: 6px;
    background: #333;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.episode-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.episode-play-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.2s;
    border-radius: 6px;
}

.detail-episode:hover .episode-play-icon {
    opacity: 1;
}

.episode-info {
    min-width: 0;
}

.episode-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #e5e5e5;
}

.episode-plot {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.episode-duration {
    font-size: 12px;
    color: #666;
    margin-top: 6px;
}

/* Loading state */
.detail-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #999;
    gap: 12px;
    font-size: 15px;
}

/* ====== ANIMAÇÕES ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ====== RESPONSIVO ====== */
@media (max-width: 768px) {
    .detail-hero {
        height: 55vh;
        min-height: 350px;
    }

    .detail-hero-content {
        right: 10%;
        bottom: 10%;
    }

    .detail-title {
        font-size: 1.8rem;
    }

    .detail-body {
        padding: 0 16px 40px;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .detail-episode {
        grid-template-columns: 40px 1fr;
        gap: 12px;
    }

    .episode-thumb {
        display: none;
    }

    .detail-close {
        top: 12px;
        left: 12px;
        width: 38px;
        height: 38px;
    }
}