:root {
    --bg-color: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-elevated: #1c1c28;
    --nav-bg: rgba(10, 10, 15, 0.85);
    --text-color: #e8e8ed;
    --text-muted: #6b6b80;
    --text-dim: #45455a;
    --primary: #e50914;
    --primary-glow: rgba(229, 9, 20, 0.3);
    --accent: #ff4d5a;
    --accent-glow: rgba(229, 9, 20, 0.15);
    --gradient-primary: linear-gradient(135deg, #e50914, #ff4d5a);
    --gradient-hero: linear-gradient(180deg, transparent 0%, var(--bg-color) 100%);
    --border-subtle: rgba(255, 255, 255, 0.04);
    --border-hover: rgba(229, 9, 20, 0.3);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 8px 30px rgba(229, 9, 20, 0.15);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =================== NAVBAR =================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 4%;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    z-index: 1000;
    transition: background 0.4s ease, border-bottom 0.4s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(10, 10, 15, 0.95);
    border-bottom: 1px solid var(--border-subtle);
}

/* Netflix Footer */
.netflix-footer {
    background-color: var(--bg-color);
    padding: 60px 4% 30px 4%;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 40px;
}

.footer-container {
    max-width: 1000px;
    margin: 0 auto;
}

.footer-contact {
    margin-bottom: 25px;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

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

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 35px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 3px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--text-dim);
    font-size: 0.9rem;
    font-weight: 400;
    -webkit-text-fill-color: var(--text-dim);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.04);
}

.nav-links a.active {
    color: #fff;
    background: rgba(229, 9, 20, 0.12);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-bar {
    background: transparent;
    border-radius: 50px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.search-bar:hover,
.search-bar:focus-within {
    background: var(--bg-elevated);
    border-color: var(--border-subtle);
    padding: 8px 16px;
}

.search-bar span {
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}

.search-bar:hover span,
.search-bar:focus-within span {
    color: var(--text-color);
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    font-size: 0.85rem;
    outline: none;
    width: 0;
    padding: 0;
    transition: var(--transition);
    opacity: 0;
}

.search-bar:hover input,
.search-bar:focus-within input {
    width: 160px;
    opacity: 1;
}

.btn-login {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-avatar {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.nav-avatar-img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.nav-avatar-letter {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
}

/* =================== MAIN =================== */
main {
    margin-top: 65px;
    padding-bottom: 40px;
}

/* =================== HERO =================== */
.hero {
    height: 85vh;
    min-height: 550px;
    background-size: cover;
    background-position: center center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 0 4% 60px 4%;
    margin-top: -65px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(10, 10, 15, 0.7) 0%, rgba(10, 10, 15, 0.15) 45%, transparent 100%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    background: linear-gradient(to top, var(--bg-color) 0%, rgba(10, 10, 15, 0.5) 50%, transparent 100%);
}

.hero-content {
    max-width: 55%;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-description {
    font-size: 0.95rem;
    color: #9ca3af;
    line-height: 1.7;
    margin-bottom: 24px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

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

.btn {
    padding: 12px 28px;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px var(--primary-glow);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* =================== SLIDERS =================== */
.slider-section {
    padding: 10px 4% 25px 4%;
    position: relative;
    z-index: 3;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid;
    border-image: var(--gradient-primary) 1;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #f1f5f9;
}

.more-link {
    color: var(--text-muted);
    font-size: 0.82rem;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.more-link:hover {
    color: var(--primary);
}

.slider-container {
    position: relative;
    display: flex;
    align-items: center;
}

.slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 14px;
    padding: 10px 0;
    scrollbar-width: none;
}

.slider::-webkit-scrollbar {
    display: none;
}

.slide-item {
    flex: 0 0 calc(100% / 7.5);
    max-width: calc(100% / 7.5);
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.slide-item:hover {
    transform: translateY(-4px);
}

.poster-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2/3;
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--bg-card);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    border: 1px solid var(--border-subtle);
}

.poster-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.slide-item:hover .poster-wrapper img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

.slide-item:hover .poster-wrapper {
    box-shadow: var(--shadow-hover);
    border-color: var(--border-hover);
}

/* Play icon on hover */
.poster-wrapper::after {
    content: '▶';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    background: rgba(229, 9, 20, 0.3);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: inherit;
}

.slide-item:hover .poster-wrapper::after {
    opacity: 1;
}

.item-info {
    width: 100%;
}

.item-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: #d1d5db;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    align-items: center;
}

.badge {
    background: rgba(229, 9, 20, 0.12);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* =================== SLIDER HANDLES =================== */
.handle {
    position: absolute;
    top: 0;
    height: calc(100% - 35px);
    z-index: 5;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.2rem;
    cursor: pointer;
    width: 45px;
    opacity: 0;
    transition: opacity 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.left-handle {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.right-handle {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
    border-radius: var(--radius) 0 0 var(--radius);
}

.left-handle:hover {
    background: linear-gradient(to right, var(--bg-color), rgba(10, 10, 15, 0.3));
}

.right-handle:hover {
    background: linear-gradient(to left, var(--bg-color), rgba(10, 10, 15, 0.3));
}

/* =================== CATEGORY GRID =================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 0 4%;
}

/* =================== SEASON SELECTOR DROPDOWN =================== */
.season-selector select {
    background: var(--bg-elevated);
    color: var(--text-color);
    border: 1px solid var(--border-subtle);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.season-selector select:hover,
.season-selector select:focus {
    border-color: var(--border-hover);
    outline: none;
}

/* =================== FOOTER =================== */
footer {
    text-align: center;
    padding: 35px 4%;
    color: var(--text-dim);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-subtle);
    letter-spacing: 0.3px;
}

/* =================== EMPTY STATE =================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

/* =================== FULLSCREEN PLAYER =================== */
.fullscreen-player {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
}

.fullscreen-player video {
    flex: 1;
    width: 100%;
    height: 100%;
    outline: none;
    background: #000;
}

.player-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    opacity: 1;
    transition: opacity 0.4s;
}

.player-top-bar.hidden {
    opacity: 0;
    pointer-events: none;
}

.player-back {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.player-back:hover {
    opacity: 0.7;
}

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

.player-title {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
}

.player-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    z-index: 10001;
    transition: opacity 0.5s;
}

.player-spinner.fade-out {
    opacity: 0;
    pointer-events: none;
}

.spinner-ring {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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

/* =================== RESPONSIVE =================== */
@media (max-width: 1200px) {
    .slide-item {
        flex: 0 0 calc(100% / 5.5);
        max-width: calc(100% / 5.5);
    }
}

@media (max-width: 900px) {
    .slide-item {
        flex: 0 0 calc(100% / 4.5);
        max-width: calc(100% / 4.5);
    }

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

    .hero {
        height: 55vh;
    }
}

@media (max-width: 600px) {
    .slide-item {
        flex: 0 0 calc(100% / 3.2);
        max-width: calc(100% / 3.2);
    }

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

    .hero {
        height: 45vh;
        padding-bottom: 30px;
    }

    .nav-left {
        gap: 12px;
    }

    .search-bar {
        display: none;
    }

    .logo {
        font-size: 1.2rem;
    }

    .nav-links a {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}