@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

:root
{
    --fg: whitesmoke;
    --fg-hover: #bbb;
    --fg-hover-dark: #717171;
    --bg-main: rgb(0, 8, 39);
    --bg-second: rgb(3, 14, 54);
}

*
{
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

body, html
{
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-main);
    z-index: 1;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

button
{
    cursor: pointer;
}

ul
{
    list-style-type: none;
}

ul > li
{
    display: inline-block;
}

.footer
{
    width: 100%;
    height: auto;
    text-align: center;
    margin-top: auto;
    background-color: var(--bg-second);
    color: var(--fg);
}

footer > ul
{
    margin: 10px 0px;
}

footer > ul > li
{
    margin: 0px 10px;
}

footer > ul > li > a
{
    text-decoration: none;
    color: var(--fg);
    transition: .25s ease;
}

footer > ul > li > a:hover
{
    color: var(--fg-hover);
}

.hidden
{
    display: none!important;
}

.visible
{
    visibility: visible!important;
    opacity: 1!important;
}

.slide-in
{
    animation: slide-in 1.5s forwards;
}

.slide-out
{
    animation: slide-in 1.5s forwards;
    animation-direction: reverse;
}

.flip-open
{
    animation: flip-open .5s forwards;
}

.flip-close
{
    animation: flip-open .5s forwards;
    animation-direction: reverse;
}

/*#region Nav*/
nav
{
    width: 100vw;
    background-color: var(--bg-main);
}

nav li button
{
    background-color: var(--bg-second);
    display: inline-block;
    border: none;
    transition: background-color .5s ease;
    font-size: 16px;
    text-align: center;
    padding: 8px 10px;
    margin: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    color: var(--fg);
}

nav li button.active, nav li button:hover
{
    background-color: var(--fg);
    color: var(--bg-second);
}
/*#endregion*/

/*#region Index*/
main.index-grid
{
    display: grid;
    grid-template-rows: auto;
    row-gap: 2em;
}

main.index-grid > .movie-card-grid
{
    margin-bottom: 6%;
}

section.carousel
{
    min-height: 200px;
    position: relative;
    width: 80%;
    max-width: 80%;
    margin: auto;
    box-sizing: border-box;
}

div.carousel-item.active
{
    display: block!important;
}

div.carousel-item > img
{
    width: 100%;
    height: auto;
    max-height: 400px;
    cursor: pointer;
}

section.carousel > button
{
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    border: none;
    background-color: rgba(245, 245, 245, 0.5);
    color: var(--bg-main);
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
}

section.carousel > button#carousel-next
{
    right: 0;
    border-radius: 3px 0 0 3px;
}

section.carousel > button:hover
{
    background-color: rgba(245, 245, 245, 0.8);
}

.carousel-slide-selector
{
    width: 100%;
    display: flex;
    justify-content: center;
    position: absolute;
    bottom: 8px;
    pointer-events: none;
}

.dot 
{
    pointer-events: all;
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: var(--fg-hover);
    border-radius: 50%;
    transition: background-color 0.6s ease;
}

.dot.active, .dot:hover 
{
    background-color: var(--fg-hover-dark);
}

.fade 
{
    animation-name: fade;
    animation-duration: 1.5s;
}

section.search
{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

section.search > input[type=text]
{
    padding: 10px;
    margin: 10px;
    border: none;
    width: 350px;
    border-radius: 10px;
}

section.search > button.search-btn
{
    background-color: transparent;
    color: var(--fg);
    border: none;
    border-radius: 5px;
    min-width: 25px;
    min-height: 25px;
}

section.search > button.search-btn > svg
{
    stroke: var(--fg);
    fill: var(--fg);
}

/*#endregion*/

/*#region Movies*/
main.movies-grid > section.movie-card-grid
{
    margin-top: 2%;
    padding-bottom: 2%;
}

.movie-card-grid
{
    display: grid;
    grid-template-columns: repeat(3, 32%);
    grid-template-rows: auto;
    column-gap: 2%;
    row-gap: 2%;
    width: 80%;
    max-width: 80%;
    margin: auto;
    margin-bottom: 2%;
}

div.movie-card
{
    display: block;
    border-radius: 15px;
    width: 100%;
    max-width: 100%;
    height: 250px;
    z-index: 1;
    transition: .5s ease;
}

div.movie-card:hover
{
    scale: 1.1;
}

div.movie-card img
{
    width: 100%;
    height: 250px;
    border-radius: 15px;
}

div.movie-card div.card-back
{
    background-color: black;
    width: 100%;
    height: 250px;
    border-radius: 15px;
}

div.card-back > img
{
    transform-origin: center;
    transform: scaleX(-1);
    position: absolute;
    opacity: .1;
}

div.card-back > div
{
    margin: 0px 15px;
    border: 0px solid transparent;
    border-top-width: 15px;
    height: 225px;
    overflow: hidden;
    position: relative;
    z-index: 10;
}

div.card-back p
{
    color: var(--fg);
}

div.card-back p:nth-child(even)
{
    margin-bottom: 10px;
}

div.card-back p.mov-plot
{
    height: 75px;
    word-break: keep-all;
    overflow: hidden;
}

div.card-back button#btn-mov-info
{
    background-color: transparent;
    color: var(--fg);
    border: none;
    padding: 2px 2px;
    position: absolute;
    bottom: 0;
}
/*#endregion*/

/*#region About*/

main.about-grid
{
    padding: .75em;
    border-radius: 25px;
    display: grid;
    grid-template-rows: auto;
    color: var(--fg);
    opacity: 1;
}

section.about-header
{
    text-align: center;
    font-size: 32px;
}

section.about-details
{
    display: grid;
    grid-template-columns: repeat(2, 45%);
    column-gap: 5%;
    width: 80%;
    margin: auto;
}

div.about-headers
{
    display: grid;
    grid-template-rows: auto;
}

div.about-headers > button
{
    color: var(--fg);
    background-color: var(--bg-main);
    display: inline-block;
    border: none;
    font-size: 16px;
    text-align: center;
    transition: .5s ease;
    width: 60%;
    padding: 15px 0px;
    margin: 15px auto;
    border-radius: 10px;
}

div.about-headers > button.active
{
    color: var(--bg-main);
    background-color: var(--fg);
}

div.about-text
{
    display: grid;
    place-items: center;
}

p.about-content
{
    color: var(--fg);
    text-align: left;
}

section.about-images
{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    column-gap: 2%;
}

section.about-images > img
{
    max-width: 32%;
    height: auto;
    max-height: 250px;
    animation: fade .5s forwards;
}
/*#endregion*/

/*#region Movie*/
main.movie-grid
{
    width: 60%;
    margin: auto;
    background-color: var(--bg-second);
    border-radius: 15px;
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 2%;
    color: var(--fg);
    margin-bottom: 2%;
}
main.movie-grid > .movie-banner
{
    width: 100%;
    height: 200px;
    max-height: 100%;
}
main.movie-grid > .movie-banner > .movie-banner-image
{
    width: 100%;
    height: 200px;
    max-height: 100%;
    border-radius: 15px 15px 0 0;
}
main.movie-grid > .movie-info
{
    display: grid;
    grid-template-columns: repeat(2, 50%);
}
.movie-info > div:nth-child(1)
{
    text-align: left;
    margin: 0 20px!important;
}
.movie-info > div > a
{
    text-decoration: none;
    color: var(--fg);
}
.movie-info > div > a:hover
{
    color: var(--fg-hover)
}
.movie-info > .movie-title
{
    font-size: 36px;
    text-align: center;
    max-width: 80%;
    margin: auto;
    grid-column: 1 / 3;
}
.movie-info > div
{
    margin: 2% auto;
}
.movie-info > .movie-info-poster
{
    width: 60%;
    height: auto;
    text-align: center;
    margin: auto;
}
.movie-info > .movie-info-poster img
{
    width: 100%;
    height: auto;
    max-height: 80%;
    margin: 0 auto;
}
.movie-info .movie-info-details
{
    display: grid;
    grid-template-columns: repeat(2, auto);
}
.movie-info .movie-info-details > p:nth-child(odd)
{
    text-align: left;
}
.movie-info .movie-info-details > p:nth-child(even)
{
    text-align: right;
}
.movie-info > .movie-info-plot
{
    width: 80%;
    font-size: 16px;
}

.movie-info > .movie-actor-grid
{
    margin-left: 20%;
}

.movie-info > .movie-director-grid
{
    margin-left: 10%;
}

.movie-info .movie-actors
{
    display: flex;
    flex-direction: row;
}

.movie-cast-card
{
    margin: 0 20px 20px 0;
    font-size: 12px;
}

.movie-cast-card button
{
    background-color: transparent;
    border: none;
}

.movie-cast-card img
{
    width: 80px;
    height: 80px;
}
/*#endregion*/

/*#region Actor*/
main.actor-grid
{
    width: 60%;
    margin: auto;
    background-color: var(--bg-second);
    border-radius: 15px;
    display: grid;
    grid-template-rows: auto auto;
    row-gap: 2%;
    color: var(--fg);
    padding-bottom: 2%;
}

main.actor-grid form > button
{
    background-color: transparent;
    border: none;
    color: var(--fg);
    text-align: left;
    margin: 0 20px!important;
}

main.actor-grid > .actor-info
{
    width: 80%;
    display: grid;
    grid-template-columns: repeat(2, 50%);
    margin: 0 auto;
}

.actor-info > .actor-headshot
{
    display: flex;
    flex-direction: column;
    height: auto;
    margin: auto;
}

.actor-info > .actor-headshot > img
{
    width: 100%;
    max-width: 250px;
    max-height: 350px;
}

.actor-grid > .actor-movie-grid
{
    width: 80%;
    margin: 0 auto;
}

.actor-grid > .actor-movie-grid > .actor-movies
{
    display: flex;
    flex-direction: row;
}

.actor-movie-card
{
    margin: 0 20px 20px 0;
    font-size: 12px;
    word-break: keep-all;
    max-width: 120px;
}

.actor-movie-card img
{
    width: 80px;
    height: 80px;
}
/*#endregion*/

/*#region Submit*/
main.movie-form-grid
{
    display: grid;
    place-items: center;
}
main.movie-form-grid > div
{
    background-color: var(--bg-second);
    color: var(--fg);
    border: 2px solid var(--fg);
    border-radius: 15px;
    padding: 2em;
    margin-bottom: 2%;
}
main.movie-form-grid form,
main.movie-form-grid form div:has(div.form-section)
{
    display: grid;
    grid-template-rows: repeat(2, auto);
    row-gap: 1em;
}
main.movie-form-grid form div, 
main.movie-form-grid form div > div
{
    display: flex;
    flex-direction: column;
}
main.movie-form-grid div#actor_container
{
    row-gap: 0;
}
main.movie-form-grid div#actor_container > div
{
    border: 1px solid var(--fg);
    border-radius: 5px;
    padding: 5px;
}
main.movie-form-grid div#actor_container > div > div
{
    width: 90%;
    margin: auto;
}
main.movie-form-grid div#actor_container > div input
{
    min-width: 0!important;
}
main.movie-form-grid div#actor_container > div button
{
    max-width: 60%;
    background-color: #dc3545;
}
main.movie-form-grid div#actor_container > div button:hover
{
    background-color: #c82333;
}
main.movie-form-grid div#actor_container > :nth-child(n+2)
{
    margin-top: 1em;
}

main.movie-form-grid button
{
    padding: 5px;
    font-size: 14px;
    color: var(--fg);
    border: none;
    border-radius: 5px;
    transition: .25s ease;
}

main.movie-form-grid button#add_actor
{
    background-color: var(--bg-second);
}
main.movie-form-grid button#add_actor:hover
{
    background-color: var(--bg-main);
}

main.movie-form-grid input
{
    background-color: var(--fg);
    color: var(--bg-second);
    border: 1px solid var(--fg);
    border-radius: 5px;
    padding: 5px;
    min-width: 350px;
}

main.movie-form-grid div#actor_container > div > div:has(button),
main.movie-form-grid .form-section:has(button[type="submit"])
{
    display: grid;
    place-items: center;
}

main.movie-form-grid button[type="submit"]
{
    width: 40%;
    background-color: #28a745;
}
main.movie-form-grid button[type="submit"]:hover
{
    background-color: #218838;
}
/*#endregion*/

/*#region Keyframes*/
@keyframes fade 
{
    from {opacity: .4}
    to {opacity: 1}
}

@keyframes slide-in
{
    0% {transform: translateY(-100%);}
    100% {transform: translateY(0%);}
}

@keyframes flip-open
{
    0% {transform: scaleX(0);}
    100% {transform: scaleX(1);}
}
/*#endregion*/