:root {
    /* Luxury Gold & Dark Palette */
    --primary-gold: #db9e30;
    --primary-gold-hover: #b88526;
    --bg-dark: #0a0a0a;
    --bg-card: #161616;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --glass-bg: rgba(22, 22, 22, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --border-radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.logo {
    font-family: 'Playfair Display', serif;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.hidden {
    display: none !important;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Safari support */
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Buttons */
.btn-login {
    background: transparent;
    border: 1px solid var(--primary-gold);
    color: var(--primary-gold);
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: var(--primary-gold);
    color: #fff;
    box-shadow: 0 0 15px rgba(219, 158, 48, 0.4);
}

.icon-btn-large {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-btn-large:hover {
    background: var(--primary-gold);
    color: #000;
    box-shadow: 0 0 15px rgba(219, 158, 48, 0.4);
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, var(--primary-gold), #f1c40f);
    border: none;
    color: #fff;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 15px;
}

/* Navigation */
.navbar {
    height: var(--header-height);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    backdrop-filter: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: none;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    font-weight: 500;
    font-size: 0.95rem;
    color: #ddd;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-gold);
}

/* Slider Dots */
.slider-dots {
    display: flex;
    gap: 8px;
    z-index: 20;
}

.dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--primary-gold);
}

/* Dropdown */
.dropdown-toggle i {
    font-size: 0.7rem;
    margin-left: 5px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #1a1a1a;
    width: 400px;
    /* Wide dropdown */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.3s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    font-size: 0.85rem;
    color: #aaa;
    padding: 5px;
    display: block;
}

.dropdown-menu a:hover {
    color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    color: var(--primary-gold);
}

.logo-accent {
    color: var(--primary-gold);
}

.search-bar {
    position: relative;
    width: 300px;
}


.search-bar input {
    width: 100%;
    padding: 10px 45px 10px 20px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: #1f1f1f;
    color: #fff;
    outline: none;
    font-family: inherit;
}

.search-bar input:focus {
    border-color: var(--primary-gold);
}

.search-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1f1f1f;
    border-radius: 0 0 12px 12px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 999;
    margin-top: 5px;
    display: none;
    /* JS will toggle this */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    gap: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item img {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
}

.avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 2px solid var(--primary-gold);
}

/* Hero Slider */
.hero-slider {
    height: 90vh;
    /* Slightly taller to look good as full backdrop */
    position: relative;
    margin-top: 0;
    /* Remove offset so it sits behind header */
    background: #000;
    overflow: hidden;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    z-index: 1;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, #000 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%),
        linear-gradient(to top, #0a0a0a 0%, transparent 50%);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    margin-left: 5%;
    padding-right: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: linear-gradient(to right, #fff, #ccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.hero-meta span {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.hero-desc {
    font-size: 1rem;
    color: #ddd;
    margin-bottom: 30px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
    /* Standard property */
}

.hero-actions {
    display: flex;
    gap: 15px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-gold);
    color: #000;
    padding: 12px 30px;
    font-weight: 700;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(219, 158, 48, 0.3);
}

/* Slider Thumbnails */
.slider-thumbs {
    position: absolute;
    bottom: 50px;
    right: 50px;
    z-index: 20;
    display: flex;
    gap: 15px;
}

.slider-thumb {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    opacity: 0.6;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.slider-thumb:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.slider-thumb.active {
    opacity: 1;
    border-color: var(--primary-gold);
    transform: scale(1.1);
}

/* Redefine Nav Arrows */
.prev-btn,
.next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.prev-btn:hover,
.next-btn:hover {
    background: var(--primary-gold);
    color: #000;
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Movie Sections */
.movie-section {
    padding: 50px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-gold);
    padding-left: 15px;
}

.section-header h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-all {
    color: var(--primary-gold);
    font-size: 0.9rem;
}

.movie-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.movie-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.movie-card:hover {
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}

.movie-poster-wrapper {
    position: relative;
    padding-top: 150%;
    /* 2:3 aspect ratio */
    overflow: hidden;
}

.movie-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
}

.movie-card:hover .movie-overlay {
    opacity: 1;
}

.play-icon {
    font-size: 3rem;
    color: var(--primary-gold);
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
    color: #fff;
}

.movie-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #1a1a1a;
    margin: 5% auto;
    width: 80%;
    max-width: 1000px;
    border-radius: 12px;
    position: relative;
    animation: modalSlideIn 0.4s ease-out;
    padding: 0;
    overflow: hidden;
}

.login-content {
    max-width: 400px;
    padding: 40px;
    border: 1px solid var(--primary-gold);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal,
.close-login,
.close-player {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    z-index: 10;
}

.close-player {
    color: #fff;
    right: 0;
    top: -40px;
}

.close-modal:hover,
.close-modal:focus {
    color: white;
}

/* Movie Details Layout inside Modal */
.modal-hero {
    height: 400px;
    position: relative;
    background-size: cover;
    background-position: center;
}

.modal-poster-overlay {
    background: linear-gradient(to top, #1a1a1a 10%, transparent);
    width: 100%;
    height: 100%;
}

.modal-details {
    padding: 30px;
    margin-top: -100px;
    position: relative;
    z-index: 2;
    display: flex;
    gap: 30px;
}

.modal-poster-img {
    width: 200px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.modal-info {
    flex: 1;
}

.modal-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.modal-meta-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.is-series-badge {
    background: var(--primary-gold);
    color: #000;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: bold;
}

.modal-desc {
    color: #ccc;
    margin-bottom: 25px;
}

.episode-list {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 200px;
    overflow-y: auto;
}

.episode-btn {
    background: #333;
    border: none;
    color: #fff;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
    text-align: center;
}

.episode-btn:hover {
    background: var(--primary-gold);
    color: #000;
}

/* Player */
.player-content {
    background: transparent;
    width: 90%;
    margin: 5vh auto;
    height: 80vh;
}

.video-container {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Skeleton Loading */
.skeleton-loader {
    background: linear-gradient(90deg, #1f1f1f 25%, #2a2a2a 50%, #1f1f1f 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

.card-skeleton {
    height: 280px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group input {
    width: 100%;
    padding: 12px;
    background: #111;
    border: 1px solid #333;
    color: #fff;
    border-radius: 6px;
}

.form-group input:focus {
    border-color: var(--primary-gold);
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 10px;
        height: auto;
        padding: 10px;
    }

    .navbar {
        height: auto;
    }

    .hero-section {
        margin-top: 120px;
        height: 60vh;
    }

    .search-bar {
        width: 100%;
    }

    .modal-details {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}