@font-face {
    font-family: 'newyork' ;
    src: url(fonts/NewYork\ PERSONAL\ USE.otf) format('opentype');
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html{
    scroll-behavior: smooth;
}

body{
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient( -45deg, #000000, #200707, #000000, #220101);
    background-size: 400% 400%;
    min-height: 100vh;
    color: white;
    text-align: center;
    animation: gradientMove 10s ease infinite;
}

.topo{
    padding: 30px 20px;
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.3);
    z-index: 10;
}

.topo h1{
    font-family: "newyork";
    font-size: 40px;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.lupa{
    position: absolute;
    left: 12px;
    font-size: 14px;
    pointer-events: none;
}

.busca{
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.busca button{
    padding: 12px 18px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    margin: 3px 5px;
    background: linear-gradient(135deg, #e50914, #b20710);
    color: white;
    transition: all 0.2s ease;
}

.busca button:active{
    transform: scale(0.96);
}

.busca .secundario{
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #ddd;
}

.busca .secundario:hover{
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 15px rgba(229, 9, 20, 0.299);
}

.pagina{
    padding: 8px 14px;
    border-radius: 10px;
    border: 1px solid #333;
    background: #000000;
    color: white;
    font-weight: bold;
    margin: 3px 12px;
    cursor: pointer;
}

#btn-favorito{
    display: block;
    margin: 10px auto 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
}

.boas-vindas{
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    gap: 12px;
    animation: aparecer 0.4s ease;
}

.boas-vindas h2{
    font-size: 24px;
    font-weight: bold;
    color: #fff;
}

.boas-vindas p{
    font-size: 14px;
    color: #a9a8a8;
    max-width: 320px;
    text-align: center;
    line-height: 1.6;
}

#filmes{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 200px));
    justify-content: center;
    gap: 15px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.filme{
    background: #0f0f0f;
    width: 200px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.5);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
    animation-fill-mode: forwards;
}

.filme::after{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    opacity: 0;
    transition: 0.3s;
}

.filme:hover::after{
    opacity: 1;
}

.filme:hover{
    transform: translateY(-10px) scale(1.07);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.filme:active{
    transform: translateY(-5px) scale(0.97);
}


.filme img{
    width: 100%;
    height: 300px;
    object-fit: cover;
    opacity: 0;
    transform: translateY(20px);
    animation: aparecerFilme 0.4s ease forwards;
}

.filme h3{
    font-size: 15px;
    margin: 10px;
}

.filme p{
    font-size: 13px;
    margin: 0 10px 10px;
    color: #bbb;
    line-height: 1.4;
}

.vazio{
    grid-column: 1/-1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 20px;
    gap: 10px;
    animation: aparecer 0.3s ease;
}

.vazio h3{
    font-size: 18px;
    color: #fff;
}

.vazio p{
    font-size: 13px;
    color: #666;
}

.modal{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    z-index: 11;
    transition: opacity 0.2s ease;
}

.modal-content{
    background: #0d0d0d;
    border: 1px solid rgba(255,255,255,0.07);
    padding: 0px;
    border-radius: 16px;
    width: 420px;
    max-height: 90vh;
    color: white;
    position: relative;
    animation: aparecer 0.25s ease;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
}

.modal-banner{
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 16px 16px 0 0;
    position: relative;
    flex-shrink: 0;
}

.modal-banner-gradiente{
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0d0d0d 5%, transparent 80%);
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.modal-titulo{
    margin: 10px 0;
    font-family: "newyork";
    font-size: 22px;
    font-weight: bold;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    text-align: left;
    line-height: 1.2;
}

.modal-corpo{
    padding: 16px 20px 24px;
    text-align: left;
}

.badges-linha{
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.badge{
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: #ccc;
    letter-spacing: 0.4px;
}

.badge-ano{
    background: rgba(229, 9, 20, 0.15);
    border-color: rgba(229,9,20,0.3);
    color: #e50914;
}

.barra-avaliacao{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.barra-label{
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
}

.barra-fundo{
    flex: 1;
    height: 5px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.barra-preenchimento{
    height: 100%;
    background: linear-gradient(90deg, #e50914, #ff6b6b);
    border-radius: 10px;
    transition: width 0.8s ease;
}

.divisor{
    border: none;
    border-top: 1px solid rgba(255,255,255,0.07);
    margin: 16px 0;
}

.sinopse-texto{
    font-size: 14px;
    color: #bbb;
    line-height: 1.7;
}

.secao-titulo{
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e50914;
    margin-bottom: 12px;
}

.modal-content::after{
    content: "";
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(to top, #0d0d0d, transparent);
    display: block;
    pointer-events: none;
}

.fechar{
    position: sticky;
    top: 10px;
    left: calc(100% - 35px);
    display: block;
    width: 28px;
    height: 28px;
    right: 15px;
    float: right;
    border-radius: 50%;
    font-size: 24px;
    background: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    line-height: 28px;
    text-align: center;
    z-index: 10;
    margin: 10px 10px -28px auto;
    border: 1px solid rgba(255,255,255,0.1);
}

::-webkit-scrollbar{
    width: 5px;
}

::-webkit-scrollbar-thumb{
    background: #888;
    border-radius: 10px;
}

.elenco{
    margin-top: 16px;
    text-align: left;
}

.diretor{
    margin-top: 20px;
    text-align: left;
}

.ator{
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 8px;
    transition: background 0.2s;
}

.ator:hover{
    background: rgba(255,255,255,0.1);
}

.ator img{
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.ator-info{
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ator-nome{
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.ator-personagem{
    font-size: 12px;
    color: #999;
}

.trailer{
    margin-top: 20px;
}

.trailer-wrapper{
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: 10px;
    overflow: hidden;
}

.trailer-wrapper iframe{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.sem-trailer{
    margin-top: 16px;
    color: #777;
    font-size: 13px;
}

.pessoa-topo{
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 16px;
    text-align: left;
}

.pessoa-foto{
    height: 200px;
    object-fit: cover;
    flex-shrink: 2;
}

.pessoa-info{
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.pessoa-info h2{
    font-size: 21px;
    font-family: "newyork";
}

.pessoa-detalhe{
    font-size: 14px;
    color: #e2dfdf;
}

.bio-secao{
    margin-top: 16px;
    text-align: left;
}

.bio{
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
    max-height: 120px;
    overflow-y: auto;
}

.filmes-pessoa{
    margin-top: 20px;
    text-align: left;
}

.filmes-mini-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.filme-mini{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: transform 0.4s;
}

.filme-mini:hover{
    transform: scale(1.05);
}

.filme-mini img{
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 2/3;
    border: 1px solid rgba(255,255,255,0.1);
}

.filme-mini span{
    font-size: 12px;
    color: #ccc;
    text-align: center;
    line-height: 1.3;
}

.input-wrapper{
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input{
    padding: 12px 15px 12px 38px;
    width: 320px;
    border-radius: 10px;
    background: rgba(0,0,0,0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    color: white;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus{
    border-color: #e50914;
    box-shadow: 0 0 12px rgba(229, 9, 20, 0.4);
}

footer{
    margin-top: 250px;
    border-top: 1px solid rgba(255,255,255,0.7);
    padding: 0;
}

.footer-inner{
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    padding: 30px 40px;
    text-align: left;
}

.footer-col{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo{
    font-size: 16px;
    font-weight: bold;
    color: #fff;
}

.footer-links-titulo{
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e50914;
    font-weight: bold;
}

.footer-sub{
    font-size: 12px;
    color: #666;
}

.footer-links{
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-links a{
    font-size: 13px;
    color: #aaa;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}

.footer-links a:hover{
    color: #fff;
}

.tmdb-link{
    color: #e50914 !important;
    text-decoration: none;
    font-weight: bold;
}

.tmdb-link:hover{
    text-decoration: underline;
}

.footer-bottom{
    text-align: center;
    padding: 14px;
    font-size: 11px;
    color: #444;
    border-top: 1px solid rgba(0, 0, 0, 0.04);
}

i{
    color: #ffffff;
}

i:hover{
    color: #ddd;
}

@keyframes aparecer{
    from{
        transform: translateY(40px) scale(0.95);
        opacity: 0;
    }
    to{
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@media (max-width: 600px){
    .topo{
        padding: 20px 10px;
    }
    .topo h1{
        font-size: 20px;
    }
    .busca{
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .busca input,
    .busca button{
        width: 100%;
    }
    .filme img{
        height: 220px;
    }

    .filme h3{
        font-size: 14px;
    }

    .filme p{
        font-size: 12px;
    }

    .modal{
        padding: 20px;
    }
    .modal-content{
    width: 80%;
    max-height: 75vh;
    padding: 15px;
    border-radius: 16px;
    }

    .modal-content::after{
        background: none;
    }

    .footer-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 24px;
    }

    .footer-links {
        align-items: center;
    }

    .input-wrapper input {
        width: 100%;
    }

    .boas-vindas h2 {
        font-size: 20px;
    }    
}

@keyframes gradientMove{
  0%{
    background-position: 0% 50%;
  }
  50%{
    background-position: 100% 50%;
  }
  100%{
    background-position: 0% 50%;
  }
}

@keyframes aparecerFilme{
    to{
        opacity: 1;
        transform: translateY(0);
    }
}