/* DADA CONNECTION — redesigned dark streaming interface */
:root {
    --dc-red: #e50914;
    --dc-red-hover: #bd0710;
    --dc-bg: #0b0b0d;
    --dc-surface: #151518;
    --dc-surface-2: #1d1d21;
    --dc-border: #2b2b31;
    --dc-text: #f7f7f8;
    --dc-muted: #a4a4ad;
    --dc-container: 1320px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--dc-bg) !important;
    color: var(--dc-text);
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { display: block; max-width: 100%; }
.container { width: min(var(--dc-container), calc(100% - 48px)); margin-inline: auto; }

/* Header */
.main-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(10,10,12,.96);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(14px);
}
.navbar { min-height: 76px; display: flex; align-items: center; justify-content: space-between; }
.brand img { width: 176px; height: 58px; object-fit: contain; }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.search-button {
    width: 42px; height: 42px; display: grid; place-items: center;
    border: 1px solid var(--dc-border); border-radius: 50%;
    color: #fff; background: var(--dc-surface); font-size: 16px;
}
.search-button:hover { color: var(--dc-red); border-color: var(--dc-red); }

/* Featured hero */
.featured-hero {
    position: relative; min-height: 510px; display: flex; align-items: center;
    isolation: isolate; overflow: hidden;
    background-image: var(--hero-image);
    background-position: center 30%; background-size: cover; background-repeat: no-repeat;
}
.featured-shade {
    position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(90deg, #0b0b0d 0%, rgba(11,11,13,.91) 35%, rgba(11,11,13,.34) 100%),
                linear-gradient(0deg, #0b0b0d 0%, transparent 48%);
}
.featured-content { padding-block: 76px 90px; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    color: #ff555d; font-size: 10px; font-weight: 800;
    letter-spacing: 2px; text-transform: uppercase;
}
.featured-content h1 { max-width: 680px; margin: 15px 0; font-size: clamp(36px, 5.5vw, 66px); line-height: 1.05; font-weight: 800; }
.featured-content > p { max-width: 560px; color: #d0d0d4; font-size: 15px; }
.featured-meta { display: flex; flex-wrap: wrap; gap: 18px; margin: 22px 0; color: #d0d0d4; font-size: 12px; }
.featured-meta span + span::before { content: "•"; color: var(--dc-red); margin-right: 18px; }
.featured-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button { min-height: 44px; padding: 11px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 5px; font-size: 13px; font-weight: 750; transition: .2s; }
.button-red { color: #fff; background: var(--dc-red); }
.button-red:hover { background: var(--dc-red-hover); transform: translateY(-1px); }
.button-glass { color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.28); }
.button-glass:hover { background: #fff; color: #111; }
.welcome-banner { padding: 65px 0; background: radial-gradient(ellipse at 75% 20%, #421014 0%, #171014 42%, #0b0b0d 78%); }
.welcome-inner h1 { margin: 10px 0; font-size: clamp(32px, 5vw, 54px); }
.welcome-inner p { color: var(--dc-muted); }

/* Main content */
.page-content { padding-bottom: 50px; }
.content-section { padding-top: 48px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-heading h2 { margin: 5px 0 0; font-size: 25px; line-height: 1.2; }
.text-link { color: #d0d0d5; font-size: 12px; font-weight: 650; white-space: nowrap; }
.text-link i { margin-left: 5px; color: var(--dc-red); }
.text-link:hover { color: #fff; }

/* Categories */
.category-list { display: flex; flex-wrap: wrap; gap: 10px; }
.category-chip {
    min-height: 39px; padding: 8px 14px; display: inline-flex; align-items: center; gap: 9px;
    color: #d7d7dc; background: var(--dc-surface); border: 1px solid var(--dc-border);
    border-radius: 5px; font-size: 12px; font-weight: 600; transition: .2s;
}
.category-chip i { color: var(--dc-red); }
.category-chip:hover { color: #fff; border-color: var(--dc-red); background: #211518; }

/* Movie / series cards */
.movie-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 25px 17px; }
.movie-card { min-width: 0; overflow: hidden; }
.movie-poster {
    position: relative; display: block; overflow: hidden; aspect-ratio: 2 / 3;
    border-radius: 7px; background: var(--dc-surface-2); border: 1px solid rgba(255,255,255,.06);
}
.movie-poster img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.movie-card:hover .movie-poster img { transform: scale(1.045); }
.poster-play {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(0,0,0,.34); opacity: 0; transition: opacity .25s ease;
}
.poster-play i {
    width: 48px; height: 48px; display: grid; place-items: center; padding-left: 3px;
    border-radius: 50%; color: #fff; background: var(--dc-red); font-size: 15px;
}
.movie-card:hover .poster-play, .movie-poster:focus-visible .poster-play { opacity: 1; }
.movie-badge {
    position: absolute; top: 10px; left: 10px; padding: 5px 8px;
    border-radius: 3px; color: #fff; background: var(--dc-red);
    font-size: 9px; font-weight: 800; letter-spacing: .5px;
}
.movie-info { display: block !important; min-width: 0; padding: 10px 2px 2px; color: #fff !important; visibility: visible !important; opacity: 1 !important; }
.movie-title { display: block; margin: 0 0 5px; color: #fff !important; font-size: 13px; line-height: 1.4; font-weight: 700; }
.movie-title a { color: #fff !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.movie-title a:hover { color: #ff6269 !important; }
.movie-meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--dc-muted) !important; font-size: 10px; }
.movie-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 5px; margin-top: 9px; }
.movie-price { color: #fff; font-size: 11px; font-weight: 750; }
.movie-access { color: #ff686f; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.movie-access i { margin-right: 3px; }
.empty-state { padding: 48px 20px; text-align: center; background: var(--dc-surface); border: 1px dashed #38383e; border-radius: 8px; color: var(--dc-muted); }
.empty-state > i { color: var(--dc-red); font-size: 34px; }
.empty-state h3 { color: #fff; margin: 12px 0 5px; }
.empty-state p { margin: 0; font-size: 13px; }

/* Footer */
.main-footer { margin-top: 45px; background: #080809; border-top: 1px solid var(--dc-border); }
.footer-bottom { padding: 21px 15px; text-align: center; color: #888891; font-size: 12px; }

/* Existing detail-page compatibility */
.movie-details-layout { display: grid; grid-template-columns: 300px 1fr; gap: 40px; align-items: start; margin-top: 30px; }
.movie-details-poster img { width: 100%; border-radius: 9px; object-fit: cover; }
.movie-details-content h1 { color: #fff; font-size: 34px; margin: 12px 0; }
.movie-details-content h3 { margin: 24px 0 9px; }
.movie-details-content p { color: var(--dc-muted); line-height: 1.8; }
.movie-detail-categories { display: flex; flex-wrap: wrap; gap: 9px; margin: 18px 0; }
.movie-detail-categories span { padding: 6px 12px; border-radius: 20px; background: var(--dc-surface-2); font-size: 11px; }

/* Responsive */
@media (max-width: 1100px) {
    .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    .container { width: min(100% - 32px, var(--dc-container)); }
    .featured-hero { min-height: 450px; background-position: 60% center; }
    .featured-shade { background: linear-gradient(90deg, rgba(11,11,13,.96), rgba(11,11,13,.58)), linear-gradient(0deg, #0b0b0d, transparent 60%); }
    .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 13px; }
    .section-heading h2 { font-size: 22px; }
    .movie-title { font-size: 12px; }
    .movie-card-bottom { align-items: flex-start; flex-direction: column; }
    .movie-details-layout { grid-template-columns: 1fr; gap: 22px; }
    .movie-details-poster { max-width: 260px; }
}
@media (max-width: 520px) {
    .navbar { min-height: 65px; }
    .brand img { width: 145px; height: 52px; }
    .featured-hero { min-height: 420px; }
    .featured-content { padding-block: 55px 65px; }
    .featured-content h1 { font-size: 36px; }
    .featured-content > p { font-size: 13px; }
    .content-section { padding-top: 35px; }
    .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .section-heading { align-items: center; }
    .section-heading h2 { font-size: 20px; }
    .text-link { font-size: 11px; }
    .category-chip { min-height: 36px; padding: 7px 10px; font-size: 11px; }
    .movie-card-bottom { flex-direction: row; align-items: center; }
}

/* DADA CONNECTION - Simplified homepage */

body {
    background: #101010 !important;
    color: #ffffff;
}

.page-content {
    min-height: 75vh;
    padding-top: 28px;
}

.home-search {
    width: 100%;
    max-width: 650px;
    margin: 0 auto 35px;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #1c1c1c;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 0 16px;
    height: 48px;
}

.search-input-wrap i {
    color: #aaa;
}

.search-input-wrap input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
}

.search-input-wrap input::placeholder {
    color: #999;
}

.content-section {
    margin-bottom: 40px;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading h2 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 22px 16px;
}

.movie-card {
    min-width: 0;
}

.movie-info,
.movie-title,
.movie-title a {
    color: #fff !important;
}

.movie-title {
    font-size: 14px;
    margin-top: 8px;
}

.empty-state {
    color: #aaa;
    text-align: center;
    padding: 45px 15px;
}

@media (max-width: 1000px) {
    .movie-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .movie-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 18px 12px;
    }
}

@media (max-width: 480px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Movie card play button */
.movie-poster.preview-trigger {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    text-align: left;
    background: #191919;
}

/* Preview player modal */
.preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.94);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.preview-modal.active {
    display: flex;
}

.preview-container {
    width: 100%;
    max-width: 950px;
    background: #171717;
    border-radius: 10px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    color: #fff;
}

.preview-header h3 {
    font-size: 16px;
}

.preview-header button {
    background: transparent;
    color: #fff;
    border: 0;
    font-size: 22px;
    cursor: pointer;
}

.preview-video-area {
    position: relative;
    background: #000;
}

.preview-video-area video {
    display: block;
    width: 100%;
    max-height: 75vh;
    background: #000;
}

.payment-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.88);
    text-align: center;
}

.payment-overlay[hidden] {
    display: none;
}

.payment-message {
    max-width: 420px;
    color: #fff;
}

.payment-message > i {
    color: #e50914;
    font-size: 38px;
}

.payment-message h2 {
    margin: 15px 0 8px;
    font-size: 23px;
}

.payment-message p {
    color: #ccc;
}

.payment-price {
    font-size: 20px;
    font-weight: 700;
    color: #fff !important;
}

.payment-message button {
    margin-top: 15px;
    padding: 13px 25px;
    border: 0;
    border-radius: 5px;
    background: #e50914;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 600px) {
    .preview-modal {
        padding: 8px;
    }

    .preview-message h2 {
        font-size: 19px;
    }
}

/* ==========================================
   VIDEO PREVIEW MODAL
========================================== */

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.95);
}

.preview-modal.active {
    display: flex;
}

.preview-container {
    width: 100%;
    max-width: 1000px;
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    color: #fff;
    background: #181818;
}

.preview-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-preview {
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #292929;
    color: #fff;
    cursor: pointer;
    font-size: 18px;
}

.preview-video-area {
    position: relative;
    width: 100%;
    background: #000;
}

.preview-video-area video {
    display: block;
    width: 100%;
    max-height: 75vh;
    background: #000;
}

.payment-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.94);
}

.payment-overlay[hidden] {
    display: none !important;
}

.payment-message {
    max-width: 420px;
    text-align: center;
    color: #fff;
}

.payment-message > i {
    color: #e50914;
    font-size: 40px;
}

.payment-message h2 {
    margin: 18px 0 10px;
}

.payment-message p {
    color: #ccc;
}

.payment-price {
    margin: 20px 0;
    color: #fff;
    font-size: 26px;
    font-weight: bold;
}

.continue-watching-btn {
    padding: 13px 25px;
    border: none;
    border-radius: 5px;
    background: #e50914;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.continue-watching-btn:hover {
    background: #b80710;
}

.payment-note {
    font-size: 12px;
}

@media (max-width: 600px) {

    .preview-modal {
        padding: 8px;
    }

    .preview-header h3 {
        font-size: 15px;
    }

    .preview-video-area video {
        max-height: 65vh;
    }

}

/* Movie video cover */
.movie-poster img,
.movie-poster video.movie-cover-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.movie-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #888;
    font-size: 40px;
}

/* Center video inside movie cards */
.movie-poster {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    padding: 0;
    background: #181818;
}

.movie-poster video.movie-cover-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: translate(-50%, -50%);
}


/* ==========================================
   DARK / LIGHT THEME
   ========================================== */
:root {
    color-scheme: dark;
}
html[data-theme="light"] {
    color-scheme: light;
    --dc-bg: #f4f5f7;
    --dc-surface: #ffffff;
    --dc-surface-2: #e9ebef;
    --dc-border: #d8dce3;
    --dc-text: #17191d;
    --dc-muted: #666d78;
}
html[data-theme="light"] body {
    background: var(--dc-bg) !important;
    color: var(--dc-text);
}
html[data-theme="light"] .main-header {
    background: rgba(255,255,255,.96);
    border-bottom-color: rgba(0,0,0,.10);
}
html[data-theme="light"] .search-input-wrap {
    background: #fff;
    border-color: #d8dce3;
}
html[data-theme="light"] .search-input-wrap input {
    color: #17191d;
}
html[data-theme="light"] .search-input-wrap input::placeholder {
    color: #777e89;
}
html[data-theme="light"] .section-heading h2,
html[data-theme="light"] .movie-info,
html[data-theme="light"] .movie-title,
html[data-theme="light"] .movie-title a,
html[data-theme="light"] .movie-price {
    color: #17191d !important;
}
html[data-theme="light"] .movie-title a:hover {
    color: var(--dc-red) !important;
}
html[data-theme="light"] .movie-poster {
    background: #e3e6eb;
    border-color: rgba(0,0,0,.08);
}
html[data-theme="light"] .empty-state {
    background: #fff;
    border-color: #d8dce3;
    color: #666d78;
}
html[data-theme="light"] .empty-state h3 {
    color: #17191d;
}
html[data-theme="light"] .main-footer {
    background: #fff;
    border-top-color: #d8dce3;
}
html[data-theme="light"] .footer-bottom {
    color: #666d78;
}
.theme-toggle {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--dc-border);
    border-radius: 50%;
    color: var(--dc-text);
    background: var(--dc-surface);
    cursor: pointer;
    font-size: 16px;
    transition: .2s ease;
}
.theme-toggle:hover {
    border-color: var(--dc-red);
    color: var(--dc-red);
}
html[data-theme="light"] .theme-toggle {
    color: #252932;
    background: #fff;
    border-color: #d8dce3;
}
