/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: white;
    line-height: 1.6;
    overflow-x: hidden;
    /* Prevent horizontal scroll due to animations */
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo img {
    width: 60px;
    margin-right: 10px;
}

header h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

/* Login Logo */
header .login-logo {
    margin-left: 20px;
}

header .login-logo img {
    width: 40px;
    /* Adjust as needed */
    height: auto;
    transition: transform 0.3s;
    cursor: pointer;
}

header .login-logo img:hover {
    transform: scale(1.1);
    /* Slight zoom effect on hover */
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ffcc00;
}

/* Keyframe Animations */
@keyframes backgroundZoom {
    0% {
        background-size: 100%;
    }

    100% {
        background-size: 110%;
    }
}

@keyframes backgroundPan {
    0% {
        background-position: center;
    }

    100% {
        background-position: top;
    }
}

@keyframes flicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        opacity: 1;
    }

    20%,
    24%,
    55% {
        opacity: 0.8;
    }
}

@keyframes moveBackground {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.05);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero Section */
.hero {
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    color: white;
    text-align: center;
    animation: backgroundZoom 20s ease-in-out infinite alternate, fadeIn 2s ease-in-out 1;
    /* Zoom animation with fade in */
    overflow: hidden;
    /* Hide overflow for any background layers */
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    background: url('background-overlay-pattern.png') repeat;
    opacity: 0.2;
    animation: moveBackground 30s linear infinite;
}

.hero-content {
    z-index: 2;
    max-width: 600px;
}

.hero h2 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
    animation: flicker 3s infinite;
    /* Flickering effect */
}

.hero p {
    font-size: 1.3rem;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

/* Style for the search bar */
#name {
    width: 430px;
    height: auto;
    padding: 8px;
    border-radius: 30cm;
    border: 1px solid #ccc;
    font-size: 20px;
}

/* Style for the search button */
#search-button {
    width: 100px;
    height: auto;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff6600, #ffcc00);
    color: white;
    border: none;
    border-radius: 40px;
    cursor: pointer;
    margin-left: 2%;
}

#search-button:hover {
    background: linear-gradient(135deg, #ffcc00, #ff6600);
}

/* Flexbox container to align search bar and button */
.search-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.suggestions {
    position: absolute;
    background-color: #121212;
    opacity: 1;
    max-height: 150px;
    overflow-y: auto;
    width: 500px;
    z-index: 1000;
    /* Ensures suggestions appear above other elements */
}

.suggestion {
    padding: 8px;
    cursor: pointer;
}

.suggestion:hover {
    background-color: #242222;
    opacity: 0.5;
}

/* Loading bar styling */
#loading {
    display: none;
    /* Initially hidden */
    margin: 20px auto;
    font-size: 18px;
}

/* Style for the container showing movie details */
/*#container {
    margin: 20px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #121212;
}

#container img {
    width: 150px;
    height: auto;
    margin-right: 20px;
}

#container div {
    display: flex;
    flex-direction: row;
}*/

h1 {
    text-align: center;
}

.genre-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.genre-button {
    margin: 5px;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Error message */
#error {
    color: red;
    font-size: 16px;
    text-align: center;
    padding: 10px;
}

.featured-content {
    height: 50vh;
    padding: 50px;
}

.featured-title {
    width: 200px;
}

.featured-desc {
    width: 500px;
    color: lightgray;
    margin: 30px 0;
}

.featured-button {
    background-color: #d7b80c;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    outline: none;
    font-weight: bold;
}

.movie-list-container {
    padding: 0 20px;
}

.movie-list-wrapper {
    position: relative;
    overflow: hidden;
    /* Ensures items outside the container are hidden */
}

.movie-list {
    display: flex;
    align-items: center;
    height: 300px;
    /* Adjust as needed */
    transform: translateX(0);
    transition: transform 1s ease-in-out;
    /* Only transition the transform property */
}

.movie-list-item {
    margin-right: 30px;
    position: relative;
    min-width: 270px;
    /* Ensure consistent width */
}

.movie-list-item:hover .movie-list-item-img {
    transform: scale(1.2);
    opacity: 0.5;
    /* Reduced opacity on hover */
}

.movie-list-item:hover .movie-list-item-title,
.movie-list-item:hover .movie-list-item-desc,
.movie-list-item:hover .movie-list-item-button {
    opacity: 1;
    /* Show title, description, and button on hover */
}

.movie-list-item-img {
    transition: transform 1s ease-in-out;
    /* Transition only the transform property */
    width: 270px;
    /* Fixed width */
    height: 200px;
    /* Fixed height */
    object-fit: cover;
    /* Ensures the image covers the area without distortion */
    border-radius: 20px;
}

.movie-list-item-title {
    background-color: rgba(51, 51, 51, 0.8);
    /* Slightly transparent background */
    padding: 0 10px;
    font-size: 32px;
    font-weight: bold;
    position: absolute;
    top: 10%;
    /* Adjust if needed */
    left: 50px;
    /* Positioning */
    opacity: 0;
    /* Hidden initially */
    transition: opacity 1s ease-in-out;
    /* Transition for opacity */
}

.movie-list-item-desc {
    background-color: rgba(51, 51, 51, 0.8);
    /* Slightly transparent background */
    padding: 10px;
    font-size: 14px;
    position: absolute;
    top: 30%;
    /* Positioning */
    left: 50px;
    /* Positioning */
    width: 230px;
    /* Fixed width */
    opacity: 0;
    /* Hidden initially */
    transition: opacity 1s ease-in-out;
    /* Transition for opacity */
}

.movie-list-item-button {
    padding: 10px;
    background-color: #fac400;
    /* Button color */
    color: white;
    border-radius: 10px;
    outline: none;
    border: none;
    cursor: pointer;
    position: absolute;
    bottom: 20px;
    /* Positioning */
    left: 50px;
    /* Positioning */
    opacity: 0;
    /* Hidden initially */
    transition: opacity 1s ease-in-out;
    /* Transition for opacity */
}

.arrow {
    font-size: 120px;
    /* Arrow size */
    position: absolute;
    top: 50%;
    /* Center vertically */
    transform: translateY(-50%);
    /* Centering adjustment */
    right: 10px;
    /* Spacing from the right */
    color: lightgray;
    opacity: 0.5;
    cursor: pointer;
}

.arrow:hover {
    opacity: 1;
    /* Highlight on hover */
}

@media only screen and (max-width: 940px) {
    .menu-container {
        display: none;
        /* Hide menu on small screens */
    }

    .arrow {
        font-size: 80px;
        /* Adjust arrow size for smaller screens */
    }
}

#top {
    font-family: Arial, sans-serif;
    background-color: #222;
    color: white;
}

#top h1 {
    margin-bottom: 2%;
    font-size: 2em;
}

.top10-section {
    padding: 40px;
    text-align: center;
}

.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 80%;
    margin: 0 auto;
}

.movie-slider-wrapper {
    width: 75%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.movie-slider {
    display: flex;
    transition: transform 0.5s ease;
    /* Smooth sliding effect */
}

.movie-item {
    width: 33.33%;
    /* Show three posters, adjust width accordingly */
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
    background-color: #333;
    margin: 0 10px;
    border-radius: 8px;
}

.movie-item img {
    width: 100%;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.movie-item:hover img {
    transform: scale(1.05);
}

.movie-title {
    color: white;
    font-weight: bold;
    margin-top: 10px;
}

.movie-rating {
    color: #ffcc00;
    margin-bottom: 10px;
}

.button-container {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
}

.button-container button {
    padding: 5px 10px;
    background-color: #444;
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.button-container button:hover {
    background-color: #666;
}

button.prev,
button.next {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

button.prev {
    left: 0;
}

button.next {
    right: 0;
}

/* Make sure the container does not overflow */
#Body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    padding: 20px;
}

.cta-button {
    background: linear-gradient(135deg, #ff6600, #ffcc00);
    padding: 12px 30px;
    font-size: 1.2rem;
    border-radius: 30px;
    text-decoration: none;
    color: white;
    transition: background 0.4s;
    animation: flicker 5s infinite;
    /* Flickering effect */
}

.cta-button:hover {
    background: linear-gradient(135deg, #ffcc00, #ff6600);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Search Section */
.search-section {
    margin: 5rem auto;
    padding: 4rem 0;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
    max-width: 1000px;
    max-height: 1000px;
    backdrop-filter: blur(10px);
    animation: fadeIn 1.5s ease-in-out 1;
    /* Fade in search section */
}

.search-section h1 {
    font-size: 2rem;
    margin-bottom: 3%;
}

.genre-button {
    background: #e7ac08;
    margin: 0.7%;
    border-radius: 30cm;
    font-size: 1rem;
}

.genre-button:hover {
    background: #eea406;
    opacity: 0.4;
}

.search-box h3 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.search-box select {
    padding: 1rem;
    border-radius: 8px;
    border: none;
    margin-right: 20px;
    width: 250px;
    font-size: 1rem;
}

.search-box button {
    padding: 1rem 2rem;
    border: none;
    background-color: #ff6600;
    color: white;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #ffcc00;
}

/* Features Section */
.features-section {
    padding: 5rem 2rem;
    text-align: center;
}

.features-section h3 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.feature-cards {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
}

.feature-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 15px;
    width: 30%;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card img {
    width: 70px;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #ccc;
}

/* Features Section */
.features-section {
    padding: 5rem 2rem;
    text-align: center;
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin: 4rem 0;
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.2);
}

.features-section h3 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.feature-cards {
    display: flex;
    justify-content: space-around;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 15px;
    width: 30%;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card img {
    width: 70px;
    margin-bottom: 1rem;
}

.feature-card h4 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #ccc;
}

/* About Section */
.about-section {
    padding: 4rem 2rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    color: white;
}

.about-section h3 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.about-section p {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #ccc;
}

/* Footer */
footer {
    background-color: #20232a;
    padding: 2rem;
    color: white;
    text-align: center;
}

footer a {
    color: #ffcc00;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}
