/* -----------------------------
   VARIABLES & RESETS
   ----------------------------- */
:root {
    --bg-color: #141414;
    --text-color: #ffffff;
    --primary-color: #e50914;
    --primary-hover: #f40612;
    --nav-bg: rgba(20, 20, 20, 0);
    --nav-bg-solid: rgba(20, 20, 20, 1);
    --transition-speed: 0.3s;
    --overlay-gradient: linear-gradient(
        to top,
        rgba(20,20,20,1) 0%,
        rgba(20,20,20,0.6) 40%,
        rgba(20,20,20,0) 100%
    );
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: #b3b3b3;
}

/* -----------------------------
   NAVIGATION
   ----------------------------- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4%;
    height: 68px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--nav-bg);
    transition: background-color var(--transition-speed) ease;
}

.navbar.scrolled {
    background-color: var(--nav-bg-solid);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo {
    width: 92px;
    cursor: pointer;
}

.text-logo {
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    font-size: 0.85rem;
    font-weight: 400;
}

.nav-links .active {
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 1.2rem;
}

.icons {
    cursor: pointer;
}

.kids-link {
    font-size: 0.85rem;
    cursor: pointer;
}

.profile-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.profile-img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

/* -----------------------------
   HERO / BILLBOARD
   ----------------------------- */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    background-size: cover;
    background-position: center top;
    /* Dummy background image, updated by JS */
    background-image: url('https://image.tmdb.org/t/p/original/56v2KjBlU4XaOv9rVYEQypROD7P.jpg');
}

.hero-content {
    position: absolute;
    top: 35%;
    left: 4%;
    width: 40%;
    z-index: 10;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

.hero-description {
    font-size: 1.2vw;
    font-weight: 400;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.6rem;
    font-size: 1.2rem;
    font-weight: 600;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, background-color 0.2s;
}

.btn-play {
    background-color: white;
    color: black;
}

.btn-play:hover {
    background-color: rgba(255,255,255,0.75);
}

.btn-info {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

.hero-fade-bottom {
    position: absolute;
    bottom: 0;
    height: 7.4rem;
    width: 100%;
    background: var(--overlay-gradient);
}

/* -----------------------------
   MAIN CONTENT & ROWS
   ----------------------------- */
.main-content {
    padding: 0 4%;
    margin-top: -6rem; /* Pull up to overlay slightly on the hero */
    position: relative;
    z-index: 5;
}

.row {
    margin-bottom: 3rem;
}

.row-title {
    font-size: 1.3vw;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #e5e5e5;
    padding-left: 0.5rem;
}

.row-posters {
    display: flex;
    gap: 10px;
    overflow-y: hidden;
    overflow-x: scroll;
    padding: 10px 0 10px 10px;
    scroll-behavior: smooth;
    /* Hide scrollbar for webkit */
}

.row-posters::-webkit-scrollbar {
    display: none;
}
.row-posters {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.row-poster {
    width: 100%;
    max-width: 12vw;
    object-fit: contain;
    border-radius: 4px;
    /* The core hover animation */
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.row-poster.large {
    max-width: 10vw; /* Slightly larger base width for Netflix originals style if desired, or handle in JS */
}

.row-poster:hover {
    transform: scale(1.08);
    opacity: 1; /* Just in case it was dimmed */
}

/* Sibling combinator to push posters down the line on hover */
.row-posters:hover .row-poster:not(:hover) {
    opacity: 0.5; /* Optional: dim unfocused, though not strictly Netflix */
}

/* -----------------------------
   FOOTER
   ----------------------------- */
footer {
    padding: 1rem 4%;
    margin-top: 5rem;
    color: #737373;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    font-size: 0.8rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-links a {
    color: #737373;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-text {
    font-size: 0.75rem;
    margin-top: 1rem;
    color: #737373;
}

/* -----------------------------
   MEDIA QUERIES
   ----------------------------- */
@media screen and (max-width: 900px) {
    .nav-links { display: none; }
    
    .hero-title { font-size: 3rem; }
    .hero-description { font-size: 1rem; width: 60vw; }
    .hero-content { width: 60%; }
    
    .row-title { font-size: 1.2rem; }
    .row-poster { max-width: 25vw; }
}

@media screen and (max-width: 600px) {
    .hero-title { font-size: 2.5rem; }
    .hero-description { font-size: 0.9rem; width: 80vw; }
    .hero-content { width: 80%; }
    
    .row-poster { max-width: 35vw; }
    
    .footer-links {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    .footer-links ul {
        width: 45%;
    }
}
