﻿/* =========================================================
   PÁGINA
   ========================================================= */

.library-page {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    padding: 40px 35px 70px;
    color: #ffffff;
}


/* =========================================================
   HEADER
   ========================================================= */

.library-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 30px;
}


.library-eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #ff4d6a;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1.8px;
}


.library-page-header h1 {
    margin: 0;
    color: #ffffff;
    font-size: 32px;
    font-weight: 750;
    letter-spacing: -0.8px;
}


.library-page-header p {
    margin: 8px 0 0;
    color: #717783;
    font-size: 11px;
}


/* =========================================================
   TOTAL
   ========================================================= */

.library-total {
    min-width: 125px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 11px;
    background: rgba(255,255,255,.025);
}


    .library-total > i {
        color: #ff4d6a;
        font-size: 18px;
    }


    .library-total > div {
        display: flex;
        flex-direction: column;
    }


    .library-total span {
        color: #5f6671;
        font-size: 8px;
    }


    .library-total strong {
        color: #e9ebef;
        font-size: 13px;
    }


/* =========================================================
   GRID
   ========================================================= */

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 24px 18px;
}


/* =========================================================
   CARD
   ========================================================= */

.library-card {
    min-width: 0;
    cursor: pointer;
}


/* =========================================================
   POSTER
   ========================================================= */

.movie-poster {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 12px;
    background: #12151a;
    box-shadow: 0 10px 28px rgba(0,0,0,.25);
    transition: transform .25s ease, box-shadow .25s ease;
}


.library-card:hover
.movie-poster {
    transform: translateY(-5px);
    box-shadow: 0 18px 42px rgba(0,0,0,.5);
}


.movie-poster img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .4s ease, filter .3s ease;
}


.library-card:hover
.movie-poster img {
    transform: scale(1.06);
    filter: brightness(.62);
}


/* =========================================================
   SEM CAPA
   ========================================================= */

.poster-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #343a45;
    background: linear-gradient( 135deg, #181b22, #0e1015 );
}


    .poster-placeholder i {
        font-size: 36px;
    }


/* =========================================================
   GRADIENTE
   ========================================================= */

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient( 180deg, transparent 40%, rgba(5,6,8,.12) 60%, rgba(5,6,8,.94) 100% );
    opacity: .35;
    pointer-events: none;
    transition: opacity .22s ease;
}


.library-card:hover
.poster-gradient {
    opacity: 1;
}


/* =========================================================
   FAVORITO
   ========================================================= */

.favorite-button {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 5;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: rgba(7,8,11,.65);
    backdrop-filter: blur(8px);
    color: #ffffff;
    cursor: pointer;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity .2s ease, transform .2s ease, background .2s ease, color .2s ease;
}


    .library-card:hover
    .favorite-button,
    .favorite-button.favorited {
        opacity: 1;
        transform: translateY(0);
    }


    .favorite-button:hover {
        background: #ffffff;
        color: #111318;
    }


    .favorite-button.favorited {
        color: #ff3158;
    }


    .favorite-button i {
        font-size: 14px;
    }


/* =========================================================
   PLAY NO HOVER
   ========================================================= */

.poster-play {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .22s ease, transform .22s ease;
}


.library-card:hover
.poster-play {
    opacity: 1;
    transform: translateY(0);
}


.play-button {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #ffffff;
    color: #090a0c;
    cursor: pointer;
    box-shadow: 0 7px 22px rgba(0,0,0,.38);
    transition: transform .18s ease, background .18s ease, color .18s ease;
}


    .play-button:hover {
        transform: scale(1.08);
        background: #ff3158;
        color: #ffffff;
    }


    .play-button i {
        margin-left: 2px;
        font-size: 23px;
    }


.poster-play span {
    color: rgba(255,255,255,.9);
    font-size: 9px;
    font-weight: 600;
}


/* =========================================================
   INFO
   ========================================================= */

.movie-info {
    padding: 10px 3px 0;
}


    .movie-info h2 {
        margin: 0;
        overflow: hidden;
        color: #ebedf1;
        font-size: 12px;
        font-weight: 620;
        line-height: 1.35;
        white-space: nowrap;
        text-overflow: ellipsis;
    }


/* =========================================================
   META
   ========================================================= */

.movie-meta {
    min-height: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    color: #656c77;
    font-size: 9px;
}


.rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #aaaeb7;
    font-weight: 600;
}


    .rating i {
        color: #f3bb45;
        font-size: 9px;
    }


.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #474d57;
}


.classification {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}


/* =========================================================
   DESCRIÇÃO
   ========================================================= */

.movie-description {
    display: -webkit-box;
    margin: 6px 0 0;
    overflow: hidden;
    color: #626974;
    font-size: 9px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}


/* =========================================================
   ASSISTIR
   ========================================================= */

.watch-now {
    width: 100%;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 11px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 8px;
    background: rgba(255,255,255,.025);
    color: #888f99;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}


    .watch-now:hover {
        background: rgba(255,49,88,.10);
        border-color: rgba(255,49,88,.18);
        color: #ff6079;
    }


    .watch-now i {
        font-size: 12px;
    }


/* =========================================================
   PAGINAÇÃO
   ========================================================= */

.library-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}


/* =========================================================
   VAZIO
   ========================================================= */

.library-empty {
    min-height: 430px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,.08);
    border-radius: 16px;
    background: rgba(255,255,255,.015);
}


.empty-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 17px;
    background: rgba(255,49,88,.08);
    color: #ff506c;
}


    .empty-icon i {
        font-size: 27px;
    }


.library-empty h2 {
    margin: 0;
    color: #e8eaee;
    font-size: 18px;
}


.library-empty p {
    max-width: 350px;
    margin: 9px 0 20px;
    color: #636a75;
    font-size: 10px;
    line-height: 1.6;
}


.explore-button {
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border: none;
    border-radius: 9px;
    background: linear-gradient( 135deg, #ff3158, #ff506a );
    color: #ffffff;
    font-size: 9px;
    font-weight: 650;
    cursor: pointer;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .library-page {
        padding: 30px 22px 60px;
    }


    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .library-page {
        padding: 25px 15px 50px;
    }


    .library-page-header {
        align-items: flex-start;
        flex-direction: column;
    }


    .library-total {
        display: none;
    }


    .movies-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px 11px;
    }


    .favorite-button {
        opacity: 1;
        transform: none;
    }


    .poster-play {
        display: none;
    }


    .movie-description {
        -webkit-line-clamp: 1;
    }
}
