@font-face {
    font-family: Netflix Sans;
    src: url(../fonts/Regular.woff2);
}

body,
html {
    font-family: 'Netflix Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 16px;
    margin: 0;
    padding: 0;
    width: 100%;
    position: relative;
    background-color: #141414;
    overflow-x: hidden;
}

/* main styling start */
header,
.container,
.mylist,
.continue-watching {
    z-index: 10;
}

.image-size {
    max-width: 94%;
    height: 9rem;
}

/* header styling */
header {
    line-height: 0.4;
    background: transparent !important;
    min-height: 68px;
    padding: 0 4%;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

header.hide-nav {
    transform: translateY(-100%);
}

.logo {
    text-decoration: none;
    font-weight: 800;
    transform: translateZ(2);
}

.second-logo-text {
    display: none;
}

@media (max-width: 568px) {
    .logo {
        display: none;
    }

    .second-logo-text {
        display: block;
        font-size: 40px;
        margin-left: 10px;
        text-decoration: none;
        font-weight: 800;
        transform: translateZ(2);
    }
}

.nav-item {
    padding: 0px 15px;
}

.righticons img {
    width: 22px;
    margin-right: 25px;
    color: white;
}

#search-input {
    background: rgba(20, 20, 20, 0.55) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    color: white;
}


/* dropdown styling header notification start */
.notification .dropdown-content {
    right: 6%;
    border-top: 3px solid white;
    padding-top: 0;
    padding-bottom: 0;
}

.notification .dropdown-content a {
    border-bottom: 1px solid rgb(85, 85, 85);
    color: rgb(226, 226, 226);
}

.notification .dropdown-content span {
    font-size: 13px;
    font-weight: 300;
    padding-left: 5px;
}

.notification .dropdown-content::after {
    position: absolute;
    z-index: 20000;
    content: "";
    top: -30px;
    right: 0px;
    width: 100%;
    height: 38px;
    background-color: #ffffff00;
}

/* dropdown styling header notification end */
.righticons .user-icon {
    width: 30px;
    margin-right: 4px;
    cursor: pointer;
    border-radius: 3px;
}

.righticons .profile-arrow {
    cursor: pointer;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    border-color: #fff transparent transparent transparent;
    margin-left: 0px;
    display: inline-block;
    vertical-align: middle;
}

/* dropdown styling header user account */
.profile-arrow {
    margin-top: -15px;
}

.dropdown {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    flex-direction: column;
    margin-top: 20px;
    padding: 20px 0px;
    right: 2%;
    position: absolute;
    background-color: rgb(41, 41, 41);
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.dropdown-content::after {
    position: absolute;
    content: "";
    top: -20px;
    right: 0px;
    width: 100%;
    height: 22px;
    background-color: #ffffff00;
}

.dropdown-content::before {
    position: absolute;
    content: "";
    top: -10px;
    right: 23px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 10px 10px 0 10px;
    border-color: #fff transparent transparent transparent;
    margin-left: 0px;
    display: inline-block;
    transform: rotate(180deg);
}

.dropdown-content .line {
    height: 1px;
    border: none;
    opacity: 0.4;
    margin: 15px 0px;
    background-color: white;
    width: 100%;
}

.dropdown-content a {
    float: none;
    color: white;
    font-size: 14px;
    padding: 12px 16px;
    text-decoration: none;
    text-align: left;
}

.righticons .dropdown:hover .dropdown-content {
    display: block;
}

.profile-links {
    font-family: Arial, Helvetica, sans-serif;
}

.profile-links span {
    font-size: 13px;
    font-weight: 300;
    padding-left: 5px;
}

.profile-links .last {
    margin-top: 10px;
}



@media (max-width: 760px) {
    .righticons {
        display: none;
    }
}

/* hero section styling */
.hero-background-image {
    z-index: 0;
    position: absolute;
    background-position: center center;
    background-size: cover;
    left: 0;
    right: 0;
    top: 0;
    height: 90vh;
    width: 100%;
}

#browse-dashboard video {
    object-fit: fill;

}

@media (max-width: 750px) {
    .hero-background-image {
        width: auto;
        height: 80vh;
    }
}

.shadow-layer {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 25%, rgba(0, 0, 0, 0) 75%, rgba(0, 0, 0, 0.85) 100%),
        linear-gradient(to top, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0) 30%);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 90vh;
    pointer-events: none;
    opacity: 1;
    z-index: 1;
    -webkit-transition: opacity 500ms;
    -o-transition: opacity 500ms;
    -moz-transition: opacity 500ms;
    transition: opacity 500ms;
}

#browse-dashboard {
    padding-top: 500px;
}

#browse-dashboard .text-container {
    width: 80%;
    max-width: 900px;
}

@media (max-width: 600px) {
    #browse-dashboard .text-container {
        width: 100%;
        margin-left: 10px;
    }
}

#browse-dashboard .show-logo {
    max-width: 380px;
}

#browse-dashboard .ranking svg {
    width: 25px;
}

#browse-dashboard .ranking span {
    color: #fff;
    font-weight: bold;
    line-height: normal;
    font-size: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.45);
    margin-top: .1vw;
}

#browse-dashboard .synopsis p {
    color: #fff;
    font-weight: normal;
    line-height: 1.4;
    width: 100%;
    font-size: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.45);
}

.buttons-container {
    display: flex;
    align-items: center;
}

.buttons-container button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0.6rem 1.5rem 0.6rem 1.2rem;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    margin-right: 15px;
}

.buttons-container button span {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.buttons-container svg {
    width: 28px;
    height: 28px;
}

.buttons-container .play-button {
    background-color: white;
    color: black;
}

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

.buttons-container .play-button a {
    color: black;
    text-decoration: none;
}

.buttons-container .more-info-button {
    background-color: rgba(109, 109, 110, 0.7);
    color: white;
}

.buttons-container .more-info-button:hover {
    background-color: rgba(109, 109, 110, 0.4);
}

/* Tablet responsiveness */
@media (max-width: 1024px) and (min-width: 751px) {
    .hero-background-image {
        object-fit: cover;
    }
}

/* Mobile responsiveness */
@media (max-width: 750px) {
    .hero-background-image {
        position: absolute;
        width: 100%;
        height: 45vh !important;
        object-fit: cover;
    }

    /* Adjust container padding/margins for mobile */
    #browse-dashboard {
        padding-top: 24vh !important;
    }

    #browse-dashboard .text-container {
        width: 90%;
        margin: 0 auto;
        padding-top: 0.5rem;
    }

    .contentlogo h1 {
        font-size: 22px !important;
        margin-bottom: 5px !important;
    }

    #browse-dashboard .synopsis {
        min-height: auto !important;
    }

    #browse-dashboard .synopsis p {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    .buttons-container button {
        padding: 0.35rem 0.9rem !important;
        font-size: 0.85rem !important;
        margin-right: 10px !important;
    }

    .buttons-container svg {
        width: 20px !important;
        height: 20px !important;
    }

    #browse-dashboard .text-container .m-t-20 {
        margin-top: 8px !important;
    }

    .show-logo {
        width: 80%;
    }
}


/* -- Netflix Card Hover & Typography --  */

.video {
    /* No delay when mousing out so it shrinks immediately */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 1;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background-color: #222;
    aspect-ratio: 2/3;
    width: 15vw;
    /* Fallback width when not wrapped in owl-item to prevent layout jumps during refresh */
}

.owl-item .video {
    width: 100%;
    /* Take full width of the owl-item wrapper */
}

.video img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.shimmer-card {
    background: #333;
    position: relative;
    overflow: hidden;
}

.shimmer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
    animation: shimmer 1.5s infinite linear;
    will-change: transform;
}

@keyframes shimmer {
    0% {
        transform: translate3d(-200%, 0, 0);
    }

    100% {
        transform: translate3d(200%, 0, 0);
    }
}

.video:hover {
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.owl-carousel {
    z-index: 1;
}

.owl-carousel:hover {
    z-index: 20;
}

/* Fix Owl Carousel clipping scaled items */
.owl-carousel .owl-stage-outer {
    overflow: visible !important;
}

.owl-carousel .owl-stage {
    display: flex;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    touch-action: pan-y;
}

.owl-carousel .owl-item {
    position: relative;
    z-index: 1;
    transition: z-index 0s 0.15s;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.owl-carousel .owl-item:hover {
    z-index: 99;
    transition: z-index 0s 0s;
}

.row-header {
    font-size: 1.4vw;
    font-weight: bold;
    color: #e5e5e5;
    margin-bottom: 0.5em;
    cursor: pointer;
    transition: color 0.2s;
}

@media screen and (max-width: 800px) {
    .row-header {
        font-size: 16px;
    }
}

.row-header:hover {
    color: white;
}



/* Netflix Style Carousel Navigation */
.owl-nav {
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.owl-prev,
.owl-next {
    position: absolute;
    top: 0;
    height: 100%;
    width: 6vw;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    pointer-events: auto;
    z-index: 10;
}

.owl-prev {
    left: -4vw;
    background: linear-gradient(to right, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0.8) 40%, rgba(20, 20, 20, 0) 100%);
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.owl-next {
    right: -4vw;
    background: linear-gradient(to left, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0.8) 40%, rgba(20, 20, 20, 0) 100%);
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.owl-carousel:hover .owl-prev,
.owl-carousel:hover .owl-next {
    opacity: 1;
}

.owl-prev:hover {
    background: linear-gradient(to right, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 1) 30%, rgba(20, 20, 20, 0) 100%);
}

.owl-next:hover {
    background: linear-gradient(to left, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 1) 30%, rgba(20, 20, 20, 0) 100%);
}

.slider-arrow {
    background-color: rgba(50, 50, 50, 0.5);
    border-radius: 12px;
    padding: 1.5vw 0.5vw;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
}

.owl-prev:hover .slider-arrow,
.owl-next:hover .slider-arrow {
    background-color: rgba(20, 20, 20, 0.9);
    transform: scale(1.1);
}

@media screen and (max-width: 768px) {

    .owl-prev,
    .owl-next {
        opacity: 0.85 !important;
        width: 10vw;
    }

    .owl-prev {
        left: 0;
        background: linear-gradient(to right, rgba(20, 20, 20, 0.9) 0%, rgba(20, 20, 20, 0.5) 50%, rgba(20, 20, 20, 0) 100%);
    }

    .owl-next {
        right: 0;
        background: linear-gradient(to left, rgba(20, 20, 20, 0.9) 0%, rgba(20, 20, 20, 0.5) 50%, rgba(20, 20, 20, 0) 100%);
    }

    .slider-arrow {
        padding: 4vw 1.5vw;
        border-radius: 6px;
        background-color: rgba(30, 30, 30, 0.7);
    }

    .slider-arrow svg {
        width: 6vw;
        height: 6vw;
    }
}

.slider-arrow svg {
    width: 2.5vw;
    height: 2.5vw;
    min-width: 24px;
    min-height: 24px;
}

/* my list */
.black-background {
    margin-top: 30px;
    width: 100%;
    position: relative;
    z-index: 1;
    background-color: #141414;
    -webkit-box-shadow: 20px -40px 50px #141414;
    -moz-box-shadow: 20px -40px 50px #141414;
    box-shadow: 0px -40px 50px 15px #141414;
}

#mylist {
    padding-top: 0px;
    position: relative;
}

@media (max-width: 900px) {
    #mylist {
        padding-top: 40px;
    }
}

/* universal video hover styling */

.video-item {
    position: relative;
    max-width: 100%;
    transition: transform 0.2s;
    z-index: 5;
    cursor: pointer;
    height: 9rem;

}

.video-description {
    z-index: 6;
    position: absolute;
    width: 100%;
    height: 100%;
    bottom: 0;
    left: 0;
    right: 0;
}

.video-description {
    background-image: linear-gradient(90deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 85%);
    padding: 8px;
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0;
    transform: scale(0);
    transform-origin: left;
    display: flex;
}

.video:hover .video-description {
    opacity: 1;
    transform: scale(1);
}

.video-description .play-button svg {
    width: 30px;
    background-color: white;
    border-radius: 50%;
    padding: 3px;
}

.video-description h4 {
    font-size: 18px;
}

.video-description .info p {
    font-size: 14px;
}

.video-description .info .rated {
    border: 1px dashed white;
    margin-right: 4px;
    font-size: 12px;
}

.video-description .genere {
    padding-top: 5px;
    padding-bottom: 5px;
}

.video-description .genere p {
    padding-right: 3px;
    font-size: 12px;
}

@media (max-width: 490px) {
    .video-description {
        display: none;
    }
}

/* big section */
.big-section {
    margin-top: 40px;
    flex-basis: 100%;
    flex-wrap: nowrap;
}

.big-section img {
    max-width: 50%;
    padding-right: 30px;
}

@media (max-width: 870px) {
    .big-section {
        flex-wrap: wrap;
        justify-content: center;
    }

    .big-section img {
        max-width: 100%;
        padding-right: 0px;
        margin-bottom: 30px;
    }
}

/* footer */

footer {
    color: #808080 !important;
    padding-top: 80px;
}

footer .footer-container {
    max-width: 800px;
    padding: 0 20px;
}

.widgets div {
    margin: 10 10px;
}

footer ul {
    margin: 0;
    padding: 0;
}

footer ul li {
    list-style: none;
    padding: 6px 10px;
    font-size: 17px;
    cursor: pointer;
}

footer ul li:hover {

    color: white;
}

.service {
    border: 1px solid #808080;
    color: #808080 !important;
    background-color: transparent !important;
    margin: 20px 0px;
}

.service:hover {
    color: white;
    border: 2px solid #808080;
}

/* footer navigation */
.footer-navigation {
    display: none;
    z-index: 25;
    overflow: hidden;
    padding: 0px 0px;
    background-color: rgb(22, 22, 22);
    position: fixed;
    bottom: 0;
    width: 100%;

}

.footer-navigation a {
    flex-grow: 1;
    display: block;
    color: #f2f2f26b;
    text-align: center;
    padding: 5px 16px;
    text-decoration: none;
    font-size: 13px;
}

.footer-navigation a:hover {
    background: #f1f1f1;
}

.footer-navigation a.active {
    color: rgba(255, 255, 255, 0.726);
    background-color: rgb(36, 36, 36);
}

/* my list page styling */
.my-list-page-container {
    flex-wrap: wrap;
}

.my-list-page-container a {
    flex: 1/3;
}

/* mobile navigation setting */
@media(max-width: 600px) {
    .home {
        display: none;
    }

    .latest {
        display: none;
    }

    .footer-navigation {
        display: flex;
    }

    footer {
        margin-bottom: 3rem;

    }
}

@media (max-width: 600px) {
    .widgets {
        display: flex;
        flex-direction: column;
        gap: 20px;
        /* Space between each widget */
    }

    .widgets div {
        width: 100%;
        /* Each widget takes full width */
    }

    footer ul li {
        font-size: 16px;
    }

    /* Center the service button */
    .service {
        align-self: center;
    }

    /* Adjust copyright section */
    .copyright {
        text-align: center;
        padding-top: 10px;
    }

}


.github-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    /* Inherit color from parent */
}

.github-link:hover {
    text-decoration: underline;
}

.github-logo {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

/* --- Movie Metadata Modal Styles --- */
.metadata-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px) grayscale(100%);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.metadata-modal.hidden {
    opacity: 0;
    pointer-events: none;
}

.metadata-modal-content {
    width: 95%;
    max-width: 1100px;
    height: auto;
    min-height: 85vh;
    max-height: 95vh;
    background-color: #181818;
    border-radius: 12px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    box-shadow: 0px 15px 50px rgba(0, 0, 0, 0.8);
    transform: scale(1);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.metadata-modal-content::-webkit-scrollbar {
    display: none;
}

.metadata-modal.hidden .metadata-modal-content {
    transform: scale(0.9);
}

.metadata-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: background-color 0.2s, transform 0.2s;
}

.metadata-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.metadata-hero {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    position: relative;
}

.metadata-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #181818 0%, rgba(24, 24, 24, 0.8) 30%, rgba(24, 24, 24, 0.3) 60%, rgba(24, 24, 24, 0.1) 100%),
        linear-gradient(90deg, #181818 0%, rgba(24, 24, 24, 0.6) 40%, rgba(24, 24, 24, 0) 100%);
}

.metadata-info {
    position: absolute;
    bottom: 40px;
    left: 40px;
    width: 60%;
    z-index: 5;
    color: white;
}

.metadata-title {
    font-size: clamp(32px, 4vw, 50px);
    font-weight: 800;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    line-height: 1.1;
}

.metadata-meta {
    display: flex;
    gap: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #46d369;
    /* Netflix match percentage green for nice aesthetic */
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

#metadata-type {
    color: #a3a3a3;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.metadata-synopsis {
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 25px;
    color: #e5e5e5;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.metadata-actions .play-button {
    font-size: 1.3rem;
    padding: 0.8rem 2rem 0.8rem 1.6rem;
}

.shimmer-text-dark {
    position: relative;
    overflow: hidden;
    background-color: #333;
    /* Darker base color for text */
    color: transparent !important;
    /* Hide text */
    text-shadow: none !important;
    /* Hide text shadow */
    border-radius: 4px;
    min-height: 1.2em;
}

#metadata-play-btn.shimmer-card {
    color: transparent !important;
}

#metadata-play-btn.shimmer-card svg {
    opacity: 0;
}

.shimmer-text-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    animation: shimmer-text-dark-anim 1.5s infinite linear;
    will-change: transform;
}

@keyframes shimmer-text-dark-anim {
    0% {
        transform: translate3d(-200%, 0, 0);
    }

    100% {
        transform: translate3d(200%, 0, 0);
    }
}

@media (max-width: 768px) {
    .metadata-modal-content {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .metadata-info {
        width: 90%;
        left: 20px;
        bottom: 20px;
    }

    .metadata-synopsis {
        font-size: 16px;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }

    .metadata-hero {
        height: 45vh !important;
    }

    .metadata-title {
        font-size: clamp(24px, 6vw, 36px) !important;
    }

    .metadata-actions .play-button {
        font-size: 16px !important;
        padding: 0.5rem 1.2rem !important;
    }
}

/* --- Mobile Responsive Updates --- */
@media (max-width: 768px) {
    header {
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 10px 15px !important;
    }

    .righticons {
        margin-top: 0 !important;
        width: auto !important;
        flex-grow: 1;
        display: flex !important;
        justify-content: flex-end !important;
        margin-left: 15px;
    }

    .search-box {
        width: auto;
        margin-right: 0 !important;
        position: relative;
    }

    #search-input {
        width: 0 !important;
        padding: 0 !important;
        border: none !important;
        opacity: 0;
        transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        box-sizing: border-box;
    }

    .search-box.active #search-input {
        width: 200px !important;
        padding: 10px 45px 10px 20px !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        opacity: 1;
    }

    #search-icon {
        position: absolute;
        right: 15px;
        margin-left: 0 !important;
        z-index: 10;
        pointer-events: auto;
    }

    .hero-background-image {
        height: 45vh !important;
    }

    .shadow-layer {
        height: 45vh !important;
        background: linear-gradient(to right, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0) 80%, rgba(0, 0, 0, 0.4) 100%),
            linear-gradient(to top, rgba(20, 20, 20, 1) 0%, rgba(20, 20, 20, 0.8) 40%, rgba(20, 20, 20, 0) 100%) !important;
    }

    .metadata-details-container {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 20px !important;
    }

    .metadata-left,
    .metadata-right {
        width: 100% !important;
        min-width: unset !important;
    }

    .metadata-hero-info {
        left: 20px !important;
        width: 90% !important;
    }

    #metadata-episodes-section,
    .metadata-more-like-this {
        padding: 0 20px 20px 20px !important;
    }

    .video {
        width: 35vw;
    }

    .p-t-40 {
        padding-top: 15px !important;
    }
}

@media (max-width: 480px) {
    .video {
        width: 45vw;
    }

    #full-search-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)) !important;
    }

    .metadata-title {
        font-size: clamp(20px, 7vw, 28px) !important;
    }

    .metadata-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .metadata-hero {
        height: 40vh !important;
    }

    #metadata-season-select {
        min-width: 140px !important;
        font-size: 14px !important;
    }
}

/* Grayscale background when searching is active */
body.searching-active #browse-dashboard,
body.searching-active .black-background {
    filter: grayscale(100%) contrast(0.9);
    opacity: 0.15;
    transition: filter 0.4s ease, opacity 0.4s ease;
    pointer-events: none; /* Disable interaction with background elements */
}

/* Smooth transition when normal */
#browse-dashboard,
.black-background {
    transition: filter 0.4s ease, opacity 0.4s ease;
}

/* Make search popup and search grid items larger */
#search-results {
    width: 460px !important;
    max-height: 500px !important;
}

#full-search-results-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
}

@media (max-width: 768px) {
    #search-results {
        width: 88vw !important;
        right: -10px !important;
    }
}

/* Fix span inside H2 inheriting global span font-size instead of H2 */
#search-query-text {
    font-size: inherit !important;
    font-weight: inherit !important;
}