:root {
    --primary-color: #aaba38;
    --background-color: #0d0d0d;
    /* --text-color: #ffffff; */
    --text-color: #edf2ee;
    --secondary-text-color: #a0a0a0;
    --card-bg-color: #1a1a1a;
    --border-radius: 12px;
}

body {
    font-family: Geist, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    /* padding: 20px 5%; */
}



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

a {
    color: var(--text-color);
    text-decoration: none;
    border-bottom: 3px solid transparent;
}

ul {
    list-style-type: none;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--background-color);
}

header .logo {
    font-size: 1.5rem;
    font-weight: 700;
    max-width: 50px;
}

.logo img {
    max-width: 100%;
    border-radius: 12px;
}

/* Hamburger icon */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

header nav ul {
    display: flex;
    gap: 30px;
}

header nav a:hover {
    color: var(--primary-color);
}

header nav ul li a.active {
    border-bottom-color: var(--primary-color);
}

header .user-actions .login-btn {
    margin-right: 15px;
}

header .user-actions .signup-btn {
    background-color: var(--primary-color);
    color: #000;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 500;
}
header .user-actions .signup-btn:hover{
background-color: #6c7526;
}
.mobile-menu {
    display: none;
    overflow-y: auto;
    z-index: 1000;
    overscroll-behavior: contain;
    scrollbar-width: none;
}


.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 5%;
}

#recommendation-heading {
    text-align: center;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 50px;
    color: var(--primary-color);
}

/* --- Responsive Movie Grid --- */
.movie-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* --- Individual Movie Card --- */
.movie-card {
    background-color: var(--card-background);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.movie-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9);
}

.card-image-container img {
    width: 100%;
    height: 330px;
    object-fit: cover;
    display: block;
}

.movie-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.movie-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    flex-grow: 1;
}

.movie-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.movie-rating {
    font-weight: 600;
    color: #f5c518;
}

.movie-genre {
    background-color: #444;
    color: #ddd;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
}

.card-buttons {
    display: flex;
    gap: 10px;
}

.card-btn {
    flex-grow: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}

.preview-btn {
    background-color: var(--primary-color);
    color: white;
    color: #0C0E0B;
}

.preview-btn:hover {
    background-color: #ff3b45;
}

.watch-btn {
    background-color: #555;
    color: white;
    text-decoration: none;
    text-align: center;
}

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


/* --- Video Preview  --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    animation: fadeIn 0.3s;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
}

.close-button {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-button:hover {
    color: var(--primary-color);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* For Large Phones and Small Tablets (max-width: 888px) */
@media (max-width: 888px) {
    header {
        justify-content: space-between;
        flex-direction: row;
        gap: 15px;
    }

    nav {
        display: none;
        /* Hide default nav */
    }

    .user-actions {
        position: absolute;
        right: 20px;
        top: 15px;
        display: none;
    }

    .hamburger {
        display: flex;
    }

    /* Sidebar Menu */
    .mobile-menu {
        position: fixed;
        top: 0;
        left: -250px;
        /* Hidden by default */
        width: 250px;
        height: 100%;
        background: #222;
        padding: 60px 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        transition: left 0.3s ease;
        z-index: 999;
    }

    .mobile-menu.active {
        left: 0;
    }

    .mobile-menu a {
        color: #fff;
        text-decoration: none;
        font-size: 1.2rem;
    }

    .close-btn {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 3rem;
        color: #fff;
        cursor: pointer;
    }

    /* Overlay */
    .overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        display: none;
        z-index: 500;
    }

    .overlay.active {
        display: block;
    }

    #recommendation-heading {
        font-size: 2rem;
    }

    .hero-section {
        flex-direction: column;
        text-align: center;
        height: auto;
        margin-top: 20px;
    }

    .hero-carousel {
        margin-top: 30px;
        justify-content: center;
    }

    .search-section {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        border-radius: 20px;
    }

    .movie-carousel-section h2 {
        font-size: 1.5rem;
    }

    .carousel-btn {
        display: none;
        /* Hide next/prev buttons on smaller screens */
    }

    .top-picks-section {
        padding: 25px;
    }

    .top-picks-info {
        text-align: center;
    }

    .footer-col {
        text-align: center;
    }
}


/* For Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
    main {
        padding: 0 3%;
    }

    header nav ul {
        gap: 20px;
        font-size: 0.9rem;
    }



    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .footer-col {
        flex-basis: 100%;
        /* Stacks all footer items in a single column */
    }
}

/* when i reaload the page on a smaller screen, this aligns it and prevents it from zooming out or in */
html,
body {
    width: 100% !important;
    scroll-behavior: smooth;
    overflow-x: hidden !important;
}