/* ========================================
   CSS Variables & Reset
   ======================================== */

:root {
    --netflix-red: #e50914;
    --netflix-black: #141414;
    --netflix-dark: #000000;
    --netflix-gray: #2f2f2f;
    --netflix-light-gray: #808080;
    --netflix-white: #ffffff;
    --transition-speed: 0.3s;
    --card-width: 200px;
    --card-height: 300px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--netflix-black);
    color: var(--netflix-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   Navigation Bar
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    padding: 1.25rem 4%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 10%, transparent);
    transition: background-color var(--transition-speed) ease;
}

.navbar.scrolled {
    background-color: var(--netflix-black);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1920px;
    margin: 0 auto;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.navbar-logo .logo {
    width: 110px;
    height: 30px;
    fill: var(--netflix-red);
    cursor: pointer;
    transition: transform var(--transition-speed) ease;
}

.navbar-logo .logo:hover {
    transform: scale(1.05);
}

.navbar-links {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.navbar-links a {
    color: var(--netflix-white);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

.navbar-links a:hover {
    color: var(--netflix-light-gray);
}

.navbar-links a.active {
    font-weight: 700;
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-btn {
    background: none;
    border: none;
    color: var(--netflix-white);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    transition: color var(--transition-speed) ease;
}

.search-btn:hover {
    color: var(--netflix-light-gray);
}

.profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    transition: transform var(--transition-speed) ease;
}

.profile:hover .profile-img {
    transform: scale(1.1);
}

.profile-arrow {
    color: var(--netflix-white);
    transition: transform var(--transition-speed) ease;
}

.profile:hover .profile-arrow {
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--netflix-white);
    transition: all var(--transition-speed) ease;
}

/* ========================================
   Hero/Banner Section
   ======================================== */

.hero {
    position: relative;
    height: 80vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    padding: 0 4%;
    margin-bottom: 2rem;
    overflow: hidden;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        var(--netflix-black) 0%,
        transparent 50%
    ),
    linear-gradient(
        to right,
        rgba(20, 20, 20, 0.9) 0%,
        transparent 50%
    );
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 550px;
    animation: slideUp 1s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-play {
    background-color: var(--netflix-white);
    color: var(--netflix-black);
}

.btn-play:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: var(--netflix-white);
}

.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.5);
    transform: scale(1.05);
}

/* ========================================
   Movie Rows Container
   ======================================== */

.movie-rows-container {
    padding: 0 4%;
    margin-top: -150px;
    position: relative;
    z-index: 10;
}

.movie-row {
    margin-bottom: 3rem;
}

.movie-row-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-left: 0;
    transition: color var(--transition-speed) ease;
}

.movie-row-title:hover {
    color: var(--netflix-light-gray);
    cursor: pointer;
}

/* Movie Row Slider */
.movie-row-slider {
    position: relative;
}

.movie-row-wrapper {
    overflow: hidden;
    position: relative;
}

.movie-row-list {
    display: flex;
    gap: 0.5rem;
    transition: transform 0.5s cubic-bezier(0.5, 0, 0.1, 1);
    padding: 0.5rem 0;
}

/* Scroll Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--netflix-white);
    border: none;
    width: 50px;
    height: 100%;
    cursor: pointer;
    z-index: 10;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-speed) ease;
}

.movie-row-slider:hover .scroll-btn {
    opacity: 1;
}

.scroll-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn-left {
    left: 0;
}

.scroll-btn-right {
    right: 0;
}

/* Movie Cards */
.movie-card {
    min-width: var(--card-width);
    height: var(--card-height);
    background-color: var(--netflix-gray);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    position: relative;
}

.movie-card:hover {
    transform: scale(1.15);
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.movie-card:hover .movie-poster {
    transform: scale(1.05);
}

.movie-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    opacity: 0;
    transform: translateY(10px);
    transition: all var(--transition-speed) ease;
}

.movie-card:hover .movie-info {
    opacity: 1;
    transform: translateY(0);
}

.movie-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--netflix-white);
    margin: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 3rem 4%;
    background-color: var(--netflix-black);
    border-top: 1px solid var(--netflix-gray);
    margin-top: 5rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.footer-text {
    color: var(--netflix-light-gray);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.footer-copyright {
    color: var(--netflix-light-gray);
    font-size: 0.85rem;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --card-width: 180px;
        --card-height: 270px;
    }

    .navbar {
        padding: 1rem 3%;
    }

    .navbar-left {
        gap: 1.5rem;
    }

    .navbar-links {
        gap: 1rem;
    }

    .navbar-links a {
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .movie-rows-container {
        padding: 0 3%;
        margin-top: -100px;
    }

    .movie-row-title {
        font-size: 1.3rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --card-width: 140px;
        --card-height: 210px;
    }

    .navbar {
        padding: 0.75rem 3%;
    }

    .navbar-logo .logo {
        width: 80px;
        height: 22px;
    }

    .navbar-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .navbar-right {
        gap: 1rem;
    }

    .search-btn {
        padding: 0.25rem;
    }

    .search-btn svg {
        width: 20px;
        height: 20px;
    }

    .profile-img {
        width: 28px;
        height: 28px;
    }

    .hero {
        height: 60vh;
        min-height: 400px;
        margin-bottom: 1rem;
    }

    .hero-content {
        max-width: 90%;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.4;
    }

    .hero-buttons {
        flex-wrap: wrap;
    }

    .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.95rem;
    }

    .movie-rows-container {
        padding: 0 3%;
        margin-top: -50px;
    }

    .movie-row {
        margin-bottom: 2rem;
    }

    .movie-row-title {
        font-size: 1.1rem;
    }

    .scroll-btn {
        width: 40px;
        font-size: 1.5rem;
    }

    .movie-card {
        min-width: calc(var(--card-width) * 0.9);
        height: calc(var(--card-height) * 0.9);
    }

    .movie-card:hover {
        transform: scale(1.08);
    }

    .footer {
        padding: 2rem 3%;
        margin-top: 3rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    :root {
        --card-width: 120px;
        --card-height: 180px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .btn svg {
        width: 18px;
        height: 18px;
    }

    .movie-row-title {
        font-size: 1rem;
    }

    .scroll-btn {
        width: 30px;
        font-size: 1.2rem;
    }
}

/* ========================================
   Loading State
   ======================================== */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    color: var(--netflix-light-gray);
    font-size: 1.2rem;
}

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--netflix-black);
}

::-webkit-scrollbar-thumb {
    background: var(--netflix-gray);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--netflix-light-gray);
}
