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


body{
    font-family: verdana, sans-serif;
    background: linear-gradient(135deg, #dcdcdc, #f5f5f5);
    padding: 40px 0;
    align-items: center;
    flex-direction: column;
}

h1{
    font-size: 2.4em;
    margin-bottom: 20px;
    text-align: center;
}

.input_area{
    width: 100%;
    justify-content: center;
    gap: 30px;
    display: flex; 
    flex-wrap: wrap;
    margin-bottom: 30px;
}

#text_input{
    padding: 5px 10px;
    font-size: 1.2em;
    width: clamp(300px, 40vw, 600px);
    border-radius: 5px ;
    border: none;
    text-align: center;
}

#search_btn{
    background-color: rgb(252, 176, 252);
    border: none;
    user-select: none;
    color: #1f1f1f;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 1em;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#search_btn:hover{
    transform: scale(105%);
    background-color: rgb(247, 140, 247);
}

#search_btn:active{
    transform: scale(95%) !important;
    background-color: rgb(255, 134, 255) !important;
}

#msg_txt{
    display: none;
    color: rgb(255, 130, 255);
    text-align: center;
}

.result_container{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    padding: 20px 30px;
    gap: 40px;
}

.movie_poster{
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    border: 2px solid;
    margin: auto;
    text-align: center;
    background-color: lavender;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
}

.movie_poster:hover{
    transform: scale(105%);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.movie_poster:active{
    transform: scale(97%)

}

.movie_poster .movie_cover{
    width: 90%;
    margin: 15px auto;
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    object-fit: cover;
}

.movie_title{
    font-weight: bold;
    padding: 0 2px;
    min-height: 3em;
    font-size: clamp(1em, 2vw, 1.2em);
    margin-bottom: 5px;

}

.movie_year{
    margin-bottom: 9px;
}

.details_section{
    width: 100%;
    display: none;
}

.backbtn{
    font-size: 1.2em;
    padding: 5px 10px ;
    margin: 0 10px;
    margin-bottom: 10px;
    background-color: rgb(252, 176, 252);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.backbtn:hover{
    transform: scale(105%);
    background-color: rgb(247, 140, 247);
}

.backbtn:active{
    transform: scale(95%) !important;
    background-color: rgb(255, 134, 255) !important;
}

.details_container{
    background-color: #1f1f1f;
    display: grid;
    width: 100%;
    grid-template-columns: minmax(250px, 350px) 1fr;    gap:  60px;
    padding: 0 20px;
}


.img_details{
    width: 250px;
    aspect-ratio: 2 / 3;
    border-radius: 10px ;
    margin: 30px auto;
    display: block;
}


.details_info{
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 25px;
    padding: 50px 25px;
    border-top: 2px solid;
    flex: 1;
}

#title_txt{
    color: white;
    font-size: 1.6em;
    margin-bottom: 10px;
}

#meta_txt{
    color: rgb(210, 210, 210);
    font-size: 1em;
    margin-bottom: 10px;
}

#plot_txt{
    color: white;
    max-width: 500px ;
    line-height: 1.4;
    margin-bottom: 10px;
}

#rating_txt{
    color: azure;
    font-size: 1.2em;
}

@media (max-width :920px) {
    
    .details_container{
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .details_info{
        width: 100%;
        text-align: center;
    }

    #plot_txt{
        margin: auto;
    }
}

@media (hover : none){
    #search_btn:hover{
        background-color: rgb(252, 176, 252);
        transform: none;
    }
}