@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300..700;1,300..700&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap');

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

:root{
    --backgrd-clr : #080808;
    --font-sans : "DM Sans", sans-serif;
    --font-cormorant : "Cormorant Garamond", serif;
    --color-general : #aaaaaa;
    --color-white : #f0ede6;
    --color-gold : #c9b99a;
    --color-dim : #555555;
    --color-black: #111111;
    --color-border: #1e1e1e;
}

body{
    background: var(--backgrd-clr);
    color: white;
    font-family: var(--font-sans);
    font-weight: 400;
}

.hidden{
    display: none !important;
}

#poster-style{
    position: fixed;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    z-index: -1;
    filter: blur(3px) brightness(0.22);
}

.left-poster img{
    transition: transform .35s ease;
}

.left-poster img:hover{
    transform: scale(1.02);
}

.left-poster img{
    width:100%;
    max-width:230px;
    border-radius:8px;
    box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.landing-container{
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.25rem;
}

.heading-cntnr{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}



.title{
    text-align: center;
    line-height: 4;
}

.title h1{
    font-family: var(--font-cormorant);
    font-weight: 300;
    font-size: clamp(36px, 10vw, 52px);
    color: var(--color-white);
}

.discover-container{
    line-height: 1.3;
}


.title p{
    font-size: 0.65rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 300;
    color: var(--color-dim);
}

.cgItalic{
    font-family: var(--font-cormorant);
    font-style: italic;
    color: var(--color-gold) !important;
}


.logo h5{
    font-size: 0.65rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    font-weight: 300;
    color: var(--color-general);
}



.suggestionSpan{
    font-size: 0.75rem;
    color: var(--color-dim);
}

.suggestionSpan span{
    word-spacing: 12px;
}

.suggestion{
    color: var(--color-general);
}

.dot{
    margin: 0 8px;
}



.search-cntnr{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.search-section{
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0.85rem;
    max-width: 520px;

}

input{
    font-size: 1rem;
    font-family: var(--font-cormorant);
    font-weight: 300;
    color: var(--color-white);
    background: #111111;
    outline: none;
    border: 0.5px solid var(--color-border);
    padding: 0.85rem 1rem;
    flex: 1;
    min-width: 0;
}

input::placeholder{
    font-family: var(--font-cormorant);
    font-style: italic;
    font-weight: 300;
    color: var(--color-dim);
}

#searchBtn{
    font-size: 0.60rem;
    padding: 0.85rem 1.15rem;
    background: var(--color-gold);
    letter-spacing: 2px;
}



.errorMsg{
    color: #c0614a;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}


.movie-container{
    user-select: none;
}

.movie-details{
    padding: 2rem 1.25rem 3rem;
}


.navbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.5rem;
    background: rgba(8,8,8,.55);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

#backBtn{
    background: transparent;
    color: var(--color-general);
    border: none;
    outline: none;
    font-family: var(--font-sans);
    letter-spacing: 2px;
    font-size: 0.80rem;
}

.navLogo{
    font-family: var(--font-cormorant);
    letter-spacing: 4px !important;
    font-size: 1rem !important;
}

.navbar p{
    color: var(--color-dim);
    letter-spacing: 2px;
    font-size: 0.75rem;
}


.left-movie-detail{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
    flex-shrink: 0;
}

.rating-actions{
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.rating-box{
    color: var(--color-gold);
    border: 0.5px solid var(--color-gold);
    border-radius: 20px;
    background: rgba(201, 185, 154, 0.07);
    padding: 0.40rem 0.75rem;
    font-size: 0.80rem;
}

.rateStyles{
    color: rgba(201, 185, 154, 0.5);
    font-size: 0.70rem;
}

#votingSpan{
    margin-left: 2px;
}


#genre{
    text-transform: uppercase;
    color: var(--color-gold);
    letter-spacing: 3px;
    font-size: 0.6rem;
    margin-bottom: 0.5rem;
}

#title{
    color: var(--color-white);
    font-size: clamp(30px, 8vw, 42px);
    font-family: var(--font-cormorant);
    font-weight: 300;
    margin-bottom: 0.6rem;
}

#mini-details{
    color: var(--color-white);
    font-size: 0.75rem;
    color: rgba(201, 185, 154, 0.5);
    font-weight: 300;
    margin-bottom: 1.25rem;
}

#description{
    color: var(--color-general);
    font-family: var(--font-cormorant);
    font-style: italic;
    font-size: 0.95rem;
    border-left: 1px solid var(--color-border);
    padding-left: 1rem;
    line-height: 1.75;
    margin-bottom: 1.75rem;
}




.display-grid{
    display: grid;
    grid-template-columns: repeat(2,1fr);

    border-top: 0.5px solid rgba(201, 185, 154, 0.2);
}
.display-cell{
    border-bottom: 0.5px solid rgba(201, 185, 154, 0.2);
    padding-bottom: 0.35rem;
}

.display-cell:nth-child(odd){
    border-right: 0.5px solid rgba(201, 185, 154, 0.2);
    padding-right: 1rem;
}

.display-cell:nth-child(even){
    padding-left: 1rem;
}

.display-grid span{
    font-size: 0.5rem;
    color: var(--color-gold);
    letter-spacing: 2px
}

.display-grid p{
    font-size: 0.75rem;
    color: var(--color-white);
    font-weight: 300;
    line-height: 1.5;
}

.body::-webkit-scrollbar{
    display: none;
}


.loading-screen{
    position: fixed;
    inset: 0;
    z-index: 998;
    background: var(--backgrd-clr);

    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
    user-select: none;
}


.loading-box{
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    /* transform: translateY(-50%); */
    align-items: center;
}

.spinner{
    width: 35px;
    height: 35px;
    border: 2px solid transparent;
    /* border: 2px solid rgba(201, 185, 154, 0.25); */
    border-top: 2px solid var(--color-gold);
    border-radius: 50%;
    border-right: 2px solid rgba(201, 185, 154, 0.35);
    animation: spinning 1s linear infinite;
}

.loading-box p{
    color: rgba(201, 185, 154, 0.378);
    letter-spacing: 5px;
    font-size: 0.75rem;
}


.divider{
    width: min(520px,100%);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0 1.75rem;
}

.divider span{
    flex: 1;
    height: 1px;
    background: rgba(201,185,154,0.18);
}

.divider p{
    color: var(--color-dim);
    letter-spacing: 3px;
    font-size: 0.65rem;
    font-weight: 300;
}

.discover-random{
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.discover-heading{
    color: var(--color-general);
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 0.7rem;
    margin-bottom: 1rem;
}

.random-controls{
    width: 100%;
    display: flex;
    gap: 0.75rem;
}


#genreSelect,
#decadeSelect{
    min-width: 0;

    background: #111111;
    color: var(--color-dim);

    border: .5px solid var(--color-border);
    outline: none;
    -webkit-tap-highlight-color: transparent;

    padding: .85rem 1rem;

    font-family: var(--font-cormorant);
    font-style: italic;
    font-size: 1rem;
    font-weight: 300;

    appearance: none;
    cursor: pointer;
    transition: .25s;
}

#genreSelect{
    flex: 2;
}

#decadeSelect{
    flex: 1;
    min-width: 82px;
}

#genreSelect:hover,
#decadeSelect:hover{
    border-color: rgba(201,185,154,.35);
}



#randomBtn{
    font-size: 0.60rem;
    padding: 0.85rem 1.15rem;
    background: var(--color-gold);
    letter-spacing: 2px;
}

/* #randomBtn:hover{
    background: var(--color-gold);
    color: black;
} */



#searchBtn,
#randomBtn{
    font-family: var(--font-sans);
}

#trailerBtn{
    margin-top: 0;
    width: auto;
    padding: 0.42rem 0.9rem;
    background: transparent;
    border: .5px solid var(--color-gold);
    border-radius: 20px;
    color: var(--color-gold);
    font-family: var(--font-sans);
    font-size: 0.62rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: .25s;
}

#trailerBtn:hover{
    background: var(--color-gold);
    color: black;
}

@media (max-width: 480px){
    .rating-actions{
        flex-direction: column;
        width: 100%;
    }
    #trailerBtn{
        width: 100%;
    }
}

.trailer-modal{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem 1rem;
    z-index: 999;
}

.trailer-modal-content{
    position: relative;
    width: min(90vw, 900px);
    max-height: 80vh;
}

.trailer-modal-content iframe{
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 80vh;
    border: none;
    display: block;
}

#closeTrailerBtn{
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: transparent;
    color: var(--color-white);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.watch-section{
    margin-top: 1.5rem;
}

.watch-section > span{
    font-size: 0.5rem;
    color: var(--color-gold);
    letter-spacing: 2px;
    text-transform: uppercase;
    display: block;
    margin-bottom: 0.6rem;
}

.watch-grid{
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.watch-provider{
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.8rem;
    border: 0.5px solid var(--color-border);
    border-radius: 20px;
    color: var(--color-general);
    font-size: 0.72rem;
    font-weight: 300;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}

.watch-provider svg{
    width: 14px;
    height: 14px;
    fill: none;
    stroke: var(--color-gold);
    flex-shrink: 0;
}

.watch-provider:hover{
    border-color: rgba(201,185,154,.4);
    color: var(--color-white);
}



@media (max-width:700px){

    .random-controls{
        flex-direction: column;
    }

    #searchBtn,
    #randomBtn{
        width: 100%;
    }

}



button{
    transition:
        background-color .25s,
        color .25s,
        border-color .25s,
        transform .15s;
}

button:hover{
    transform: translateY(-1px);
}

button:active{
    transform: scale(.98);
}

input, select{
    transition:
        border-color .25s,
        background-color .25s;
}



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

::-webkit-scrollbar-track{
    background:#080808;
}

::-webkit-scrollbar-thumb{
    background:#2c2c2c;
    border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
    background:#444;
}

@keyframes spinning{
    0% {transform: rotate(0deg);}
    100%{transform: rotate(360deg);}
}




@media (min-width: 700px){

    .movie-details{
        display: flex;
        flex-direction: row;
        gap: 2.5rem;
        max-width: 1000px;
        margin: 0 auto;
    }

}

@media (max-width: 699px){

    .search-section{
        flex-direction: column;
        gap: .75rem;
    }

    .searchBar,
    #searchBtn{
        width: 100%;
    }

}

@media (max-width: 380px){
    .display-grid{
        grid-template-columns: 1fr;
    }
    .display-cell:nth-child(odd){
        border-right: none;
        padding-right: 0;
    }
    .display-cell:nth-child(even){
        padding-left: 0;
    }
}


.suggestion:hover{
    color: var(--color-gold);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.autocomplete-list{
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--color-black);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    z-index: 10;
}

.autocomplete-item{
    padding: 0.7rem 1rem;
    color: var(--color-general);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    cursor: pointer;
    border-bottom: 1px solid var(--color-border);
}

.autocomplete-item:last-child{
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active{
    background: var(--color-border);
    color: var(--color-gold);
}
