:root {
    --netflix-red: #E50914;
    --background: #141414;
    --text-white: #ffffff;
    --text-meta: #a3a3a3;
    --btn-play-bg: #ffffff;
    --btn-play-text: #000000;
    --btn-info-bg: rgba(109, 109, 110, 0.7);
    --btn-info-text: #ffffff;
    --header-bg-gradient: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 10%, transparent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Martel Sans', sans-serif;
}

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

/* Profile Gate */
.profile-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #141414;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}

.profile-gate-content {
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.profile-gate h1 {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
}

.profiles-container {
    display: flex;
    gap: 30px;
    margin-bottom: 3rem;
}

.profile-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.2s;
}

.profile-card:hover {
    transform: scale(1.05);
}

.profile-card:hover span {
    color: #fff;
}

.profile-card img {
    width: 10vw;
    max-width: 150px;
    min-width: 84px;
    border-radius: 4px;
    border: 3px solid transparent;
}

.profile-card:hover img {
    border-color: #fff;
}

.profile-card span {
    color: #808080;
    font-size: 1.2rem;
}

.add-icon {
    width: 10vw;
    max-width: 150px;
    min-width: 84px;
    height: 10vw;
    max-height: 150px;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: grey;
    border: 3px solid transparent;
    /* Align with image border */
}

.profile-card:hover .add-icon {
    background: #e5e5e5;
    color: #141414;
    border-radius: 4px;
}

.manage-btn {
    background: transparent;
    border: 1px solid #808080;
    color: #808080;
    padding: 0.5rem 1.5rem;
    font-size: 1.2rem;
    cursor: pointer;
    letter-spacing: 2px;
}

.manage-btn:hover {
    border-color: #fff;
    color: #fff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Utility */
.hidden {
    display: none !important;
}

.active {
    display: block;
}

/* Header Tweaks */
.nav-item {
    position: relative;
    cursor: pointer;
}

.nav-item.active a {
    font-weight: 700;
    color: #fff;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    background: #000;
    border: 1px solid #fff;
    padding: 5px 10px;
    margin-right: 15px;
    transition: width 0.3s ease;
}

#search-input {
    background: transparent;
    border: none;
    color: #fff;
    margin-left: 10px;
    outline: none;
    width: 200px;
    /* Expandable in future */
}

/* Page Sections */
.page-section {
    min-height: 100vh;
    padding-top: 68px;
}

#home-page {
    padding-top: 0;
}

/* Enhanced Page Hero */
.page-hero {
    height: 50vh;
    min-height: 400px;
    background-size: cover;
    background-position: center top;
    display: flex;
    align-items: flex-end;
    padding: 60px 4%;
    position: relative;
}

.page-hero-content {
    max-width: 600px;
    z-index: 10;
}

.page-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.page-hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #ddd;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Genre Pills */
.genre-pills {
    display: flex;
    gap: 10px;
    padding: 20px 4%;
    flex-wrap: wrap;
    background: linear-gradient(to bottom, rgba(20, 20, 20, 0.9), transparent);
}

.genre-pill {
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    white-space: nowrap;
}

.genre-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #fff;
}

.genre-pill.active {
    background: #fff;
    color: #000;
    border-color: #fff;
    font-weight: 600;
}

/* New & Popular Tabs */
.new-popular-tabs {
    display: flex;
    gap: 0;
    padding: 0 4%;
    border-bottom: 1px solid #333;
}

.tab-btn {
    padding: 16px 24px;
    background: transparent;
    border: none;
    color: #808080;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: #fff;
}

.tab-btn.active {
    color: #fff;
    border-bottom-color: var(--netflix-red);
    font-weight: 600;
}

.tab-btn i {
    font-size: 18px;
}

/* Languages Grid */
.languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 30px 4%;
}

.language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.lang-flag {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.lang-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

/* Empty List State */
.empty-list-message {
    text-align: center;
    padding: 80px 20px;
    color: #808080;
}

.empty-list-message i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #555;
}

.empty-list-message h2 {
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 10px;
}

.empty-list-message p {
    font-size: 1rem;
}

/* Content Rows Container */
.content-rows {
    padding: 20px 0;
}

/* Grids for My List / Search */
.page-header-simple {
    padding: 40px 4% 20px;
}

.page-header-simple h1 {
    font-size: 2rem;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    padding: 20px 4%;
}

.grid-container .card {
    height: 120px;
    width: auto;
}

/* Original Header Styles */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 68px;
    padding: 0 4%;
    display: flex;
    align-items: center;
    background: var(--header-bg-gradient);
    z-index: 1000;
    transition: background-color 0.4s ease;
}

header.scrolled {
    background-color: rgb(20, 20, 20);
}

.logo {
    margin-right: 25px;
}

.logo img {
    height: 25px;
}

/* Primary Navigation */
.primary-nav ul {
    display: flex;
    list-style: none;
    gap: 18px;
    align-items: center;
}

.primary-nav ul li {
    position: relative;
}

.primary-nav ul li a {
    text-decoration: none;
    color: #e5e5e5;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.3s;
    white-space: nowrap;
}

.primary-nav ul li a:hover {
    color: #b3b3b3;
}

.primary-nav ul li.active a {
    color: #fff;
    font-weight: 700;
}

/* Secondary Navigation (Right side) */
.secondary-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-link {
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.search-link:hover {
    color: #b3b3b3;
}

.nav-text-link {
    text-decoration: none;
    color: #e5e5e5;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-text-link:hover {
    color: #b3b3b3;
}

.notification-bell {
    font-size: 20px;
    cursor: pointer;
    transition: color 0.3s;
}

.notification-bell:hover {
    color: #b3b3b3;
}

.profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

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

.profile-menu i {
    font-size: 10px;
    transition: transform 0.2s;
}

.profile-menu:hover i {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 50px;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px 20px;
    display: none;
    min-width: 180px;
    border-radius: 2px;
}

.profile-menu:hover .dropdown-menu {
    display: block;
}

.dropdown-menu span {
    cursor: pointer;
    display: block;
    padding: 8px 0;
    font-size: 13px;
}

.dropdown-menu span:hover {
    text-decoration: underline;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    /* Full viewport height specifically for the hero feel */
    min-height: 500px;
    /* Fallback */
    width: 100%;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(77deg, rgba(0, 0, 0, .6) 0, rgba(0, 0, 0, 0) 85%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14rem;
    background-image: linear-gradient(180deg, transparent, rgba(20, 20, 20, .61), #141414);
}

.hero-content {
    position: absolute;
    top: 35%;
    left: 60px;
    width: 40%;
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.title-logo h1 {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 0.9;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: 'Inter', sans-serif;
    /* Cleaner heavy font for title */
}

.metadata {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

.match-score {
    color: #46d369;
}

.badge {
    border: 1px solid rgba(255, 255, 255, .4);
    padding: 0 5px;
    font-size: 0.8rem;
    border-radius: 2px;
}

.maturity-rating {
    border: 1px solid gray;
    padding: 0 5px;
}

.description {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: #fff;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn i {
    font-size: 1.8rem;
}

.btn-play {
    background-color: var(--btn-play-bg);
    color: var(--btn-play-text);
}

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

.btn-info {
    background-color: var(--btn-info-bg);
    color: var(--btn-info-text);
}

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



/* Rows */
main {
    position: relative;
    margin-top: -10vh;
    /* Use margin to pull up and collapse space */
    padding-bottom: 50px;
    z-index: 20;
}

.row {
    margin-bottom: 3vw;
    padding-left: 60px;
    position: relative;
}

.row-header {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #e5e5e5;
    transition: color 0.2s;
}

.row-header:hover {
    color: #fff;
    cursor: pointer;
}

.row-container {
    position: relative;
}

.slider {
    display: flex;
    gap: 10px;
    overflow-x: scroll;
    padding: 20px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
}

.slider::-webkit-scrollbar {
    display: none;
    /* Safari and Chrome */
}

/* Handles */
.handle {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 3rem;
    z-index: 10;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
}

.row-container:hover .handle {
    opacity: 1;
}

.handle:hover {
    background: rgba(0, 0, 0, 0.7);
}

.left-handle {
    left: -60px;
    /* Align to the edge of the padding */
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.right-handle {
    right: 0;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

/* Cards */
.card {
    position: relative;
    min-width: 200px;
    height: 112px;
    /* 16:9 ratio approx */
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease, z-index 0.3s ease;
    cursor: pointer;
    z-index: 1;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card:hover {
    transform: scale(1.4);
    z-index: 100;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

/* Top 10 Styling */
.top-10-card {
    min-width: 250px;
    height: 140px;
    display: flex;
    align-items: center;
    overflow: visible;
}

.top-10-card .rank {
    font-size: 10rem;
    font-weight: 900;
    color: #000;
    -webkit-text-stroke: 4px #595959;
    position: relative;
    left: -15px;
    line-height: 1;
    z-index: 5;
    font-family: 'Inter', sans-serif;
    letter-spacing: -10px;
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.8);
}

.top-10-card img {
    height: 100%;
    width: 120px;
    /* Restrict width to make room for number */
    transform: translateX(-10px);
}

.top-10-card:hover {
    transform: scale(1.2);
}

/* Video Player Overlay Styles (Basic) */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

.video-container {
    width: 100%;
    height: 100%;
    position: relative;
    background: #000;
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 4rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.video-container:hover .video-controls {
    opacity: 1;
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.1s;
    width: 50px;
    /* Fixed width */
    height: 50px;
    /* Fixed height */
}

.icon-btn:hover {
    transform: scale(1.1);
}

.timeline-container {
    width: 100%;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.timeline-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    position: relative;
    border-radius: 2px;
    transition: height 0.1s;
}

.timeline-bar:hover {
    height: 8px;
}

.timeline-progress {
    height: 100%;
    background: #e50914;
    /* Netflix Red */
    width: 0%;
    position: relative;
    border-radius: 2px;
}

.timeline-progress::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%) scale(0);
    width: 16px;
    height: 16px;
    background: #e50914;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s ease;
}

.timeline-bar:hover .timeline-progress::after {
    transform: translateY(-50%) scale(1);
}

.timeline-bar:hover .timeline-progress::after {
    opacity: 1;
}

.back-btn {
    position: absolute;
    top: 40px;
    left: 40px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    z-index: 2001;
    opacity: 0;
    transition: opacity 0.3s;
}

.video-container:hover .back-btn {
    opacity: 1;
}

/* Footer - Multi-column Layout */
.main-footer {
    padding: 70px 0;
    max-width: 1000px;
    margin: 0 auto;
    width: 90%;
    color: #737373;
    font-size: 13px;
    position: relative;
    z-index: 20;
    background: transparent;
}

.footer-top {
    margin-bottom: 30px;
    font-size: 1rem;
    color: #737373;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #737373;
    text-decoration: none;
    font-size: 13px;
}

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

.copyright {
    font-size: 11px;
    margin-top: 20px;
    color: #737373;
}