/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #a855f7;
    --primary-dark: #7c3aed;
    --primary-light: #d8b4fe;
    --background: #0a0a0a;
    --background-secondary: #121212;
    --background-card: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #666666;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    --shadow-primary: 0 4px 30px rgba(168, 85, 247, 0.3);
    --gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-dark: linear-gradient(180deg, rgba(10, 10, 10, 0) 0%, rgba(10, 10, 10, 1) 100%);
    
    /* Responsive Spacing & Typography */
    --container-padding: clamp(1rem, 5vw, 3rem);
    --section-gap: clamp(2rem, 8vh, 4rem);
    --hero-title-size: clamp(2rem, 8vw, 4.5rem);
    --card-min-width: clamp(140px, 15vw, 280px);
}

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    zoom: 75%; /* ضبط الزووم كما طلبت */
    
    /* حماية التصميم */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    /* حماية الصور */
    pointer-events: none;
    -webkit-user-drag: none;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ===== Navbar ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    background: linear-gradient(to bottom, rgba(8,8,12,0.9) 0%, rgba(8,8,12,0.4) 70%, transparent 100%);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
.navbar.scrolled {
    background: rgba(8, 8, 12, 0.88);
    backdrop-filter: blur(22px) saturate(180%);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
}

.navbar-container {
    max-width: 1600px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--container-padding);
}

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

.nav-center {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

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

.logo {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.logo-plus {
    color: #a855f7;
    /* Vibrant Purple */
    font-size: 2.6rem;
    /* Slightly larger for prominence */
    font-weight: 900;
    line-height: 0.8;
    display: inline-block;
    margin-left: 2px;
}

/* Filter Buttons */
.type-filter-btn,
.genre-filter-btn {
    padding: 0.6rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 600;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-filter-btn:hover,
.genre-filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: #fff;
}

.type-filter-btn.active,
.genre-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Filters Container */
.filters-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 100;
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section:last-of-type {
    margin-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    color: #fff;
}

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

.filter-select {
    width: 100%;
    max-width: 300px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:hover {
    border-color: var(--primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

.apply-filters-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: none;
    transition: background 0.2s, border-color 0.2s;
}

.apply-filters-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    transform: none;
    box-shadow: none;
}

/* Horizontal Filters */
.horizontal-filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 100;
}

.filter-dropdown {
    position: relative;
    z-index: 100;
}

.filter-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    font-size: 1.15rem;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-dropdown-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.filter-dropdown-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.filter-label-text {
    font-weight: 600;
    color: var(--text-secondary);
}

.filter-selected {
    color: var(--text-primary);
}

.filter-dropdown-btn.active .filter-selected {
    color: #fff;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.filter-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    background: rgba(30, 30, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.5rem;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.filter-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-option {
    padding: 1rem 1.5rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.filter-option.active {
    background: var(--primary);
    color: #fff;
}

/* Search Results Dropdown */
.search-box {
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 350px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: 15px;
    padding: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1000;
    max-height: 450px;
    overflow-y: auto;
}

.search-results.active {
    display: flex;
}

.search-result-item {
    display: flex;
    gap: 12px;
    padding: 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(168, 85, 247, 0.1);
}

.search-result-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(168, 85, 247, 0.8);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 8px 10px 4px;
}

.search-result-poster {
    width: 50px;
    height: 75px;
    border-radius: 6px;
    object-fit: cover;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.search-result-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-meta {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Notification Bell */
.notification-btn {
    position: relative;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background: rgba(168, 85, 247, 0.1);
    color: var(--primary);
}

.notification-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid var(--background);
}

.notifications-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 320px;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.15), 0 10px 50px rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    animation: dropdownEntrance 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notifications-header {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    background: rgba(168, 85, 247, 0.05);
}

.notifications-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
}

.notifications-list {
    max-height: 400px;
    overflow-y: auto;
}

.notifications-dropdown.active {
    display: flex;
}

.notification-item {
    display: flex;
    gap: 15px;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(168, 85, 247, 0.1);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-icon-wrap {
    width: 42px;
    height: 42px;
    background: rgba(168, 85, 247, 0.15);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(168, 85, 247, 0.2);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.1);
}

.notification-icon-wrap svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.notification-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}

.notification-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.4;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 4px;
    font-weight: 600;
}

/* Autoplay Overlay */
.nova-autoplay-overlay {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(10, 10, 15, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(168, 85, 247, 0.4);
    border-radius: 25px;
    padding: 25px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(168, 85, 247, 0.2);
    animation: slideInRight 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 280px;
    transition: all 0.5s ease;
}

.nova-autoplay-overlay.fade-out {
    transform: translateX(120%);
    opacity: 0;
}

@keyframes slideInRight {
    from { transform: translateX(100%) opacity(0); }
    to { transform: translateX(0) opacity(1); }
}

.autoplay-content {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

.autoplay-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.autoplay-info {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
}

.autoplay-timer {
    position: relative;
    width: 70px;
    height: 70px;
}

.timer-svg {
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 8;
}

.timer-bar {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 282.7;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--primary);
}

.autoplay-btn {
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    background: var(--primary);
    color: #fff;
}

.autoplay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(168, 85, 247, 0.4);
}

/* Skip Intro Button */
.nova-skip-intro {
    position: absolute;
    bottom: 120px;
    left: 40px;
    background: rgba(10, 10, 15, 0.9);
    color: #fff;
    border: 1px solid rgba(168, 85, 247, 0.4);
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    z-index: 9999;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.nova-skip-intro:hover {
    background: var(--primary);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    transform: translateY(-2px);
}

/* Ratings Display */
.external-ratings {
    display: flex;
    gap: 15px;
    margin: 15px 0;
}

.rating-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-pill.imdb {
    border-color: #f5c518;
    color: #f5c518;
}

.rating-pill.rt {
    border-color: #fa320a;
    color: #fa320a;
}

.rating-pill svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Surprise Me Button (Updated: Soft & Professional) */
.surprise-me-btn {
    background: rgba(168, 85, 247, 0.08);
    color: var(--primary);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 8px 18px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.surprise-me-btn:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.3);
    border-color: var(--primary);
}

.surprise-me-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform 0.5s ease;
}

.surprise-me-btn:hover svg {
    transform: rotate(180deg);
}

/* Subtitle Settings Enhanced */
.nova-sub-settings-block {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.nova-sub-settings-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nova-sub-sync-row, .nova-sub-size-row, .nova-sub-color-row, .nova-sub-bg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 10px;
}

.nova-sub-row-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    min-width: 80px;
}

.nova-sync-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
}

.sync-btn {
    background: rgba(168, 85, 247, 0.2);
    border: none;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.sync-btn:hover {
    background: var(--primary);
}

#sub-sync-value {
    font-family: monospace;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
    text-align: center;
}

.nova-sub-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nova-sub-btn.active {
    background: var(--primary);
    border-color: var(--primary);
}

.nova-sub-color-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.nova-sub-color-dot.active {
    border-color: var(--primary);
    transform: scale(1.2);
}

/* Professional Subtitle Rendering */
.plyr__captions {
    padding: 0 !important;
    bottom: 80px !important;
    transition: all 0.3s ease !important;
}

.plyr__caption {
    font-family: 'Tajawal', sans-serif !important;
    line-height: 1.4 !important;
    padding: 0.3em 0.8em !important;
    border-radius: 4px !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.15rem;
    position: relative;
    letter-spacing: 0.3px;
    padding: 0.4rem 0.6rem;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.search-box {
    position: relative;
}

.search-input {
    background: var(--background-card);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    width: 280px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-menu {
    position: relative;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
    transition: all 0.3s ease;
    overflow: hidden;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.4);
}

.user-avatar img {
    border: 2px solid var(--primary);
    padding: 2px;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 220px;
    background: rgba(16, 16, 22, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    display: none;
    flex-direction: column;
    z-index: 1000;
    animation: dropdownEntrance 0.2s ease;
}

.user-dropdown.active {
    display: flex;
}

.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.75);
    transition: background 0.2s ease, color 0.2s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: right;
    font-family: inherit;
    font-weight: 500;
    text-decoration: none;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.dropdown-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    color: rgba(168, 85, 247, 0.7);
    flex-shrink: 0;
}

.dropdown-icon-svg svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.dropdown-item.logout-btn {
    color: rgba(255, 100, 100, 0.75);
}

.dropdown-item.logout-btn .dropdown-icon-svg {
    color: rgba(255, 100, 100, 0.7);
}

.dropdown-item.logout-btn:hover {
    background: rgba(255, 80, 80, 0.07);
    color: #ff6464;
}

.dropdown-divider {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin: 6px 8px;
}

@keyframes dropdownEntrance {
    from { opacity: 0; transform: translateY(15px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2100;
    margin-right: 15px;
}

.mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    z-index: 2050;
    padding: 80px 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    border-left: 1px solid rgba(168, 85, 247, 0.1);
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-nav-link {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--primary);
    transform: translateX(-10px);
}

.mobile-menu-divider {
    border: none;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    width: 220px;
    background: rgba(15, 15, 15, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.8rem;
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 2000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    animation: slideDown 0.3s ease forwards;
}

.profile-dropdown.active {
    display: flex;
}

.dropdown-item {
    padding: 0.8rem 1rem;
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:hover {
    background: rgba(168, 85, 247, 0.2);
    color: var(--primary);
}

.dropdown-item i {
    font-size: 1.1rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Hero Section ===== */
.hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    /* Cinematic wide aspect ratio */
    min-height: 500px;
    max-height: 85vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: #000;
    margin-top: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    opacity: 0.6;
    transition: opacity 1s ease-in-out, transform 1.5s ease-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.7) 0%, rgba(10, 10, 10, 0.3) 40%, transparent 100%),
        linear-gradient(to top, rgba(10, 10, 10, 1) 0%, transparent 25%);
}

.hero.changing .hero-bg {
    opacity: 0;
    transform: scale(1.05);
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 3rem;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
}

.hero.changing .hero-content {
    transform: translateY(20px);
    opacity: 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 1rem;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.8;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 40px rgba(168, 85, 247, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--primary);
}

/* ===== Section Styles ===== */
.section {
    padding: 3rem 2rem;
    width: 100%;
}

.section-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 0.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: right;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-control-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.carousel-control-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.view-all {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.view-all:hover {
    color: var(--primary);
}

/* ===== Movie Grid ===== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

/* ===== Carousel ===== */
.carousel-container {
    position: relative;
    width: 100%;
}

.carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE and Edge */
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.carousel.grabbing {
    cursor: grabbing;
}

.carousel img {
    pointer-events: none;
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
}

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

.carousel-item {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 220px;
}

/* ===== Skeleton Loading ===== */
@keyframes nova-shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}
.skeleton-card {
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}
.skeleton-card .skeleton-poster {
    aspect-ratio: 2/3;
    background: linear-gradient(90deg, #1c1c24 25%, #26262f 50%, #1c1c24 75%);
    background-size: 200% 100%;
    animation: nova-shimmer 1.6s ease infinite;
    border-radius: 8px;
}

/* ===== "New" Badge ===== */
.new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 5px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(34,197,94,0.45);
    pointer-events: none;
}

/* ===== Page Transitions ===== */
@keyframes nova-page-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
body { animation: nova-page-in 0.3s ease forwards; }
body.page-leaving { opacity: 0; transition: opacity 0.18s ease; }

/* ===== Responsive Breakpoints ===== */

/* Large Desktop */
@media (min-width: 1441px) {
    .navbar-container { max-width: 1600px; }
    .carousel-item { width: 320px; }
    .hero-title { font-size: 4.5rem; }
}

/* Desktop & Laptop */
@media (max-width: 1440px) {
    .carousel-item { width: 260px; }
    .hero-title { font-size: 3.5rem; }
}

/* iPad Landscape & Small Laptop */
@media (max-width: 1024px) {
    .navbar { padding: 0.8rem 1.5rem; }
    .nav-links { gap: 1.5rem; }
    .nav-link { font-size: 1rem; }
    .carousel-item { width: 220px; }
    .hero-title { font-size: 3rem; }
    .hero-description { max-width: 500px; font-size: 1rem; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* iPad Portrait & Large Tablets */
@media (max-width: 768px) {
    .navbar-container { padding: 0 1rem; }
    .nav-center { display: none; } /* Use mobile menu */
    .mobile-menu-btn { display: flex; }
    .nav-right { width: auto; }
    .search-input { width: 150px; }
    .search-input:focus { width: 200px; }
    
    .hero { aspect-ratio: 16/9; min-height: 400px; }
    .hero-content { padding: 2rem; }
    .hero-title { font-size: 2.5rem; }
    .hero-description { -webkit-line-clamp: 2; }
    
    .section { padding: 2rem 1rem; }
    .carousel-item { width: 160px; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; }
    
    .details-title { font-size: 2.5rem !important; }
    .details-content { padding: 2rem 1rem; margin-top: -10vh; }
}

/* Mobile Devices */
@media (max-width: 480px) {
    .logo { font-size: 1.8rem; }
    .logo-plus { font-size: 2.2rem; }
    .search-box { display: none; } /* Hide search in navbar on very small screens, use search page */
    
    .hero { aspect-ratio: 4/5; min-height: 450px; }
    .hero-title { font-size: 2rem; }
    .hero-buttons { flex-direction: column; }
    .btn { width: 100%; justify-content: center; }
    
    .carousel-item { width: 130px; }
    .movie-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.8rem; }
    
    .section-title { font-size: 1.2rem; }
}

/* ===== Movie Card ===== */
.movie-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    cursor: pointer;
    background: var(--background-card);
    user-select: none;
    -webkit-user-select: none;
    backface-visibility: hidden;
    will-change: transform;
}

.movie-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.movie-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

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

.movie-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.movie-rating {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 5;
}

.movie-info-overlay {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.movie-card:hover .movie-info-overlay {
    transform: translateY(0);
}

.movie-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: white;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.movie-year {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.fav-btn-mini {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.fav-btn-mini.active {
    color: var(--primary);
}

/* ===== Back Button (page-level) ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 1rem 1.5rem;
    padding: .5rem 1rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.back-btn:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.3); }
.back-btn svg { width: 18px; height: 18px; }

/* ===== Movie Details ===== */
.details-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-trailer-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-trailer-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max(100%, 124.44vh);
    height: max(100%, 56.25vw);
    border: none;
    pointer-events: none;
    opacity: 1;
}

.details-hero .hero-overlay {
    z-index: 2;
    background: linear-gradient(to right, rgba(10, 10, 10, 0.7) 0%, rgba(10, 10, 10, 0.3) 40%, transparent 100%),
                linear-gradient(to top, rgba(10, 10, 10, 0.5) 0%, transparent 10%);
}

/* ===== Trailer Play Button ===== */
.trailer-play-btn {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50px;
    padding: 1rem 1.8rem;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(6px);
    transition: background 0.25s, border-color 0.25s, transform 0.2s;
    flex-direction: row;
}

.trailer-play-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.06);
}

.trailer-play-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

/* ===== Custom Trailer Player ===== */
.nova-trailer-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
}
.nova-trailer-overlay.active {
    display: flex;
}
.nova-trailer-close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    z-index: 10;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.nova-trailer-close-btn:hover {
    background: rgba(255,255,255,0.22);
}
.nova-trailer-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
}
#nova-yt-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
#nova-yt-player iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 56.25vw;
    min-height: 100%;
    min-width: 177.78vh;
    border: none;
}
.nova-trailer-clickzone {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}
.nova-trailer-center-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    width: 72px;
    height: 72px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.nova-trailer-center-btn.visible { opacity: 1; }
.nova-trailer-center-btn svg { width: 36px; height: 36px; }
.nova-trailer-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, transparent 100%);
    padding: 60px 24px 20px;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}
.nova-trailer-wrap:hover .nova-trailer-controls,
.nova-trailer-controls.always-visible {
    opacity: 1;
    pointer-events: all;
}
.nova-trailer-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.25);
    border-radius: 2px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: height 0.15s;
}
.nova-trailer-progress-bar:hover { height: 6px; }
.nova-trailer-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 2px;
    width: 0%;
    pointer-events: none;
}
.nova-trailer-btns-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nova-trailer-btns-left,
.nova-trailer-btns-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nova-tctrl-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.nova-tctrl-btn:hover { background: rgba(255,255,255,0.15); }
.nova-tctrl-btn svg { width: 22px; height: 22px; display: block; }
.nova-trailer-time-display {
    color: rgba(255,255,255,0.8);
    font-size: 0.78rem;
    font-family: 'Courier New', monospace;
    padding: 0 4px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

/* ===== Episodes & Seasons ===== */
.season-select {
    background: #222;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.5rem;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
}

.season-select:focus {
    border-color: var(--primary);
}

.episodes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.episode-card {
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.episode-card:hover {
    transform: translateY(-5px);
    background: #222;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.episode-thumb {
    position: relative;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
}

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

.episode-number {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

.episode-play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.episode-card:hover .episode-play-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 2.5rem;
    color: #fff;
    transform: scale(0.7);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.episode-card:hover .play-icon {
    transform: scale(1);
}

.episode-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.episode-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
}

.episode-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.episode-overview {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .episode-card {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .episode-thumb {
        max-width: 100%;
    }
}

.details-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    opacity: 0.6;
    transition: opacity 0.8s ease;
}

.details-content {
    position: relative;
    z-index: 10;
    padding: 4rem 2rem 2rem;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    background: linear-gradient(to bottom, transparent, var(--background) 250px);
    margin-top: -15vh;
}

@media (min-width: 768px) {
    .details-content {
        grid-template-columns: 300px 1fr;
    }
}

.details-poster {
    width: 100%;
    max-width: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255,255,255,0.08);
    transform: translateY(-50px);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.details-poster:hover {
    transform: translateY(-58px) scale(1.02);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.95), 0 0 30px rgba(168, 85, 247, 0.15), 0 0 0 1px rgba(255,255,255,0.12);
}

.details-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.details-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.details-title {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 12px rgba(0,0,0,0.5));
}

@media (min-width: 768px) {
    .details-title {
        font-size: 4.5rem;
    }
}

.details-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
}

.meta-item:not(:last-child)::after {
    content: '·';
    position: absolute;
    left: -0.55rem;
    color: rgba(255,255,255,0.25);
    font-size: 1.2rem;
    line-height: 1;
}

.meta-badge {
    background: var(--primary);
    padding: 0.3rem 0.8rem;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(168, 85, 247, 0.4);
    letter-spacing: 0.3px;
}

.details-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.genre-tag {
    background: rgba(168, 85, 247, 0.1);
    border: 1px solid rgba(168, 85, 247, 0.3);
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    transition: all 0.25s ease;
}

.genre-tag:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
    transform: translateY(-1px);
}

.details-overview {
    font-size: 1.05rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.7);
    max-width: 800px;
}

.details-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
}

.stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

/* ===== Cast Section ===== */
.cast-section {
    padding: 3rem 2rem;
    width: 100%;
}

.cast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 2rem;
    }
}

.cast-card {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

    .cast-card:hover {
        transform: translateY(-8px);
    }

    .cast-photo {
        aspect-ratio: 1;
        border-radius: 50%;
        /* Circular photos for cast look better */
        overflow: hidden;
        background: #1a1a1a;
        border: 2px solid rgba(255, 255, 255, 0.05);
        transition: all 0.3s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    .cast-card:hover .cast-photo {
        border-color: var(--primary);
        box-shadow: 0 15px 30px rgba(168, 85, 247, 0.2);
    }

    .cast-photo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .cast-card:hover .cast-photo img {
        transform: scale(1.1);
    }

    .cast-name {
        font-size: 0.9rem;
        font-weight: 700;
        line-height: 1.3;
    }

    .cast-character {
        font-size: 0.8rem;
        color: var(--text-muted);
        font-style: italic;
    }

    /* ===== Search Page ===== */
    .search-page {
        padding: 8rem 2rem 4rem;
        width: 100%;
    }

    .search-header {
        margin-bottom: 3rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--border);
    }

    .search-query {
        font-size: 2.5rem;
        font-weight: 900;
        text-transform: uppercase;
    }

    .search-query span {
        color: var(--primary);
    }

    .no-results {
        text-align: center;
        padding: 4rem 2rem;
        background: var(--background-card);
        border-radius: 20px;
        border: 1px solid var(--border);
        grid-column: 1 / -1;
    }

    .no-results-icon {
        font-size: 4rem;
        margin-bottom: 1rem;
    }

    .no-results-text {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--text-secondary);
        margin-bottom: 0.5rem;
    }

    .no-results-sub {
        font-size: 1rem;
        color: var(--text-muted);
    }

    /* ===== Auth Pages ===== */
    .auth-page {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 2rem;
        background: linear-gradient(135deg, var(--background) 0%, var(--background-secondary) 100%);
    }

    .auth-container {
        width: 100%;
        max-width: 450px;
        background: var(--background-card);
        border-radius: 20px;
        padding: 3rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .auth-header {
        text-align: center;
        margin-bottom: 2rem;
    }

    .auth-title {
        font-size: 2rem;
        font-weight: 900;
        text-transform: uppercase;
        margin-bottom: 0.5rem;
    }

    .auth-subtitle {
        color: var(--text-secondary);
        font-size: 0.95rem;
    }

    .auth-form {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .form-group {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-label {
        font-size: 0.85rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-secondary);
    }

    .form-input {
        background: var(--background);
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 1rem;
        color: var(--text-primary);
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.1);
    }

    .auth-button {
        background: var(--gradient);
        color: white;
        padding: 1rem;
        border-radius: 10px;
        font-weight: 700;
        font-size: 1rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
    }

    .auth-button:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-primary);
    }

    .auth-footer {
        text-align: center;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border);
    }

    .auth-link {
        color: var(--primary);
        font-weight: 600;
    }

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

    /* ===== Profile Page - Clean Design ===== */
    .profile-page {
        padding: 7rem 2rem 4rem;
        width: 100%;
        min-height: 100vh;
        background: #000000;
    }

    /* Clean Header */
    .profile-header {
        display: flex;
        align-items: center;
        gap: 2rem;
        margin-bottom: 2rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid #222;
    }

    /* ===== Custom Nova Emojis & Icons ===== */
    .nova-icon-star {
        color: #ffc107;
        /* Golden Yellow */
        filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.5));
        margin-right: 4px;
        display: inline-flex;
        align-items: center;
    }

    .nova-emoji {
        display: inline-block;
        vertical-align: middle;
        width: 1.2em;
        height: 1.2em;
        object-fit: contain;
    }

    .rating-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: rgba(10, 10, 15, 0.8);
        padding: 5px 12px;
        border-radius: 30px;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        font-weight: 900;
        font-size: 0.8rem;
        color: #fff;
        border: 1px solid rgba(168, 85, 247, 0.4);
        width: fit-content;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 10px rgba(168, 85, 247, 0.2);
        z-index: 10;
        transition: all 0.3s ease;
    }

    .rating-badge.card-rating {
        position: absolute;
        top: 12px;
        left: 12px;
        right: auto;
        z-index: 20;
        pointer-events: none;
        background: linear-gradient(135deg, rgba(168, 85, 247, 0.9) 0%, rgba(10, 10, 15, 0.85) 100%);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Hide rating on mobile for continue watching */
    @media (max-width: 768px) {
        .rating-hide-mobile {
            display: none !important;
        }
        
        .resume-card {
            transform: scale(0.9);
            margin: -5% 0;
        }
        
        .resume-card .episode-badge-card {
            font-size: 0.7rem !important;
            padding: 2px 6px !important;
        }
    }

    .rating-badge svg {
        width: 13px;
        height: 13px;
        fill: #ffc107;
        filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.8));
    }

    .nova-icon {
        width: 1.1em;
        height: 1.1em;
        fill: currentColor;
        display: inline-block;
        vertical-align: middle;
        transition: transform 0.2s ease;
    }

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

    .meta-badge .nova-icon {
        width: 0.9em;
        height: 0.9em;
        margin-left: 4px;
    }

    .rating-badge svg {
        width: 15px;
        height: 15px;
        fill: #ffc107;
        filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.5));
    }

    .profile-avatar-large {
        width: 100px;
        height: 100px;
        border-radius: 50%;
        background: #1a1a1a;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        font-weight: 600;
        border: 2px solid #333;
        transition: all 0.3s ease;
    }

    .profile-avatar-large:hover {
        border-color: var(--primary);
    }

    .profile-info h1 {
        font-size: 2rem;
        font-weight: 600;
        color: #fff;
        margin-bottom: 0.3rem;
    }

    .profile-email {
        color: #666;
        font-size: 0.95rem;
    }

    /* Clean Tabs */
    .profile-tabs {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 2rem;
        border-bottom: 1px solid #222;
        padding-bottom: 0;
    }

    .profile-tab {
        padding: 1rem 2rem;
        background: transparent;
        border: none;
        border-bottom: 2px solid transparent;
        color: #666;
        font-weight: 600;
        font-size: 1.15rem;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-bottom: -1px;
    }

    .profile-tab:hover {
        color: #999;
    }

    .profile-tab.active {
        color: var(--primary);
        border-bottom-color: var(--primary);
    }

    /* Content Sections */
    .profile-content {
        display: none;
    }

    .profile-content.active {
        display: block;
    }

    .profile-content .section-header {
        margin-bottom: 1.5rem;
    }

    .profile-content .section-title {
        font-size: 1.3rem;
        font-weight: 600;
        color: #fff;
    }


    /* ===== Loading & Skeleton ===== */
    .skeleton {
        background: linear-gradient(90deg, var(--background-card) 25%, var(--background-secondary) 50%, var(--background-card) 75%);
        background-size: 200% 100%;
        animation: skeleton-loading 1.5s infinite;
    }

    @keyframes skeleton-loading {
        0% {
            background-position: 200% 0;
        }

        100% {
            background-position: -200% 0;
        }
    }

    .loading-spinner {
        width: 50px;
        height: 50px;
        border: 3px solid var(--border);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 2rem auto;
    }

    @keyframes spin {
        to {
            transform: rotate(360deg);
        }
    }

    /* ===== Toast Notification ===== */
    .toast {
        position: fixed;
        bottom: 2rem;
        left: 50%;
        transform: translateX(-50%) translateY(100px);
        background: var(--background-card);
        border: 1px solid var(--border);
        padding: 1rem 2rem;
        border-radius: 10px;
        box-shadow: var(--shadow);
        z-index: 2000;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .toast.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    .toast.success {
        border-color: #22c55e;
    }

    .toast.error {
        border-color: #ef4444;
    }

    /* إخفاء تصنيف الرومانسية من جميع القوائم والفلاتر */
[data-genre="10749"], .genre-10749 {
    display: none !important;
}
    footer {
        background: var(--background-secondary);
        border-top: 1px solid var(--border);
        padding: 3rem 2rem;
        text-align: center;
        margin-top: 4rem;
    }

    footer p {
        color: var(--text-muted);
        font-size: 0.9rem;
    }

    /* ===== PROFILES PAGE - WIDE CAROUSEL DESIGN ===== */
    .profiles-wrapper {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        background: #000000;
        padding: 2rem;
    }

    .profiles-container {
        width: 100%;
        max-width: 1400px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profiles-title {
        font-size: 3rem;
        font-weight: 600;
        margin-bottom: 4rem;
        color: #fff;
        text-align: center;
    }

    /* Carousel Layout */
    .profiles-carousel-wrapper {
        display: flex;
        align-items: center;
        gap: 1rem;
        width: 100%;
        max-width: 1200px;
        position: relative;
    }

    .profiles-carousel {
        flex: 1;
        overflow: hidden;
        cursor: grab;
        user-select: none;
    }

    .profiles-carousel:active {
        cursor: grabbing;
    }

    .profiles-carousel.dragging {
        cursor: grabbing;
    }

    .profiles-track {
        display: flex;
        gap: 2rem;
        padding: 2rem 1rem;
        transition: transform 0.3s ease-out;
    }

    /* Carousel Arrows */
    .carousel-arrow {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border: 1px solid #333;
        background: #111;
        color: #666;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
        z-index: 10;
    }

    .carousel-arrow:hover {
        border-color: var(--primary);
        color: var(--primary);
        background: rgba(168, 85, 247, 0.1);
    }

    /* Profile Items */
    .profile-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 150px;
        flex-shrink: 0;
    }

    .profile-item:hover {
        transform: scale(1.08);
    }

    .profile-avatar {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        overflow: hidden;
        position: relative;
        border: 3px solid #2a2a2a;
        background: #1a1a1a;
        transition: all 0.3s ease;
    }

    .profile-item:hover .profile-avatar {
        border-color: var(--primary);
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.4);
    }

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

    .profile-name {
        font-size: 1rem;
        font-weight: 500;
        color: #777;
        transition: all 0.3s ease;
        text-align: center;
    }

    .profile-item:hover .profile-name {
        color: #fff;
    }

    /* Add Profile Button */
    .add-profile-btn {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        border: 2px dashed #333;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 2.5rem;
        color: #444;
        background: #111;
        transition: all 0.3s ease;
    }

    .profile-item:hover .add-profile-btn {
        border-color: var(--primary);
        border-style: solid;
        color: var(--primary);
        background: rgba(168, 85, 247, 0.1);
    }

    /* Manage Profiles Button */
    .manage-profiles-btn {
        background: transparent;
        border: 1px solid #333;
        color: #666;
        padding: 0.75rem 2rem;
        font-size: 0.9rem;
        font-weight: 500;
        letter-spacing: 1px;
        cursor: pointer;
        transition: all 0.3s ease;
        border-radius: 6px;
        margin-top: 3rem;
    }

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

    /* Manage Mode Styles */
    .profile-item.manage-mode .profile-avatar {
        position: relative;
        cursor: default;
    }

    .profile-manage-overlay {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
        border-radius: 50%;
        z-index: 5;
    }

    .manage-icon {
        width: 35px;
        height: 35px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .manage-icon:hover {
        background: var(--primary);
        border-color: var(--primary);
        transform: scale(1.1);
    }

    .manage-icon.delete-icon:hover {
        background: #ef4444;
        border-color: #ef4444;
    }

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

    .manage-profiles-btn.active {
        background: #fff;
        color: #000;
        border-color: #fff;
    }


    /* ===== ADD PROFILE - FULL PAGE ===== */
    .add-profile-page {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 3000;
        background: #000;
        overflow: visible;
    }

    .add-profile-page.active {
        display: block;
    }

    .add-profile-container {
        min-height: 100vh;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 2rem;
        padding-bottom: 6rem;
        display: flex;
        flex-direction: column;
        align-items: center;
        overflow: visible;
    }

    .add-profile-back {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        background: transparent;
        border: none;
        color: #888;
        font-size: 1rem;
        cursor: pointer;
        padding: 0.5rem;
        margin-bottom: 2rem;
        width: fit-content;
        transition: all 0.2s ease;
    }

    .add-profile-back:hover {
        color: #fff;
    }

    .add-profile-back svg {
        width: 20px;
        height: 20px;
    }

    .add-profile-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 3rem;
        overflow: visible;
    }

    .add-profile-header {
        text-align: center;
        padding: 2rem 0;
    }

    .add-profile-title {
        font-size: 2.5rem;
        font-weight: 700;
        color: #fff;
        margin-bottom: 0.75rem;
    }

    .add-profile-subtitle {
        color: #666;
        font-size: 1.1rem;
    }

    .add-profile-form {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        width: 100%;
        align-items: center;
        overflow: visible;
    }

    .add-profile-section {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        align-items: center;
        overflow: visible;
    }

    .add-profile-label {
        color: #888;
        font-size: 0.9rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    /* Avatar Selection - Horizontal Row */
    .add-profile-avatars {
        display: flex;
        flex-wrap: nowrap;
        gap: 3rem;
        justify-content: flex-start;
        overflow-x: scroll;
        overflow-y: visible;
        padding: 2rem 0;
        margin: 0 auto;
        width: 640px;
        max-width: 90vw;
        scrollbar-width: none;
        -ms-overflow-style: none;
        cursor: grab;
        user-select: none;
        -webkit-user-select: none;
        -webkit-overflow-scrolling: touch;
    }

    .add-profile-avatars::-webkit-scrollbar {
        display: none;
    }

    .add-profile-avatars.grabbing {
        cursor: grabbing;
    }

    .add-profile-avatars img {
        pointer-events: none;
        user-select: none;
        -webkit-user-drag: none;
    }

    .add-profile-avatar-option {
        width: 280px;
        height: 280px;
        border-radius: 50%;
        cursor: pointer;
        border: 4px solid transparent;
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        background: #1a1a1a;
        position: relative;
        flex-shrink: 0;
        opacity: 0.5;
        filter: brightness(0.6) grayscale(0.4);
        transform: scale(0.9);
    }

    .add-profile-avatar-option:hover {
        transform: scale(1.15);
        filter: brightness(1.1) grayscale(0);
        opacity: 1;
        z-index: 10;
    }

    .add-profile-avatar-option img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
        border-radius: 50%;
    }

    .add-profile-avatar-option.selected {
        opacity: 1;
        filter: brightness(1) grayscale(0);
        transform: scale(1.05);
    }

    .add-profile-avatar-option.selected::after {
        content: '';
        position: absolute;
        inset: -10px;
        border: 4px solid var(--primary);
        border-radius: 50%;
        box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.3), 0 0 30px rgba(168, 85, 247, 0.4);
    }

    .add-profile-avatar-option.selected::before {
        content: '✓';
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 5rem;
        font-weight: bold;
        z-index: 1;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    }

    /* Name Input */
    .add-profile-input {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        background: #0a0a0a;
        border: 2px solid #222;
        border-radius: 16px;
        padding: 1.25rem 1.5rem;
        color: #fff;
        font-size: 1.2rem;
        text-align: center;
        transition: all 0.3s ease;
    }

    .add-profile-input:focus {
        outline: none;
        border-color: var(--primary);
        background: #111;
    }

    .add-profile-input::placeholder {
        color: #444;
    }

    /* Actions */
    .add-profile-actions {
        display: flex;
        gap: 1rem;
        justify-content: center;
        padding: 2rem 0 3rem;
    }

    .add-profile-btn-primary {
        padding: 1.1rem 3rem;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        border: none;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        color: #fff;
        min-width: 180px;
    }

    .add-profile-btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(168, 85, 247, 0.4);
    }

    .add-profile-btn-secondary {
        padding: 1.1rem 3rem;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        background: transparent;
        border: 2px solid #333;
        color: #888;
        min-width: 140px;
    }

    .add-profile-btn-secondary:hover {
        border-color: #555;
        color: #fff;
        background: #1a1a1a;
    }

/* ===== TV & Large Screen Optimizations (10-foot UI) ===== */
@media (min-width: 1921px) {
    :root {
        font-size: 20px;
        /* Scale everything up */
    }

    .navbar {
        padding: 1.5rem 4rem;
    }

    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 2.5rem;
    }

    .hero-content {
        padding: 6rem;
    }

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

    .hero-description {
        font-size: 1.5rem;
        max-width: 900px;
    }
}

@media (max-width: 1024px) {

    .nav-left,
    .nav-right {
        width: auto;
    }

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

@media (max-width: 768px) {
    .nav-center {
        display: none;
    }

    .navbar-container {
        padding: 0 1rem;
    }

    .nav-right {
        width: auto;
    }
}

/* ===== Mobile Specific Refinements ===== */
@media (max-width: 768px) {
    .nav-center {
        display: none;
        /* Links move to mobile menu */
    }

    .mobile-menu-btn {
        display: flex;
    }

    .search-input {
        width: 40px;
        padding-left: 0;
        cursor: pointer;
    }

    .search-input:focus {
        width: 180px;
        padding-left: 2.5rem;
    }

    .hero {
        aspect-ratio: 16 / 10;
        min-height: 400px;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-buttons {
        gap: 0.5rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }

    .carousel-item {
        width: 160px;
    }

    .section-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.8rem;
    }

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

    .hero-description {
        -webkit-line-clamp: 2;
    }

    .carousel-item {
        width: 140px;
    }

    .user-avatar {
        width: 38px;
        height: 38px;
    }
}

/* Progress Bar for Continue Watching */
.movie-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.movie-progress-fill {
    height: 100%;
    background: #a855f7;
    /* Purple */
    width: 0%;
    transition: width 0.3s ease;
}

.movie-card .movie-progress-container {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    overflow: hidden;
}

/* New Favorite Button on Cards */
.fav-btn-card {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 20;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.movie-card:hover .fav-btn-card {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* If active, we might want to keep it slightly visible or just show on hover as requested */
.fav-btn-card.active {
    opacity: 1;
    /* Keep visible if already favorited? The user said 'show on hover', but usually active ones stay visible. I will follow user request strictly. */
    visibility: visible;
}

.fav-btn-card:hover {
    background: rgba(168, 85, 247, 0.3);
    border-color: #a855f7;
    transform: scale(1.1);
}

.fav-btn-card.active {
    background: rgba(168, 85, 247, 0.4);
    border-color: #a855f7;
    color: #ef4444;
    /* Red heart */
}

/* Episode Badge on Cards */
.episode-badge-card {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(168, 85, 247, 0.95);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 800;
    z-index: 15;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Movie Progress Bar */
.movie-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 10;
}

.movie-progress-fill {
    height: 100%;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    transition: width 0.3s ease;
}


/*  Premium Progress Bar Glow  */
.movie-progress-container {
    background: rgba(255, 255, 255, 0.1) !important;
    height: 3px !important;
    border-radius: 0 0 12px 12px !important;
}

.movie-progress-fill {
    background: linear-gradient(90deg, #a855f7, #c084fc) !important;
    box-shadow: 0 0 12px rgba(168, 85, 247, 0.8) !important;
    border-radius: 0 0 0 12px !important;
}

/* Enhanced Progress Bar for Real Visibility */
.movie-progress-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 6px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    z-index: 20 !important;
    border-radius: 0 0 12px 12px !important;
    overflow: hidden !important;
    display: block !important;
}

.movie-progress-fill {
    height: 100% !important;
    background: linear-gradient(90deg, #a855f7, #c084fc) !important;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.9) !important;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1) !important;
    width: 0%;
}

/* Horizontal Filters (Browse Page) */
.horizontal-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(20, 20, 25, 0.6);
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    margin-bottom: 3rem;
    align-items: center;
    justify-content: center;
}

/* Nova+ Polish Section */
.form-input {
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    padding: 14px 16px;
    color: #fff;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.18);
    outline: none;
    background: rgba(255,255,255,0.05);
}

.btn-primary {
    background: var(--gradient);
    padding: 12px 22px;
    border-radius: 999px;
    transition: transform .15s, box-shadow .25s, background .3s;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.btn-primary:active {
    transform: translateY(0);
}

.movie-card {
    transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}

.movie-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 20px 40px rgba(168,85,247,.18);
}

.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 25%;
    right: 25%;
    height: 2px;
    border-radius: 2px;
    background: var(--primary);
    animation: slideInWidth 0.3s ease forwards;
}

@keyframes slideInWidth {
    from { left: 50%; right: 50%; }
    to { left: 25%; right: 25%; }
}

:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 3px;
    border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .movie-card:hover {
        transform: none;
    }
}

.filter-dropdown {
    position: relative;
}

.filter-dropdown-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
}

.filter-dropdown-btn:hover,
.filter-dropdown-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
}

.filter-label-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-selected {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
}

.dropdown-arrow {
    font-size: 0.6rem;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.filter-dropdown-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: rgba(15, 15, 20, 0.98);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1500;
    padding: 0.5rem;
    display: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    animation: filterSlide 0.3s ease forwards;
}

.filter-dropdown-menu.show {
    display: block;
}

.filter-option {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: right;
}

.filter-option:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.filter-option.active {
    background: var(--primary);
    color: #fff;
}

.apply-filters-btn {
    padding: 0.8rem 2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
}

@keyframes filterSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== COMPREHENSIVE MOBILE FIXES ===== */

/* --- Navbar Mobile --- */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 1rem;
    }

    .navbar-container {
        padding: 0;
        gap: 0.5rem;
    }

    .nav-left {
        width: auto;
        flex: 1;
    }

    .nav-right {
        width: auto;
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.6rem;
    }

    .logo-plus {
        font-size: 2rem;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}

/* --- Hero Mobile --- */
@media (max-width: 768px) {
    .hero {
        aspect-ratio: 9 / 13;
        min-height: 480px;
        max-height: 90vh;
        align-items: flex-end;
    }

    .hero-bg {
        object-position: center center;
    }

    .hero-overlay {
        background: linear-gradient(to top, rgba(10, 10, 10, 1) 0%, rgba(10, 10, 10, 0.5) 50%, rgba(10,10,10,0.1) 100%);
    }

    .hero-content {
        padding: 1.5rem 1rem 2rem;
        width: 100%;
    }

    .hero-title {
        font-size: 1.7rem;
        margin-bottom: 0.6rem;
    }

    .hero-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
        margin-bottom: 1rem;
        max-width: 100%;
    }

    .hero-buttons {
        gap: 0.5rem;
        flex-wrap: nowrap;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
}

@media (max-width: 480px) {
    .hero {
        aspect-ratio: unset;
        min-height: 65vh; /* Better responsive height */
    }

    .hero-content {
        padding: 1.5rem 1rem 3rem;
        align-items: center; /* Center on mobile */
        text-align: center;
    }

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

    .hero-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 3;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .hero-buttons .btn {
        flex: 1; /* Stretch buttons equally */
        padding: 0.8rem 0; /* Taller touch target */
    }
}

/* --- Sections & Grid Mobile --- */
@media (max-width: 768px) {
    .section {
        padding: 2rem 0.75rem;
    }

    .section-header {
        padding: 0 0.25rem;
        margin-bottom: 1rem;
    }

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

    .movie-grid {
        grid-template-columns: repeat(4, 1fr); /* 4 on tablet */
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 1.5rem 0.5rem;
    }

    .movie-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on small phones like Netflix */
        gap: 0.4rem; /* Tighter gap */
    }
}

/* --- Movie Card Mobile --- */
@media (max-width: 768px) {
    .movie-card {
        border-radius: 6px;
    }

    .movie-card:hover {
        transform: none;
        box-shadow: none;
    }

    .movie-card:active {
        transform: scale(0.97);
    }

    .movie-overlay {
        opacity: 1;
        background: transparent;
        padding: 0;
    }

    .movie-info-overlay {
        display: none;
    }

    .fav-btn-card {
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        top: 6px;
        right: 6px;
    }

    .rating-badge.card-rating {
        top: 6px;
        left: 6px;
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .movie-title {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }

    .movie-year {
        font-size: 0.65rem;
    }
}

/* --- Carousel Mobile --- */
@media (max-width: 768px) {
    .carousel {
        gap: 0.6rem;
        padding: 0.5rem 0;
    }

    .carousel-item {
        width: 120px;
    }

    .carousel-controls {
        display: none;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        width: 108px; /* Thinner for mobile to show more */
    }
}

/* --- Movie Details Mobile --- */
@media (max-width: 768px) {
    .details-hero {
        min-height: 50vh;
    }

    .details-content {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem 2rem;
        gap: 1.5rem;
        margin-top: 0;
    }

    .details-poster {
        max-width: 160px;
        margin: 0 auto;
        transform: none;
        border-radius: 10px;
    }

    .details-info {
        gap: 1rem;
    }

    .details-title {
        font-size: 2rem;
    }

    .details-meta {
        gap: 0.5rem;
    }

    .meta-item {
        font-size: 0.8rem;
    }

    .details-overview {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .details-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem 0;
    }

    .stat-value {
        font-size: 1rem;
    }

    .details-genres {
        gap: 0.4rem;
    }

    .genre-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .details-title {
        font-size: 1.6rem;
    }

    .details-content {
        padding: 1rem 0.75rem;
    }
}

/* --- Cast Section Mobile --- */
@media (max-width: 768px) {
    .cast-section {
        padding: 2rem 0.75rem;
    }

    .cast-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 1rem;
        margin-top: 1rem;
    }

    .cast-card:hover {
        transform: none;
    }

    .cast-card:active {
        transform: scale(0.95);
    }

    .cast-name {
        font-size: 0.75rem;
    }

    .cast-character {
        font-size: 0.7rem;
    }
}

/* --- Episodes Mobile --- */
@media (max-width: 768px) {
    .episodes-container {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }

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

    .episode-overview {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
}

/* --- Horizontal Filters Mobile --- */
@media (max-width: 768px) {
    .horizontal-filters {
        gap: 0.5rem;
        padding: 1rem;
        margin-bottom: 1.5rem;
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .horizontal-filters::-webkit-scrollbar {
        display: none;
    }

    .filter-dropdown-btn {
        min-width: unset;
        padding: 0.6rem 0.8rem;
        white-space: nowrap;
        font-size: 0.85rem;
    }

    .filter-label-text {
        font-size: 0.75rem;
    }

    .filter-selected {
        font-size: 0.85rem;
    }
}

/* --- Search Page Mobile --- */
@media (max-width: 768px) {
    .search-page {
        padding: 5rem 0.75rem 3rem;
    }

    .search-query {
        font-size: 1.5rem;
    }

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

/* --- Profile Tab Mobile --- */
@media (max-width: 768px) {
    .profile-tab {
        padding: 0.8rem 0.75rem;
        font-size: 0.85rem;
        flex: 1;
        text-align: center;
    }

    .profile-page {
        padding: 5rem 0.75rem 3rem;
    }

    .profile-header {
        gap: 1rem;
    }

    .profile-avatar-large {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .profile-info h1 {
        font-size: 1.4rem;
    }
}

/* --- Profiles Page Mobile --- */
@media (max-width: 768px) {
    .profiles-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .profile-item {
        width: 110px;
    }

    .profile-avatar {
        width: 85px;
        height: 85px;
    }

    .add-profile-btn {
        width: 85px;
        height: 85px;
        font-size: 2rem;
    }

    .carousel-arrow {
        display: none;
    }

    .add-profile-avatar-option {
        width: 140px;
        height: 140px;
    }

    .add-profile-avatars {
        width: 100%;
        max-width: 100vw;
        gap: 1.5rem;
    }

    .add-profile-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .profile-item {
        width: 90px;
    }

    .profile-avatar {
        width: 70px;
        height: 70px;
    }

    .add-profile-btn {
        width: 70px;
        height: 70px;
        font-size: 1.6rem;
    }

    .add-profile-avatar-option {
        width: 110px;
        height: 110px;
    }
    
    .add-profile-form {
        gap: 1.5rem;
    }
    
    .add-profile-actions {
        padding: 1rem 0 2rem;
    }
}

/* --- Auth Pages Mobile --- */
@media (max-width: 480px) {
    .auth-container {
        padding: 2rem 1.25rem;
        border-radius: 12px;
    }

    .auth-title {
        font-size: 1.6rem;
    }
}

/* --- General Mobile Fixes --- */
@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    .section,
    .cast-section,
    .search-page,
    .profile-page {
        overflow-x: hidden;
    }

    /* Better touch targets */
    .btn,
    .nav-link,
    .mobile-nav-link,
    .filter-btn,
    .profile-tab {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Toast position fix on mobile */
    .toast {
        bottom: 1rem;
        width: calc(100% - 2rem);
        left: 1rem;
        transform: translateX(0) translateY(100px);
    }

    .toast.show {
        transform: translateX(0) translateY(0);
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
        margin-top: 2rem;
    }
}