/* ===================================================
   MovieFlix
=================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{

    background:#0b0b0b;
    color:#fff;
    font-family:'Poppins',sans-serif;

}

a{

    text-decoration:none;
    color:white;

}

img{

    max-width:100%;
    display:block;

}

.container{

    width:95%;
    max-width:1400px;
    margin:auto;

}

/* ================= HEADER ================= */

.header{

    position:fixed;

    top:0;
    left:0;
    right:0;

    z-index:999;

    background:rgba(0,0,0,.75);

    backdrop-filter:blur(15px);

}

.header .container{

    display:flex;

    justify-content:space-between;

    align-items:center;

    height:70px;

}

.logo{

    font-size:28px;

    font-weight:700;

    color:#ffcc00;

}

nav{

    display:flex;

    gap:30px;

}

nav a{

    opacity:.8;

    transition:.3s;

}

nav a:hover{

    opacity:1;

    color:#ffcc00;

}

.search{

    width:250px;

}

.search input{

    width:100%;

    padding:10px 16px;

    border:none;

    outline:none;

    border-radius:30px;

    background:#222;

    color:white;

}

/* ================= HERO ================= */

#hero{

    height:100vh;

    background-size:cover;

    background-position:center;

    position:relative;

}

.overlay{

    width:100%;
    height:100%;

    background:linear-gradient(

    rgba(0,0,0,.3),

    rgba(0,0,0,.9)

    );

    display:flex;

    align-items:center;

}

.hero-content{

    width:90%;
    max-width:700px;

    margin-left:100px;

}

.hero-content h1{

    font-size:60px;

    margin-bottom:20px;

}

.hero-content p{

    line-height:1.8;

    color:#ddd;

    margin-bottom:30px;

}

.buttons{

    display:flex;

    gap:15px;

}

.buttons button{

    padding:15px 35px;

    border:none;

    border-radius:50px;

    cursor:pointer;

    font-size:16px;

    transition:.3s;

}

.buttons button:first-child{

    background:#ffcc00;

    color:black;

}

.buttons button:last-child{

    background:#333;

    color:white;

}

.buttons button:hover{

    transform:translateY(-4px);

}

/* ================= SECTION ================= */

.section{

    padding:70px 40px;

}

.section h2{

    margin-bottom:25px;

    font-size:28px;

}
/* =========================================
   MOVIE GRID
========================================= */

.movie-grid{

    display:grid;

    grid-template-columns:repeat(auto-fill,minmax(180px,1fr));

    gap:25px;

}

.movie-card{

    position:relative;

    border-radius:15px;

    overflow:hidden;

    cursor:pointer;

    background:#151515;

    transition:.35s;

}

.movie-card:hover{

    transform:translateY(-8px) scale(1.04);

    box-shadow:0 20px 45px rgba(0,0,0,.45);

}

.movie-card img{

    width:100%;

    height:270px;

    object-fit:cover;

}

.movie-info{

    padding:15px;

}

.movie-title{

    font-size:16px;

    font-weight:600;

    margin-bottom:8px;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;

}

.movie-meta{

    display:flex;

    justify-content:space-between;

    color:#bdbdbd;

    font-size:13px;

}

.movie-rating{

    color:#FFD700;

    font-weight:600;
}

/* Hover Overlay */

.movie-overlay{

    position:absolute;

    inset:0;

    display:flex;

    align-items:center;

    justify-content:center;

    background:rgba(0,0,0,.65);

    opacity:0;

    transition:.3s;
}

.movie-card:hover .movie-overlay{

    opacity:1;
}

.play-button{

    width:70px;

    height:70px;

    border-radius:50%;

    background:#ffcc00;

    color:#000;

    display:flex;

    align-items:center;

    justify-content:center;

    font-size:28px;

    font-weight:bold;

    transition:.3s;
}

.play-button:hover{

    transform:scale(1.15);
}

/* Loading Skeleton */

.skeleton{

    background:linear-gradient(
        90deg,
        #222 25%,
        #333 50%,
        #222 75%
    );

    background-size:400% 100%;

    animation:skeletonLoading 1.4s infinite;
}

@keyframes skeletonLoading{

    0%{
        background-position:100% 0;
    }

    100%{
        background-position:-100% 0;
    }

}

/* Footer */

footer{

    padding:40px;

    text-align:center;

    color:#888;

    border-top:1px solid #222;

}

/* Responsive */

@media(max-width:768px){

.hero-content{

    margin:30px;

}

.hero-content h1{

    font-size:36px;

}

.hero-content p{

    font-size:14px;

}

nav{

    display:none;

}

.search{

    width:160px;

}

.movie-grid{

    grid-template-columns:repeat(2,1fr);

}

}