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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Navbar */
nav {
    background-color: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 20;
}

.logo {
    width: auto;
}

.search-box {
    display: flex;
    gap: 10px;
}


input {
    padding: 10px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    width: 300px;
    outline: none;
    transition: border 0.3s;
}

.suggestions-dropdown {
    list-style: none;
    padding: 0;
    margin-top: 3rem;
    border: 1px solid #eee;
    border-radius: 15px;
    border-top: none;
    position: absolute;
    width: 100%;
    height:auto;
    background-color: #f7f7ed;
    z-index: 1000;
    /* Ensure dropdown appears above other content */
    max-height: 200px;
    /* Limit height and add scroll if needed */
    overflow-y: auto;
    display: none;
    /* Initially hidden */
}

.suggestions-dropdown li {
    padding: 10px;
    cursor: pointer;
}

.suggestions-dropdown li:hover {
    background-color: #f0f0f0;
}

input:focus {
    border-color: #333;
}

button {
    padding: 10px 30px;
    background-color: orange;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.3s;
}

button:hover {
    background-color: red;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 40px;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Movie Card */
.movie-card {
    background-color: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.movie-poster {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.movie-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.movie-title {
    font-size: 24px;
    font-weight: 600;
    color: #222;
    margin-bottom: 5px;
}

.movie-year {
    color: #999;
    font-size: 15px;
}

.rating-badge {
    background-color: #ffd586;
    color: #000000;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.movie-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

.genres {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.genre-tag {
    background-color: #f5f5f5;
    color: #555;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

.rating {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px 0;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.rating-score {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.likes {
    color: #999;
    font-size: 14px;
}

.summary {
    color: #666;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
}

.watch-btn {
    width: 100%;
    padding: 14px;
    background-color: orange;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.watch-btn:hover {
    background-color: #555;
}

/* Responsive */
@media (max-width: 992px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .search-box {
        width: 100%;
    }

    input {
        width: 100%;
    }

    .container {
        padding: 0 20px;
        margin: 30px auto;
    }
}

@media (max-width: 600px) {
    .movies-grid {
        grid-template-columns: 1fr;
    }

    .movie-card {
        padding: 25px;
    }
}

/* Full-screen overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10;
    display: block;
}