/* ========================================
   FONT FACE
   ======================================== */

/* Poppins */
@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-500.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    src: url('/assets/fonts/poppins-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Bebas Neue */
@font-face {
    font-family: 'Bebas Neue';
    src: url('/assets/fonts/bebas-neue-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
    /* Colors */
    --primary-red: #e50914;
    --primary-red-hover: #c40812;
    --dark-bg: #141414;
    --card-bg: #181818;
    --text-primary: #ffffff;
    --text-secondary: #808080;
    --hover-bg: #2a2a2a;

    /* Motion */
    --transition-speed: 0.3s;

    /* Radius */
    --border-radius: 4px;

    /* Global layout - mobile first */
    --navbar-height: 60px;
    --hero-height: 70vh;
    --card-width: 150px;
    --cards-row-gap: 0.5rem;
    --cards-row-padding: 0.5rem 0;
    --page-side-padding: 1rem;
    --content-section-gap: 2rem;
    --grid-gap-x: 0.75rem;
    --grid-gap-y: 1rem;

    /* Focus */
    --focus-ring-color: rgba(255, 255, 255, 0.35);
    --focus-ring-width: 2px;
    --focus-ring-offset: 2px;
    --focus-ring-offset-lg: 3px;
    --focus-card-inset: -4px;
    --focus-card-radius-offset: 4px;
    --focus-z-hover: 30;
    --focus-z-active: 40;
    --focus-z-ring: 50;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none !important;
}

/* ========================================
   SKELETON LOADING
   ======================================== */
.skeleton {
    position: relative;
    overflow: hidden;
    background: #202020;
    background-image: linear-gradient(
        90deg,
        #202020 0%,
        #2b2b2b 40%,
        #353535 50%,
        #2b2b2b 60%,
        #202020 100%
    );
    background-size: 220% 100%;
    animation: skeletonShimmer 1.45s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 120% 0;
    }
    100% {
        background-position: -120% 0;
    }
}

.skeleton-line {
    display: block;
    width: 100%;
    height: 0.85rem;
    border-radius: 999px;
}

.skeleton-line.short {
    width: 42%;
}

.skeleton-line.medium {
    width: 68%;
}

.skeleton-card {
    flex: 0 0 var(--card-width);
    min-width: var(--card-width);
    border-radius: var(--border-radius);
    cursor: default;
    pointer-events: none;
}

.skeleton-thumbnail {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.movie-thumbnail.skeleton,
.skeleton-thumbnail {
    background-size: 220% 100%;
    background-position: 120% 0;
    background-repeat: repeat;
}

.skeleton-card .movie-info {
    padding: 0.7rem 0 0;
}

.skeleton-card .skeleton-line + .skeleton-line {
    margin-top: 0.45rem;
}

.skeleton-row {
    display: flex;
    gap: var(--cards-row-gap);
    padding: var(--cards-row-padding);
    overflow: hidden;
}

.cards-grid .skeleton-card {
    width: 100%;
    min-width: 0;
    flex: unset;
}

.skeleton-hero {
    position: absolute;
    left: var(--page-side-padding);
    right: var(--page-side-padding);
    bottom: 2rem;
    z-index: 2;
    display: none;
    max-width: 100%;
    pointer-events: none;
}

.hero.hero-pending .skeleton-hero {
    display: block;
}

.hero.hero-ready .skeleton-hero {
    display: none;
}

.skeleton-hero-logo {
    display: none;
}

.skeleton-hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.skeleton-hero-button {
    width: 6.5rem;
    height: 2.25rem;
    border-radius: var(--border-radius);
}

.skeleton-hero-button.secondary {
    width: 8.5rem;
}

.skeleton-hero-description {
    display: grid;
    gap: 0.65rem;
    width: min(100%, 620px);
    margin-bottom: 1.25rem;
}

.skeleton-hero-description .skeleton-line {
    height: 1rem;
}

.skeleton-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skeleton-hero-meta-item {
    width: 4.25rem;
    height: 1.6rem;
    border-radius: 3px;
}

/* ========================================
   GLOBAL FOCUS SYSTEM
   ======================================== */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

body.page-ready {
    visibility: visible;
    opacity: 1;
}

.hero-content,
.avatar,
#trending-row-container,
#popular-movies-row-container,
#popular-tv-row-container,
#recommendations-row-container,
#episodes-section,
#source-section {
    transition: opacity 0.2s ease;
}

/* ========================================
   NAVIGATION BAR
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 1000;
    transition: background-color var(--transition-speed) ease;
}

.navbar:hover {
    background-color: rgba(0, 0, 0, 0.95);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    height: 100%;
    padding: 0 var(--page-side-padding);
    max-width: 1920px;
    margin: 0 auto;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.logo {
    flex: 0 0 auto;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 1.5rem;
    color: var(--primary-red);
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.logo:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    min-width: 0;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    position: relative;
    transition: color var(--transition-speed);
    white-space: nowrap;
}

.nav-links a:not(.active) {
    display: none;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-secondary);
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 100%;
    height: 2px;
    background-color: var(--primary-red);
}

.navbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.profile {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    margin-left: 0.5rem;
}

.mobile-menu-container {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.mobile-menu-toggle {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: none;
    border-radius: var(--border-radius);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color var(--transition-speed), transform var(--transition-speed);
}

.mobile-menu-toggle:hover,
.mobile-menu-toggle[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.08);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

.mobile-menu-line {
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    transition: transform var(--transition-speed), opacity var(--transition-speed);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .mobile-menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-dropdown {
    position: absolute;
    top: calc(100% + 0.8rem);
    right: -0.35rem;
    width: min(245px, calc(100vw - (var(--page-side-padding) * 2)));
    padding: 0.45rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 2px solid var(--primary-red);
    border-radius: 6px;
    background:
        linear-gradient(180deg, rgba(24, 24, 24, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 8px 18px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.03) inset;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    z-index: 1100;
}

.mobile-menu-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 1rem;
    width: 12px;
    height: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(24, 24, 24, 0.98);
    transform: rotate(45deg);
}

.mobile-menu-dropdown a {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0.78rem 0.95rem 0.78rem 1rem;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    transition:
        background-color 0.2s ease,
        color var(--transition-speed),
        padding-left 0.2s ease;
}

.mobile-menu-dropdown a + a {
    margin-top: 0.15rem;
}

.mobile-menu-dropdown a::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 999px;
    background-color: var(--primary-red);
    transform: translateY(-50%);
    transition: height 0.2s ease;
}

.mobile-menu-dropdown a:hover,
.mobile-menu-dropdown a:focus-visible {
    padding-left: 1.2rem;
    background-color: rgba(255, 255, 255, 0.075);
    color: var(--text-primary);
}

.mobile-menu-dropdown a:hover::before,
.mobile-menu-dropdown a:focus-visible::before {
    height: 55%;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 36px;
    min-width: 36px;
    height: 36px;
    flex: 0 0 auto;
}

.search-icon {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.search-icon:hover {
    transform: translateY(-50%) scale(1.1);
}

.search-input {
    position: absolute;
    right: 0;
    width: 0;
    min-width: 0;
    max-width: calc(100vw - 7.5rem);
    padding: 0.5rem;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--text-primary);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    transition: width var(--transition-speed), opacity var(--transition-speed), padding var(--transition-speed);
}

.search-container:focus-within .search-input,
.search-input:focus {
    width: calc(100vw - 7.5rem);
    opacity: 1;
    pointer-events: all;
    padding-right: 3rem;
}

.search-input::-webkit-search-decoration,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-right: 0.2rem;
    cursor: pointer;
    opacity: 0.85;
    background:
        linear-gradient(45deg, transparent 43%, #ffffff 43%, #ffffff 57%, transparent 57%),
        linear-gradient(-45deg, transparent 43%, #ffffff 43%, #ffffff 57%, transparent 57%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.search-input::-webkit-search-cancel-button:hover {
    opacity: 1;
}

.search-input:focus {
    outline: none;
}

.search-input:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: 2px;
}

.search-suggestions {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: calc(100vw - 7.5rem);
    min-width: 0;
    max-width: calc(100vw - 7.5rem);
    max-height: 360px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(24, 24, 24, 0.98) 0%, rgba(16, 16, 16, 0.98) 100%);
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(255, 255, 255, 0.02) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1100;
    padding: 0.4rem;
}

.search-suggestions.hidden {
    display: none;
}

.search-suggestion-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.75rem;
    align-items: center;
    width: 100%;
    min-height: 60px;
    padding: 0.55rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
}

.search-suggestion-item:hover,
.search-suggestion-item:focus-visible,
.search-suggestion-item.is-active {
    background-color: rgba(255, 255, 255, 0.06);
}

.search-suggestion-poster {
    width: 44px;
    aspect-ratio: 2 / 3;
    border-radius: 4px;
    background-color: #222;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.search-suggestion-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.search-suggestion-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-suggestion-empty,
.search-suggestion-loading {
    padding: 0.85rem 0.9rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.search-suggestions::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions::-webkit-scrollbar-track {
    background: transparent;
}

.search-suggestions::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.14);
    border-radius: 999px;
}

.search-suggestions::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.22);
}

.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-red), #ff4757);
    border: none;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.avatar:hover {
    transform: scale(1.05);
}

/* ========================================
   HERO
   ======================================== */
.hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    height: var(--hero-height);
    margin-top: var(--navbar-height);
    padding: 0 var(--page-side-padding) 2rem;
    background: var(--dark-bg);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            rgba(0, 0, 0, 0.05) 0px,
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px,
            transparent 2px
        ),
        repeating-linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.05) 0px,
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px,
            transparent 2px
        );
    pointer-events: none;
}

.hero.hero-pending .hero-content {
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px);
}

.hero.hero-pending .hero-overlay,
.hero.hero-pending::before {
    opacity: 0;
}

.hero.hero-ready .hero-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.hero.hero-ready .hero-overlay,
.hero.hero-ready::before {
    opacity: 1;
    transition: opacity 0.35s ease;
}

.hero-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30%;
    background: linear-gradient(to top, var(--dark-bg), transparent);
    pointer-events: none;
}

.hero-content,
.hero-overlay,
.hero::before {
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, 320px);
    max-height: 110px;
    margin-bottom: 1rem;
    object-fit: contain;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.75));
}

.hero-logo.hidden {
    display: none;
}

.hero-logo,
.hero-title,
.hero-description,
.hero-meta,
.hero-buttons {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.hero-description {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.hero-meta span {
    padding: 0.2rem 0.6rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.match {
    color: #46d369;
    font-weight: 600;
}

/* ========================================
   BUTTONS
   ======================================== */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-disabled,
.btn[disabled] {
    background-color: rgba(109, 109, 110, 0.35);
    color: rgba(255, 255, 255, 0.45);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.75;
    transform: none !important;
}

.btn-disabled:hover,
.btn[disabled]:hover {
    background-color: rgba(109, 109, 110, 0.35);
    color: rgba(255, 255, 255, 0.45);
    transform: none !important;
}

.btn-play {
    background-color: var(--text-primary);
    color: #000;
    padding-left: 1.4rem;
    padding-right: 1.7rem;
}

.btn-play svg {
    margin-left: -0.1rem;
}

.btn-play:hover {
    background-color: rgba(255, 255, 255, 0.85);
    transform: scale(1.05);
}

.btn-login {
    background-color: var(--primary-red);
    color: #fff;
}

.btn-login:hover {
    background-color: var(--primary-red-hover);
    transform: scale(1.05);
}

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

.btn-info:hover {
    background-color: rgba(109, 109, 110, 0.5);
    transform: scale(1.05);
}

.btn-icon {
    width: 42px;
    min-width: 42px;
    height: 42px;
    flex: 0 0 42px;
    justify-content: center;
    padding: 0;
}

.btn-icon svg,
.btn svg {
    width: 18px;
    height: 18px;
}

.btn-favorite {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    max-height: 42px;
    aspect-ratio: 1 / 1;
    flex: 0 0 42px;
    padding: 0;
    gap: 0;
    line-height: 0;
    color: var(--text-primary);
}

.favorite-icon {
    display: block;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    overflow: visible;
}

.favorite-icon path {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    transition: stroke var(--transition-speed), fill var(--transition-speed);
}

.btn-favorite.is-active {
    color: var(--primary-red);
}

.btn-favorite.is-active .favorite-icon path {
    fill: var(--primary-red);
    stroke: var(--primary-red);
}

.btn-favorite:hover .favorite-icon path {
    stroke: currentColor;
}

/* ========================================
   CONTENT LAYOUT
   ======================================== */
.content {
    position: relative;
    z-index: 3;
    padding: 1.5rem var(--page-side-padding);
}

.movie-row {
    margin-bottom: var(--content-section-gap);
}

.row-title,
.source-title,
.episodes-title {
    margin: 0 0 1rem;
    padding-left: 0;
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 700;
}

.row-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.row-title-link:hover {
    color: var(--text-secondary);
}

/* ========================================
   ROWS
   ======================================== */
.row-wrapper,
.search-results-wrapper {
    position: relative;
    overflow: visible;
}

.row-container {
    display: flex;
    gap: var(--cards-row-gap);
    padding: var(--cards-row-padding);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) rgba(255, 255, 255, 0.03);
}

.row-container::-webkit-scrollbar {
    height: 8px;
}

.row-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

.row-container::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.row-container::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.load-more-btn {
    justify-content: center;
    min-width: 200px;
}

/* ========================================
   CARDS
   ======================================== */
.movie-card {
    position: relative;
    flex: 0 0 var(--card-width);
    min-width: var(--card-width);
    border-radius: var(--border-radius);
    overflow: visible;
    cursor: pointer;
    transition: transform var(--transition-speed) ease;
}

.movie-card:hover {
    z-index: var(--focus-z-hover);
    transform: scale(1.05);
}

.movie-card:focus-within {
    z-index: var(--focus-z-active);
    outline: none;
    transform: scale(1.05);
}

.movie-card,
.movie-thumbnail {
    -webkit-tap-highlight-color: transparent;
}

.movie-thumbnail:focus,
.movie-thumbnail:focus-visible {
    outline: none;
}

.movie-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: visible;
    border-radius: var(--border-radius);
    background-color: #222;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.movie-thumbnail::after {
    content: "";
    position: absolute;
    inset: var(--focus-card-inset);
    z-index: var(--focus-z-ring);
    border: var(--focus-ring-width) solid transparent;
    border-radius: calc(var(--border-radius) + var(--focus-card-radius-offset));
    pointer-events: none;
    transition: border-color var(--transition-speed);
}

.movie-card:focus-within .movie-thumbnail::after {
    border-color: var(--focus-ring-color);
}

.rank {
    position: absolute;
    left: 5px;
    bottom: 5px;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 3rem;
    line-height: 1;
    color: rgba(255, 255, 255, 0.22);
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
}

.progress-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-red);
    transition: width 0.5s ease;
}

.movie-info {
    padding: 0.7rem 0 0;
}

.movie-info h4 {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.movie-stats {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    align-items: center;
    min-width: 0;
}

.movie-stats span {
    min-width: 0;
}

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

.episode {
    color: var(--text-primary);
    font-weight: 500;
}

/* ========================================
   GRID / LISTING PAGES
   ======================================== */
.search-page-content {
    min-height: 100vh;
    padding: calc(var(--navbar-height) + 2rem) var(--page-side-padding) 1rem;
}

.search-results-section {
    margin-top: 0;
}

.search-results-header {
    margin-bottom: 1.25rem;
    padding-left: 0;
}

.search-results-header .row-title {
    margin-bottom: 0.35rem;
    padding-left: 0;
}

.search-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.search-empty {
    padding-left: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--grid-gap-y) var(--grid-gap-x);
    padding: var(--cards-row-padding);
}

.cards-grid .movie-card {
    width: 100%;
    min-width: 0;
    flex: unset;
}

.cards-grid .movie-thumbnail {
    width: 100%;
}

.cards-grid--search {
    align-items: start;
}

/* ========================================
   DETAILS PAGE
   ======================================== */
#recommendations-row-container:empty::after {
    content: "No recommendations found.";
    display: block;
    padding-left: 0;
    color: var(--text-secondary);
}

/* ========================================
   EPISODES
   ======================================== */
.episodes-section {
    padding: 1.5rem 0 2rem;
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.episodes-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.season-dropdown {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 200px;
}

.season-dropdown-native {
    display: none;
}

.season-dropdown-trigger {
    position: relative;
    width: 100%;
    min-height: 48px;
    padding: 0.8rem 2.8rem 0.8rem 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: #242424;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.season-dropdown-trigger:hover {
    background-color: #2c2c2c;
    border-color: rgba(255, 255, 255, 0.3);
}

.season-dropdown-trigger:focus-visible {
    outline: none;
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.season-dropdown-trigger-label {
    display: block;
    pointer-events: none;
}

.season-dropdown-trigger-arrow {
    position: absolute;
    top: 50%;
    right: 18px;
    width: 10px;
    height: 10px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.2s ease;
    pointer-events: none;
}

.season-dropdown.is-open .season-dropdown-trigger {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.season-dropdown.is-open .season-dropdown-trigger-arrow {
    transform: translateY(-35%) rotate(-135deg);
}

.season-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 40;
    width: 100%;
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: #242424;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.season-dropdown-option {
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.95rem;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition:
        background-color 0.2s ease,
        color 0.2s ease;
}

.season-dropdown-option:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.season-dropdown-option.is-selected {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.episodes-container {
    display: flex;
    flex-direction: column;
}

.episode-card {
    display: grid;
    grid-template-columns: 30px 96px 1fr 42px;
    gap: 0.6rem;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    transition:
        background-color 0.25s ease,
        transform 0.25s ease;
}

.episode-card:first-child {
    border-top: none;
}

.episode-card:hover {
    background-color: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.episode-card:focus-within {
    background-color: rgba(255, 255, 255, 0.06);
    transform: translateX(4px);
}

.episode-card:hover .episode-title,
.episode-card:focus-within .episode-title {
    color: #ffffff;
}

.episode-card:hover .episode-duration,
.episode-card:focus-within .episode-duration {
    color: var(--text-primary);
}

.episode-number {
    padding-top: 0;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1;
    color: rgba(255, 255, 255, 0.85);
}

.episode-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 4px;
    background-color: #222;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transition: filter 0.25s ease;
}

.episode-card:hover .episode-thumbnail,
.episode-card:focus-within .episode-thumbnail {
    filter: brightness(1.1);
}

.episode-content {
    min-width: 0;
}

.episode-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.episode-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.episode-description {
    font-size: 0.8rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.78);
}

.episode-duration {
    padding-top: 0;
    white-space: nowrap;
    text-align: right;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
}

/* ========================================
   SOURCE SELECTION
   ======================================== */
.source-section {
    padding: 1.25rem var(--page-side-padding) 1.5rem;
}

.source-header {
    margin-bottom: 0.85rem;
}

.source-section-alert {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    max-width: 100%;
    padding: 0.45rem 0.8rem;
    margin: 0.4rem 0 1rem;
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 6px;
    background-color: rgba(234, 179, 8, 0.1);
    color: var(--text-primary);
    font-size: 0.85rem;
    line-height: 1.2;
}

.source-section-alert__icon {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.source-section-alert__icon svg {
    width: 20px;
    height: 20px;
    color: #facc15;
    stroke-width: 2;
    opacity: 0.85;
}

.source-section-alert p {
    margin: 0;
}

.source-section-alert a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s ease;
}

.source-section-alert a:hover {
    color: var(--text-primary);
}

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

.source-btn {
    min-height: 48px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    background: #242424;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition:
        background-color var(--transition-speed),
        border-color var(--transition-speed),
        transform var(--transition-speed);
}

.source-btn:hover {
    background: #2f2f2f;
    transform: translateY(-1px);
}

.source-btn.active {
    border-color: var(--primary-red);
    background: var(--primary-red);
    color: #fff;
}

/* ========================================
   SOURCE CHANGE FEEDBACK
   ======================================== */
.source-btn.is-switching {
    transform: scale(0.96);
}

.source-section.source-feedback {
    animation: sourceSectionFlash 0.25s ease;
}

@keyframes sourceSectionFlash {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

.episodes-section.source-loading {
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
}

.btn-play.source-updated {
    animation: playButtonPulse 0.4s ease;
}

@keyframes playButtonPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.08);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: rgba(0, 0, 0, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0 1.5rem;
    color: var(--text-secondary);
}

.footer .container {
    width: min(100% - 1.5rem, 100%);
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.2rem;
    align-items: start;
}

.footer-brand .logo {
    display: inline-block;
    flex: 0 0 auto;
    margin: 0 0 1.2rem;
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 2rem;
    color: var(--primary-red);
    letter-spacing: 2px;
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.footer-brand .logo:hover {
    transform: scale(1.05);
}

.footer-description {
    max-width: 100%;
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.42;
}

.footer-title {
    position: relative;
    margin: 0 0 1.45rem;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 800;
}

.footer-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.5rem;
    width: 1.8rem;
    height: 0.16rem;
    border-radius: 999px;
    background: var(--primary-red);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-link {
    margin-bottom: 1rem;
}

.footer-link:last-child {
    margin-bottom: 0;
}

.footer-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-link a i {
    width: 0.9rem;
    font-size: 0.78rem;
    color: currentColor;
}

.footer-link a:hover {
    color: var(--text-primary);
    transform: translateX(3px);
}

.footer-divider {
    width: 100%;
    height: 1px;
    margin: 2.4rem 0 1.4rem;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.4;
    margin: 0;
}

.copyright a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.copyright a:hover {
    color: var(--primary-red-hover);
}

.footer-bottom-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.footer-bottom-link {
    color: var(--text-secondary);
    font-size: 0.86rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-bottom-link:hover {
    color: var(--text-primary);
}

/* ========================================
   OVERLAYS
   ======================================== */
.trailer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.trailer-overlay.hidden {
    display: none;
}

.trailer-content {
    position: relative;
    width: min(100%, 1000px);
    aspect-ratio: 16 / 9;
}

.trailer-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
    background: #000;
}

.trailer-close {
    position: absolute;
    top: -36px;
    right: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.trailer-close:hover {
    opacity: 0.8;
}

/* ========================================
   SCROLLBARS
   ======================================== */
/* Chrome / Edge / Safari */
html::-webkit-scrollbar {
    width: 8px;
}

html::-webkit-scrollbar-track {
    background: transparent;
}

html::-webkit-scrollbar-thumb {
    opacity: 0;
    border-radius: 999px;
    background-color: transparent;
    transition: background-color 0.25s ease, opacity 0.25s ease;
}

html.show-scrollbar::-webkit-scrollbar-thumb,
html:hover::-webkit-scrollbar-thumb {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.25);
}

/* Firefox */
html.show-scrollbar,
html:hover {
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

/* ========================================
   RESPONSIVE - TABLET (mobile first)
   ======================================== */
@media screen and (min-width: 768px) {
    :root {
        --card-width: 180px;
        --cards-row-gap: 0.75rem;
        --cards-row-padding: 0.75rem 0.25rem 0.25rem;
        --page-side-padding: 2rem;
        --content-section-gap: 2.5rem;
        --grid-gap-x: 1rem;
        --grid-gap-y: 1.25rem;
    }

    .navbar-container {
        gap: 1.25rem;
    }

    .navbar-left {
        gap: 1.25rem;
    }

    .logo {
        font-size: 1.75rem;
    }

    .search-container:focus-within .search-input,
    .search-input:focus,
    .search-suggestions {
        width: 320px;
        max-width: 320px;
    }

    .hero {
        padding-bottom: 3rem;
    }

    .skeleton-hero {
        bottom: 3rem;
        max-width: 560px;
    }

    .skeleton-hero-logo {
        width: min(82%, 420px);
        height: 5rem;
        margin-bottom: 1.25rem;
    }

    .skeleton-hero-buttons {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .skeleton-hero-button {
        height: 2.6rem;
    }

    .skeleton-hero-description {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .skeleton-hero-description .skeleton-line {
        height: 1rem;
    }

    .skeleton-hero-meta-item {
        width: 4.25rem;
        height: 1.9rem;
        border-radius: 3px;
    }

    .hero-content {
        max-width: 560px;
    }

    .hero-title {
        font-size: 2.6rem;
        margin-bottom: 1.25rem;
    }

    .hero-logo {
        max-width: min(100%, 420px);
        max-height: 140px;
        margin-bottom: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
        line-height: 1.65;
        margin-bottom: 1.25rem;
    }

    .hero-buttons {
        gap: 0.75rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        font-size: 1rem;
        padding: 0.7rem 1.75rem;
    }

    .btn-icon {
        width: 48px;
        min-width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .btn svg,
    .btn-icon svg {
        width: 20px;
        height: 20px;
    }

    .favorite-icon {
        width: 20px;
        height: 20px;
    }

    .btn-favorite {
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        height: 48px;
        max-height: 48px;
        flex-basis: 48px;
    }

    .hero-meta {
        gap: 0.75rem;
        font-size: 0.9rem;
    }

    .hero-meta span {
        padding: 0.25rem 0.7rem;
    }

    .load-more-wrap {
        margin-top: 1.5rem;
    }

    .load-more-btn {
        min-width: 220px;
    }

    .rank {
        left: 6px;
        bottom: 6px;
        font-size: 3.4rem;
    }

    .movie-info {
        padding-top: 0.75rem;
    }

    .skeleton-card .movie-info {
        padding-top: 0.75rem;
    }

    .movie-info h4 {
        font-size: 0.95rem;
    }

    .movie-stats {
        font-size: 0.8rem;
    }

    .row-title,
    .source-title,
    .episodes-title {
        font-size: 1.4rem;
        margin-bottom: 1.25rem;
    }

    .search-page-content {
        padding-top: calc(var(--navbar-height) + 2.25rem);
    }

    .search-results-header {
        margin-bottom: 1.5rem;
    }

    .search-subtitle,
    .search-empty {
        font-size: 0.95rem;
    }

    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #recommendations-row-container:empty::after {
        padding-left: 0.25rem;
    }

    .episodes-section {
        padding: 1.75rem 0 2.5rem;
    }

    .episodes-header {
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .season-dropdown {
        max-width: 220px;
    }

    .season-dropdown-trigger {
        min-height: 50px;
        padding: 0.85rem 2.9rem 0.85rem 1rem;
        font-size: 0.98rem;
    }

    .season-dropdown-option {
        min-height: 44px;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .episode-card {
        grid-template-columns: 36px 120px 1fr 48px;
        gap: 0.75rem;
    }

    .episode-number {
        font-size: 1.5rem;
    }

    .episode-title {
        font-size: 1rem;
    }

    .episode-description {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .episode-duration {
        font-size: 0.9rem;
    }

    .source-section {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .source-header {
        margin-bottom: 1rem;
    }

    .source-buttons {
        gap: 1rem;
    }

    .source-btn {
        min-height: 50px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .footer {
        padding: 3.4rem 0 1.6rem;
    }

    .footer .container {
        width: min(100% - 2rem, 760px);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.6rem 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-description {
        max-width: 560px;
    }

    .footer-bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .footer-bottom-links {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 1.4rem;
    }

    .trailer-overlay {
        padding: 1.5rem;
    }

    .trailer-close {
        top: -40px;
        font-size: 1.9rem;
    }
}

/* ========================================
   RESPONSIVE - LAPTOP / DESKTOP
   ======================================== */
@media screen and (min-width: 1024px) {
    :root {
        --navbar-height: 70px;
        --hero-height: 90vh;
        --card-width: 190px;
        --cards-row-gap: 1rem;
        --cards-row-padding: 0.9rem 0.5rem 0.5rem;
        --page-side-padding: 4%;
        --content-section-gap: 3rem;
        --grid-gap-x: 1rem;
        --grid-gap-y: 1.5rem;
    }

    .navbar-left {
        gap: 2rem;
    }

    .logo {
        font-size: 2rem;
    }

    .nav-links {
        display: flex;
        gap: 1.5rem;
    }

    .nav-links a:not(.active) {
        display: inline;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

    .mobile-menu-container {
        display: none;
    }

    .profile {
        margin-left: 0;
    }

    .navbar-right {
        gap: 1.5rem;
    }

    .search-container {
        width: 320px;
        min-width: 44px;
    }

    .search-icon {
        right: 0.75rem;
        width: auto;
        height: auto;
    }

    .search-container:focus-within .search-input,
    .search-input:focus {
        width: 320px;
    }

    .search-suggestions {
        width: 320px;
    }

    .hero {
        padding: 0 var(--page-side-padding) 4rem;
    }

    .skeleton-hero {
        bottom: 4rem;
        max-width: 680px;
    }

    .skeleton-hero-logo {
        width: min(82%, 520px);
        height: 6.25rem;
        margin-bottom: 1.5rem;
    }

    .skeleton-hero-buttons {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .skeleton-hero-button {
        height: 3.2rem;
    }

    .skeleton-hero-description {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .skeleton-hero-description .skeleton-line {
        height: 1.25rem;
    }

    .skeleton-hero-meta {
        gap: 1rem;
    }

    .skeleton-hero-meta-item {
        width: 4.25rem;
        height: 2rem;
        border-radius: 3px;
    }

    .hero-content {
        max-width: 680px;
    }

    .hero-title {
        margin-bottom: 1.5rem;
        font-size: 4rem;
    }

    .hero-logo {
        max-width: min(100%, 520px);
        max-height: 180px;
        margin-bottom: 1.5rem;
    }

    .hero-description {
        margin-bottom: 1.5rem;
        font-size: 1.1rem;
        line-height: 1.8;
    }

    .hero-buttons {
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .btn {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

    .btn-play {
        padding-left: 1.8rem;
        padding-right: 2.1rem;
    }

    .btn-icon {
        width: 56px;
        min-width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .btn svg,
    .btn-icon svg {
        width: 24px;
        height: 24px;
    }

    .favorite-icon {
        width: 24px;
        height: 24px;
    }

    .btn-favorite {
        width: 56px;
        min-width: 56px;
        max-width: 56px;
        height: 56px;
        max-height: 56px;
        flex-basis: 56px;
    }

    .hero-meta {
        gap: 1rem;
        font-size: 0.95rem;
    }

    .hero-meta span {
        padding: 0.3rem 0.8rem;
    }

    .load-more-wrap {
        margin-top: 1.5rem;
    }

    .load-more-btn {
        min-width: 220px;
    }

    .rank {
        left: 8px;
        bottom: 8px;
        font-size: 4rem;
    }

    .movie-info {
        padding: 0.8rem 0;
    }

    .skeleton-card .movie-info {
        padding: 0.8rem 0;
    }

    .movie-info h4 {
        margin-bottom: 0.3rem;
        font-size: 1rem;
    }

    .movie-stats {
        font-size: 0.85rem;
        gap: 0.75rem;
    }

    .row-title,
    .source-title,
    .episodes-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .search-page-content {
        padding-top: calc(var(--navbar-height) + 2.5rem);
    }

    .search-results-header {
        margin-bottom: 1.5rem;
        padding-left: 0.5rem;
    }

    .search-results-header .row-title {
        margin-bottom: 0.4rem;
    }

    .search-subtitle,
    .search-empty {
        font-size: 1rem;
    }

    .search-empty {
        padding-left: 0.5rem;
    }

    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(var(--card-width), 1fr));
    }

    #recommendations-row-container:empty::after {
        padding-left: 0.5rem;
    }

    .episodes-section {
        padding: 2rem 0 3rem;
    }

    .episodes-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .season-dropdown {
        max-width: 200px;
    }

    .season-dropdown-trigger {
        min-height: 52px;
        padding: 0.9rem 3rem 0.9rem 1rem;
        font-size: 1rem;
    }

    .season-dropdown-option {
        min-height: 44px;
        padding: 0.7rem 1rem;
        font-size: 0.95rem;
    }

    .episode-card {
        grid-template-columns: 70px 200px 1fr 70px;
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .episode-number {
        font-size: 2.2rem;
    }

    .episode-top {
        gap: 1rem;
        margin-bottom: 0.4rem;
    }

    .episode-title {
        font-size: 1.1rem;
    }

    .episode-description {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .episode-duration {
        font-size: 1rem;
    }

    .source-section {
        padding: 1.5rem var(--page-side-padding) 2rem;
    }

    .source-header {
        margin-bottom: 1rem;
    }

    .source-buttons {
        gap: 1rem;
    }

    .source-btn {
        min-height: 52px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .footer {
        padding: 3.8rem 0 1.8rem;
    }

    .footer .container {
        width: min(100% - 2rem, 1150px);
    }

    .footer-grid {
        grid-template-columns: 1fr auto auto;
        gap: 6rem;
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-brand .logo {
        font-size: 2.5rem;
    }

    .footer-description {
        max-width: 420px;
        font-size: 0.92rem;
    }

    .footer-title {
        font-size: 1.08rem;
    }

    .footer-link a {
        font-size: 0.92rem;
    }

    .footer-divider {
        margin: 3rem 0 1.6rem;
    }

    .copyright,
    .footer-bottom-link {
        font-size: 0.88rem;
    }

    .trailer-overlay {
        padding: 2rem;
    }

    .trailer-close {
        top: -42px;
        font-size: 2rem;
    }
}

/* ========================================
   RESPONSIVE - LARGE DESKTOP / TV
   ======================================== */
@media screen and (min-width: 1440px) {
    :root {
        --card-width: 220px;
        --page-side-padding: 4%;
        --cards-row-gap: 1.25rem;
        --content-section-gap: 3.5rem;
        --grid-gap-x: 1.25rem;
        --grid-gap-y: 1.75rem;
    }

    .navbar-container {
        max-width: 1920px;
    }

    .nav-links {
        gap: 1.75rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .search-container {
        width: 360px;
    }

    .search-container:focus-within .search-input,
    .search-input:focus,
    .search-suggestions {
        width: 360px;
        max-width: 360px;
    }

    .hero {
        padding-bottom: 5rem;
    }

    .skeleton-hero {
        bottom: 5rem;
        max-width: 760px;
    }

    .skeleton-hero-buttons {
        gap: 1rem;
        margin-bottom: 2.25rem;
    }

    .skeleton-hero-button {
        width: 9rem;
        height: 3rem;
    }

    .skeleton-hero-button.secondary {
        width: 12rem;
    }

    .skeleton-hero-description {
        gap: 0.75rem;
        margin-bottom: 2rem;
    }

    .skeleton-hero-description .skeleton-line {
        height: 1.4rem;
    }

    .skeleton-hero-meta {
        gap: 1rem;
    }

    .skeleton-hero-meta-item {
        width: 5.5rem;
        height: 2rem;
        border-radius: 3px;
    }

    .hero-content {
        max-width: 760px;
    }

    .hero-title {
        font-size: 4.5rem;
    }

    .hero-logo {
        max-width: min(100%, 580px);
        max-height: 210px;
    }

    .hero-description {
        font-size: 1.2rem;
        max-width: 720px;
    }

    .btn {
        font-size: 1.15rem;
    }

    .hero-meta {
        font-size: 1rem;
    }

    .rank {
        font-size: 4.5rem;
    }

    .movie-info h4 {
        font-size: 1.05rem;
    }

    .movie-stats {
        font-size: 0.9rem;
    }

    .row-title,
    .source-title,
    .episodes-title {
        font-size: 2.2rem;
    }

    .search-page-content {
        padding-top: calc(var(--navbar-height) + 2.75rem);
    }

    .search-subtitle,
    .search-empty {
        font-size: 1.05rem;
    }

    .season-dropdown {
        max-width: 220px;
    }

    .season-dropdown-trigger {
        font-size: 1.02rem;
    }

    .season-dropdown-option {
        font-size: 0.98rem;
    }

    .episode-card {
        grid-template-columns: 76px 220px 1fr 76px;
        gap: 1.25rem;
    }

    .episode-number {
        font-size: 2.4rem;
    }

    .episode-title {
        font-size: 1.15rem;
    }

    .episode-description {
        font-size: 1rem;
    }

    .episode-duration {
        font-size: 1.02rem;
    }

    .source-btn {
        min-height: 48px;
        font-size: 1rem;
    }

    .footer .container {
        width: min(100% - 2rem, 1150px);
    }

    .footer-grid {
        gap: 6rem;
    }

    .trailer-content {
        width: min(100%, 1120px);
    }
}

/* ========================================
   RESPONSIVE - EXTRA SMALL MOBILE
   ======================================== */
@media screen and (max-width: 379px) {
    :root {
        --card-width: 130px;
        --grid-gap-x: 0.6rem;
        --grid-gap-y: 0.9rem;
        --page-side-padding: 0.75rem;
    }

    .search-suggestions {
        width: min(260px, calc(100vw - (var(--page-side-padding) * 2)));
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-logo {
        max-width: min(100%, 260px);
        max-height: 90px;
    }

    .skeleton-hero-logo {
        width: min(82%, 260px);
        height: 3.25rem;
    }

    .skeleton-hero-button {
        width: 6.75rem;
        height: 2.3rem;
    }

    .skeleton-hero-button.secondary {
        width: 8rem;
    }

    .hero-description {
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .btn svg,
    .btn-icon svg {
        width: 18px;
        height: 18px;
    }

    .btn-icon {
        width: 42px;
        min-width: 42px;
        height: 42px;
        flex-basis: 42px;
    }

    .favorite-icon {
        width: 18px;
        height: 18px;
    }

    .btn-favorite {
        width: 42px;
        min-width: 42px;
        max-width: 42px;
        height: 42px;
        max-height: 42px;
        flex-basis: 42px;
    }

    .hero-meta span {
        padding: 0.2rem 0.6rem;
        font-size: 0.75rem;
    }

    .season-dropdown {
        max-width: 180px;
    }

    .season-dropdown-trigger {
        min-height: 44px;
        padding: 0.72rem 2.6rem 0.72rem 0.9rem;
        font-size: 0.9rem;
    }

    .season-dropdown-trigger-arrow {
        right: 16px;
        width: 9px;
        height: 9px;
    }

    .season-dropdown-option {
        min-height: 40px;
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }

    .footer {
        padding: 2.5rem 0 1.3rem;
    }

    .footer .container {
        width: min(100% - 1.2rem, 100%);
    }

    .footer-grid {
        gap: 2rem;
    }

    .footer-brand .logo {
        font-size: 1.5rem;
    }

    .footer-description,
    .footer-link a,
    .copyright,
    .footer-bottom-link {
        font-size: 0.84rem;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .skeleton {
        animation: none !important;
        background-position: 0 0;
    }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    .navbar,
    .hero-buttons,
    .footer {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .hero {
        page-break-after: always;
    }
}

/* ========================================
   HIGH CONTRAST
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --primary-red: #ff0000;
        --text-secondary: #cccccc;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* ========================================
   COLOR SCHEME
   ======================================== */
@media (prefers-color-scheme: light) {
    /* Keep dark theme even in light mode preference */
    /* Netflix is always dark! */
}
