@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: #000000;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

/* ============ NAVBAR ============ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 14px clamp(16px, 4vw, 55px);

    background: linear-gradient(to bottom, rgba(0, 0, 0, .8), rgba(0, 0, 0, .4), transparent);

    z-index: 1000;
    transition: background .4s;
}

.navbar.scrolled,
.navbar:hover {
    background: #141414;
}

.nav-left {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 14px;
}

.burger-icon {
    display: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.logo img {
    width: clamp(70px, 8vw, 95px);
    cursor: pointer;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(10px, 1.6vw, 22px);
    margin-left: clamp(14px, 3vw, 35px);
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, .83);
    font-size: clamp(12px, 1vw, 15px);
    font-weight: 400;
    white-space: nowrap;
    transition: .3s;
}

.nav-links a:hover {
    color: #b3b3b3;
}

.nav-links a.active {
    color: #fff;
    font-weight: 600;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    z-index: 1400;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s;
}

.nav-overlay.open {
    opacity: 1;
    visibility: visible;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.6vw, 22px);
    flex-shrink: 0;
}

.nav-right>i,
.nav-right i {
    color: #fff;
    font-size: clamp(16px, 1.6vw, 20px);
    cursor: pointer;
    transition: .3s;
}

.nav-right i:hover {
    color: #b3b3b3;
}

.nav-right a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    transition: .3s;
}

.nav-right a:hover {
    color: #b3b3b3;
}

/* --- Search --- */

.search-wrap {
    display: flex;
    align-items: center;
    border: 1px solid transparent;
    background: transparent;
    transition: background .3s, border-color .3s, width .3s;
}

.search-wrap.active {
    background: rgba(0, 0, 0, .75);
    border-color: #fff;
    padding: 6px 10px;
}

.search-input {
    width: 0;
    opacity: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 14px;
    transition: width .3s ease, opacity .2s ease;
}

.search-wrap.active .search-input {
    width: clamp(140px, 20vw, 220px);
    opacity: 1;
    margin-left: 8px;
}

/* --- Bell dropdown --- */

.bell-wrap {
    position: relative;
}

/* --- Profile --- */

.profile-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.profile {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    background: #333;
}

.caret {
    font-size: 12px !important;
    transition: transform .3s;
}

.profile-wrap.open .caret {
    transform: rotate(180deg);
}

/* --- Shared dropdown menu --- */

.dropdown-menu {
    position: absolute;
    top: calc(100% + 18px);
    right: 0;
    background: rgba(0, 0, 0, .92);
    border: 1px solid #333;
    border-radius: 4px;
    min-width: 200px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s, transform .2s, visibility .2s;
    z-index: 1200;
}

.dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 10px 18px;
    color: #e5e5e5;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
}

.dropdown-item:hover {
    text-decoration: underline;
}

.dropdown-menu hr {
    border: none;
    border-top: 1px solid #333;
    margin: 6px 0;
}

.dropdown-title {
    padding: 4px 18px 8px;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    border-bottom: 1px solid #333;
    margin-bottom: 6px;
}

.dropdown-empty {
    padding: 10px 18px;
    color: #808080;
    font-size: 13px;
}

/* ============ HERO ============ */

.hero-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 380px;
    max-height: 95vh;

    background-image: url('https://qqcdnpictest.mxplay.com/pic/da76b84c97800ed060f364643834442b/en/16x9/1600x900/test_pic1766726531818.webp');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;

    position: relative;
    display: flex;
    align-items: flex-end;

    /* dark gradient so hero text stays legible on any image */
    box-shadow: inset 0 -160px 160px -80px rgba(0, 0, 0, .85);
}

.hero-con {
    position: relative;
    z-index: 5;
    color: #fff;
    width: min(100%, 620px);
    padding: 0 clamp(18px, 5vw, 60px) clamp(28px, 6vw, 60px);
}

.hero-logo {
    width: clamp(160px, 26vw, 380px);
    height: auto;
    margin-bottom: clamp(10px, 2vw, 20px);
}

.hero-tags {
    color: goldenrod;
    font-size: clamp(12px, 1.3vw, 16px);
    margin-bottom: 10px;
}

.hero-desc {
    font-size: clamp(13px, 1.4vw, 17.5px);
    line-height: 1.5;
    max-width: 55ch;
    /* clamp to 3 lines on very small screens so buttons stay visible */
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: clamp(14px, 2.5vw, 20px);
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    font-size: clamp(11px, 1vw, 13px);
    color: #d2d2d2;
}

.rating-tag {
    border: 1px solid #808080;
    padding: 1px 6px;
    font-size: .85em;
}

.hd-tag {
    border: 1px solid #808080;
    padding: 1px 6px;
    font-size: .75em;
    letter-spacing: .5px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    border-radius: 6px;
    height: 38px;
    padding: 0 clamp(14px, 2vw, 20px);
    font-size: clamp(13px, 1.1vw, 16px);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.play-btn {
    background-color: whitesmoke;
    color: #161718;
}

.info-btn {
    background-color: rgba(204, 204, 204, .5);
    color: #fff;
}

/* ============ ROWS / TRENDING ============ */

.dark-section {
    background-color: #000000;
}

.trending-container {
    margin-top: clamp(20px, 4vw, 50px);
}

.row-title {
    color: #fff;
    font-size: clamp(16px, 2vw, 24px);
    margin-left: clamp(16px, 4vw, 50px);
    margin-bottom: 8px;
}

.row-scroll {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 15px clamp(10px, 4vw, 44px) 12px;
    -webkit-overflow-scrolling: touch;
}

.row-scroll::-webkit-scrollbar {
    height: 6px;
}

.row-scroll::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

.card {
    position: relative;
    flex-shrink: 0;
    width: clamp(120px, 20vw, 260px);
}

.trending {
    border-radius: 6px;
    width: 100%;
    aspect-ratio: 260 / 160;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform .25s ease, border-radius .25s ease;
}

/* Netflix-style hover: thumbnail scales up and a control bar slides in below it */
.card:hover {
    z-index: 5;
}

.card:hover .trending {
    transform: scale(1.12);
    border-radius: 4px 4px 0 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .6);
}

/* Sits on top of the thumbnail itself (rows scroll horizontally, so an
   overlay that pushes below the card would get clipped by the scroll
   container) - matches how Netflix behaves on narrower viewports. */
.card-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(to top, rgba(0, 0, 0, .9), rgba(0, 0, 0, 0) 70%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
    pointer-events: none;
}

.card:hover .card-overlay {
    opacity: 1;
    visibility: visible;
}

.card-icons {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #808080;
    background: rgba(42, 42, 42, .6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.icon-btn:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, .15);
}

.icon-btn.play-icon {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.icon-btn.play-icon:hover {
    background: rgba(255, 255, 255, .8);
}

.icon-btn.more-icon {
    margin-left: auto;
}

/* Hide the elaborate hover preview on touch devices - it doesn't work well without a mouse */
@media (hover: none) {
    .card-overlay {
        display: none;
    }

    .card:hover .trending {
        transform: none;
    }
}

/* ============ FOOTER ============ */

.footer {
    width: 100%;
    background: #141414;
    padding: clamp(30px, 6vw, 60px) 0 30px;
    margin-top: 40px;
}

.footer-container {
    width: min(90%, 950px);
    margin: auto;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 22px;
    margin-bottom: 28px;
}

.social-icons a {
    color: #ffffff;
    font-size: 22px;
    transition: 0.3s ease;
}

.social-icons a:hover {
    color: #b3b3b3;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 35px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a {
    text-decoration: none;
    color: #e8e8e8;
    font-size: 13px;
    transition: .3s;
}

.footer-links a:hover {
    text-decoration: underline;
    color: #b3b3b3;
}

.copyright {
    color: #808080;
    font-size: 12px;
    margin-top: 28px;
}

/* ============ RESPONSIVE TWEAKS ============ */

/* Tablets and small laptops: nav links move into a right-side slide-in panel */
@media (max-width: 992px) {

    .burger-icon {
        display: block;
    }

    .nav-overlay {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(78vw, 320px);
        margin-left: 0;

        flex-direction: column;
        align-items: flex-start;
        gap: 4px;

        background: #141414;
        border-left: 1px solid #2a2a2a;
        padding: 70px 26px 26px;

        transform: translateX(100%);
        transition: transform .35s ease;
        z-index: 1500;
        overflow-y: auto;
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        width: 100%;
        padding: 14px 0;
        font-size: 16px;
        border-bottom: 1px solid #262626;
    }

    .nav-links a.active {
        color: #e50914;
    }
}

/* Phones: hide "Children" text link, keep only icons */
@media (max-width: 700px) {
    .kids-link {
        display: none;
    }

    .hero-desc {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

/* Small phones: stack footer to 2 columns */
@media (max-width: 600px) {
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .btn {
        height: 34px;
        padding: 0 14px;
    }
}

/* Very small phones: single column footer, tighter hero */
@media (max-width: 400px) {
    .footer-links {
        grid-template-columns: 1fr;
    }

    .hero-wrapper {
        min-height: 320px;
    }

    .hero-desc {
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
}

/* Larger desktops: cap hero height so it doesn't get absurdly tall */
@media (min-width: 1600px) {
    .hero-wrapper {
        max-height: 780px;
    }
}