*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Segoe UI',sans-serif;
}
body{
    background:#0f172a;
    color:white;
    padding:20px;
    min-height:100vh;
}
.hidden{
    display:none;
}
header{
    text-align:center;
    margin-bottom:40px;
}
header h1{
    font-size:3rem;
    margin-bottom:25px;
}
.search-box{
    display:flex;
    justify-content:center;
    gap:10px;
}
.search-box input{
    width:60%;
    max-width:500px;
    padding:14px;
    border:none;
    border-radius:10px;
    font-size:1rem;
    outline:none;
}
.search-box button{
    padding:14px 18px;
    border:none;
    border-radius:10px;
    cursor:pointer;
    background:#2563eb;
    color:white;
}
.results-section{
    max-width:1300px;
    margin:0 auto;
}
.results-section h2{
    text-align:center;
    margin-bottom:25px;
}
.movie-grid{
    display:grid;
    grid-template-columns:
    repeat(auto-fit,minmax(220px,280px));
    justify-content:center;
    gap:20px;
}
.movie-card{
    background:#1e293b;
    border-radius:12px;
    overflow:hidden;
    transition:.3s;
}
.movie-card:hover{
    transform:translateY(-6px);
}
.movie-card img{
    width:100%;
    height:320px;
    object-fit:cover;
}
.movie-info{
    padding:15px;
}
.movie-info h3{
    margin-bottom:10px;
}
.movie-info p{
    margin:5px 0;
}
.rating{
    color:gold;
    font-weight:bold;
}
.card-buttons{
    margin-top:10px;
}
.details-btn{
    width:100%;
    padding:10px;
    border:none;
    border-radius:8px;
    background:#2563eb;
    color:white;
    cursor:pointer;
}
.modal{
    display:none;
    position:fixed;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.85);
    justify-content:center;
    align-items:center;
    padding:20px;
    z-index:999;
}
.modal-content{
    background:#1e293b;
    padding:20px;
    border-radius:15px;
    max-width:700px;
    width:100%;
    position:relative;
}
.modal-content img{
    width:250px;
    border-radius:10px;
}
#closeModal{
    position:absolute;
    right:20px;
    top:10px;
    font-size:30px;
    cursor:pointer;
}
.modal-body{
    display:flex;
    gap:20px;
    flex-wrap:wrap;
}
.modal-details{
    flex:1;
}
.modal-details p{
    margin:10px 0;
}

@media(max-width:768px)
{
.search-box{
    flex-direction:column;
    align-items:center;
}
.search-box input{
    width:100%;
}
header h1{
    font-size:2rem;
}
.movie-grid{
    grid-template-columns:
    repeat(auto-fit,minmax(160px,1fr));
}
.movie-card img{
    height:250px;
}
.modal-content img{
    width:100%;
}
}