body{
font-family:Arial;
background:#0f172a;
color:white;
text-align:center;
padding:40px;
}

/* SEARCH BOX */

.search-box{
margin-bottom:30px;
display:flex;
justify-content:center;
gap:10px;
flex-wrap:wrap;
}

input{
padding:10px;
width:220px;
border:none;
border-radius:5px;
}

button{
padding:10px 15px;
background:#2563eb;
color:white;
border:none;
border-radius:5px;
cursor:pointer;
transition:0.3s;
}

button:hover{
background:#1d4ed8;
}

/* LOADING */

#loading{
margin-top:20px;
font-size:18px;
color:#facc15;
}

/* MOVIE CATEGORIES */

.categories{
margin:20px 0;
display:flex;
gap:10px;
justify-content:center;
flex-wrap:wrap;
}

.categories button{
background:#2563eb;
padding:8px 14px;
border-radius:6px;
border:none;
color:white;
cursor:pointer;
}

.categories button:hover{
background:#1d4ed8;
}

/* MOVIE RESULT GRID */

#movieResult{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
gap:20px;
margin-top:30px;
}

/* MOVIE CARD */

.movie-card{
background:#1e293b;
padding:20px;
border-radius:10px;
box-shadow:0 10px 20px rgba(0,0,0,0.5);
transition:0.3s;
cursor:pointer;
}

.movie-card:hover{
transform:scale(1.05);
}

/* ✅ FIXED IMAGE SIZE (NOT TOO BIG) */

.movie-card img{
width:100%;
height:240px;
object-fit:cover;
border-radius:10px;
margin-bottom:10px;
}

/* FAVORITE BUTTON */

.fav-btn{
background:#e11d48;
color:white;
border:none;
padding:6px 10px;
margin:10px 0;
border-radius:6px;
cursor:pointer;
font-size:14px;
}

.fav-btn:hover{
background:#be123c;
}

/* NETFLIX STYLE SLIDER */

.slider{
position:relative;
display:flex;
align-items:center;
margin-top:20px;
}

.movie-row{
display:flex;
overflow-x:auto;
scroll-behavior:smooth;
gap:15px;
padding:10px;
}

.movie-row::-webkit-scrollbar{
display:none;
}

.trending-card{
min-width:150px;
transition:0.3s;
cursor:pointer;
text-align:center;
}

/* ✅ SMALLER TRENDING IMAGE */

.trending-card img{
width:100%;
height:200px;
object-fit:cover;
border-radius:10px;
transition:0.3s;
}

.trending-card:hover img{
transform:scale(1.05);
}

.trending-card p{
margin-top:8px;
font-size:14px;
}

/* SCROLL BUTTON */

.scroll-btn{
position:absolute;
background:rgba(0,0,0,0.7);
color:white;
border:none;
font-size:25px;
padding:10px;
cursor:pointer;
z-index:10;
}

.left{ left:0; }
.right{ right:0; }

/* RATING */

.rating{
background:#facc15;
color:black;
padding:5px 10px;
border-radius:5px;
display:inline-block;
margin-bottom:10px;
font-weight:bold;
}

/* ERROR */

.error{
color:red;
font-weight:bold;
margin-top:20px;
}

/* FAVORITES */

#favoriteMovies{
display:flex;
overflow-x:auto;
gap:15px;
padding:10px;
}

#favoriteMovies::-webkit-scrollbar{
display:none;
}

/* MODAL */

.modal{
display:none;
position:fixed;
z-index:1000;
left:0;
top:0;
width:100%;
height:100%;
background:rgba(0,0,0,0.8);
}

.modal-content{
background:#1e293b;
margin:10% auto;
padding:20px;
width:80%;
max-width:500px;
border-radius:10px;
text-align:center;
animation:fadeIn 0.4s ease;
}

@keyframes fadeIn{
from{opacity:0; transform:scale(0.8);}
to{opacity:1; transform:scale(1);}
}

.modal-content img{
width:100%;
height:250px;
object-fit:cover;
border-radius:10px;
margin-bottom:10px;
}

.close{
color:white;
float:right;
font-size:28px;
cursor:pointer;
}

/* TRAILER BUTTON */

.trailer-btn{
display:inline-block;
margin-top:15px;
padding:10px 18px;
background:#ef4444;
color:white;
text-decoration:none;
border-radius:6px;
font-weight:bold;
transition:0.3s;
}

.trailer-btn:hover{
background:#dc2626;
}

/* MOBILE */

@media (max-width:600px){

body{
padding:20px;
}

input{
width:150px;
}

.search-box{
flex-direction:column;
align-items:center;
}

.movie-card{
width:90%;
}

}
