/* =====================================================================
   Dramaku premium layer — dimuat terakhir di semua layout publik
   (landing, provider, auth, dan layout lama browse/cari/tonton).
   Bagian 1: sentuhan bersama. Bagian 2: kerangka & konten layout lama
   (body.dk-legacy), yang isinya masih memakai utility app.css.
   ===================================================================== */

:root {
    --dk-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
    --dk-lav: #c9acec;
    --dk-lav-grad: linear-gradient(180deg, #e6d3fa, #c3a1ea);
    --dk-gold-grad: linear-gradient(180deg, #f7e5bf, #d8ae66);
    --dk-ease: cubic-bezier(.2, .7, .2, 1);
}

::selection {
    background: rgba(201, 172, 236, .32);
    color: #fff;
}

html.light ::selection {
    background: rgba(109, 71, 145, .18);
    color: inherit;
}

html {
    scrollbar-color: rgba(201, 172, 236, .22) transparent;
}

/* Cahaya aurora halus di belakang semua halaman. */
body::before {
    position: fixed;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(60rem 36rem at 88% -14%, rgba(151, 91, 190, .14), transparent 60%),
        radial-gradient(46rem 30rem at -8% 108%, rgba(236, 208, 154, .05), transparent 60%);
    content: '';
    pointer-events: none;
}

html.light body::before {
    opacity: .45;
}

em {
    font-family: var(--dk-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -.005em;
}

/* =====================================================================
   Logo (partials/brand + partials/logo-mark) & ikon @icon (set "dk")
   ===================================================================== */

/* Spesifisitas nol agar ukuran dari CSS halaman/utility tetap menang. */
:where(.dk-i) {
    display: inline-block;
    flex: none;
    width: 1.1em;
    height: 1.1em;
    vertical-align: -.2em;
}

.dk-lockup {
    display: inline-flex;
    align-items: center;
    gap: .32em;
}

.dk-lockup .dk-mark {
    flex: none;
    width: 1.18em;
    height: 1.18em;
    filter: drop-shadow(0 .22em .4em rgba(118, 67, 207, .5));
    transition: transform .45s var(--dk-ease);
}

a:hover > .dk-lockup .dk-mark {
    transform: rotate(-7deg) scale(1.05);
}

.dk-lockup .dk-lockup__word {
    color: #f6f2fb;
    letter-spacing: -.045em;
}

.dk-lockup__word em {
    padding-right: .05em;
    background: linear-gradient(120deg, #f3e9ff, #c6a4f6 55%, #a77ddb);
    -webkit-background-clip: text;
    background-clip: text;
    font-size: 1.12em;
    letter-spacing: -.01em;
    -webkit-text-fill-color: transparent;
}

.dk-lockup__word i {
    color: #f1c77a;
    font-style: normal;
}

html.light .dk-lockup .dk-lockup__word {
    color: #1d1428;
}

html.light .dk-lockup__word em {
    background-image: linear-gradient(120deg, #8f5ed9, #5d3399);
}

html.light .dk-lockup__word i {
    color: #c3862a;
}

/* Glyph hati-play sudah seimbang secara optik: tanpa geser kiri ala segitiga. */
.wall-card__play .dk-i,
.fresh-play .dk-i {
    margin-left: 1px;
}

.back-top .dk-i {
    width: 18px;
    height: 18px;
}

.faq-list summary > span {
    display: grid;
    place-items: center;
}

.faq-list summary > span .dk-i {
    width: 18px;
    height: 18px;
}

.join-art > i .dk-i,
.frame-asterisk .dk-i,
.card-bottom .dk-i {
    display: block;
    width: 1em;
    height: 1em;
}

.catalog-empty > span .dk-i {
    width: 48px;
    height: 48px;
}

.access-icon .dk-i,
.provider-check .dk-i {
    width: 12px;
    height: 12px;
}

.provider-check .dk-i {
    width: 15px;
    height: 15px;
}

.back-link .dk-i {
    width: 16px;
    height: 16px;
}

.dkx-btn .dk-i,
.button-small .dk-i {
    width: 14px;
    height: 14px;
}

.dkx-menu .dk-i,
.account-dropdown .dk-i {
    width: 17px;
    height: 17px;
    color: var(--text-muted, var(--muted));
}

.dkx-menu button .dk-i {
    color: inherit;
}

.account-dropdown a,
.account-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dkx-head-icon .dk-i,
.dkx-empty > span .dk-i {
    width: 26px;
    height: 26px;
}

.dkx-empty > span .dk-i {
    width: 30px;
    height: 30px;
}

.dkx-pager .dk-i {
    width: 14px;
    height: 14px;
}

/* =====================================================================
   Layout lama: header & footer baru
   ===================================================================== */

body.dk-legacy {
    --dkx-line: rgba(255, 255, 255, .07);
    --dkx-accent: #c9acec;
    background: #08070c;
    font-family: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
}

html.light body.dk-legacy {
    --dkx-line: rgba(38, 16, 59, .1);
    --dkx-accent: #7a5196;
}

.dkx-container {
    width: min(1248px, calc(100% - 32px));
    margin-inline: auto;
}

.dkx-header {
    position: sticky;
    z-index: 40;
    top: 0;
    background: rgba(8, 7, 12, .74);
    border-bottom: 1px solid var(--dkx-line);
    backdrop-filter: blur(18px) saturate(1.3);
}

html.light .dkx-header {
    background: rgba(248, 247, 251, .84);
}

.dkx-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
    height: 72px;
}

.dkx-brand {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font: 600 26px/1 'Outfit', ui-sans-serif, system-ui, sans-serif;
    letter-spacing: -1.3px;
    text-decoration: none;
}


.dkx-nav {
    display: flex;
    gap: 26px;
    color: var(--text-muted);
    font-size: 13px;
}

.dkx-nav a,
.dkx-footer a {
    text-decoration: none;
    transition: color .2s ease;
}

.dkx-nav a:hover,
.dkx-footer nav a:hover {
    color: var(--text);
}

.dkx-search {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    max-width: 380px;
    margin-left: auto;
}

.dkx-search svg {
    position: absolute;
    left: 14px;
    width: 17px;
    height: 17px;
    color: var(--text-muted);
    pointer-events: none;
}

.dkx-search input {
    width: 100%;
    height: 42px;
    padding: 0 16px 0 40px;
    background: var(--pill-bg);
    border: 1px solid var(--pill-border);
    border-radius: 999px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.dkx-search input::placeholder {
    color: var(--text-dim);
}

.dkx-search input:focus {
    background: var(--pill-hover);
    border-color: rgba(201, 172, 236, .55);
    box-shadow: 0 0 0 4px rgba(201, 172, 236, .12);
}

.dkx-actions {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
}

.dkx-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: transparent;
    border: 0;
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.dkx-icon:hover {
    background: var(--pill-hover);
    color: var(--text);
}

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

.dkx-search-toggle {
    display: none;
}

.dkx-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 18px;
    background: var(--dk-lav-grad);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 12px 28px -14px rgba(169, 119, 220, .8);
    color: #21142e;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s var(--dk-ease);
}

.dkx-btn:hover {
    transform: translateY(-1px);
}

.dkx-account {
    position: relative;
}

.dkx-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(160deg, rgba(201, 172, 236, .26), rgba(201, 172, 236, .06));
    border: 1px solid rgba(201, 172, 236, .26);
    border-radius: 50%;
    color: #e6d3fa;
    font: 600 14px 'Outfit', ui-sans-serif, sans-serif;
    list-style: none;
    cursor: pointer;
}

html.light .dkx-avatar {
    color: #6d4791;
}

.dkx-avatar::-webkit-details-marker {
    display: none;
}

.dkx-menu {
    position: absolute;
    z-index: 50;
    top: calc(100% + 10px);
    right: 0;
    width: 232px;
    padding: 8px;
    background: rgba(21, 18, 28, .94);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
    backdrop-filter: blur(18px);
}

html.light .dkx-menu {
    background: rgba(255, 255, 255, .97);
    border-color: var(--dkx-line);
    box-shadow: 0 24px 60px rgba(58, 29, 85, .18);
}

.dkx-menu__who {
    display: grid;
    gap: 2px;
    margin-bottom: 4px;
    padding: 10px 10px 12px;
    border-bottom: 1px solid var(--dkx-line);
}

.dkx-menu__who strong {
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dkx-menu__who small {
    color: var(--text-muted);
    font-size: 11px;
}

.dkx-menu a,
.dkx-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: none;
    border: 0;
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.dkx-menu a:hover,
.dkx-menu button:hover {
    background: rgba(201, 172, 236, .1);
}

.dkx-menu form {
    margin-top: 4px;
    padding-top: 4px;
    border-top: 1px solid var(--dkx-line);
}

.dkx-menu button {
    color: #f29bab;
}

.dkx-sub {
    border-top: 1px solid var(--dkx-line);
}

.dkx-sub__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-block: 10px;
}

.dkx-providers,
.dkx-tabs {
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.dkx-providers::-webkit-scrollbar,
.dkx-tabs::-webkit-scrollbar {
    display: none;
}

.dkx-chip {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.dkx-chip:hover {
    background: var(--pill-bg);
    color: var(--text);
}

.dkx-chip[aria-current] {
    background: rgba(201, 172, 236, .12);
    border-color: rgba(201, 172, 236, .28);
    color: var(--text);
}

.dkx-chip__logo {
    position: relative;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    overflow: hidden;
    border-radius: 7px;
}

.dkx-chip__logo > span {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    background: #493660;
    color: #eee1ff;
    font: 500 12px 'Outfit', sans-serif;
}

.dkx-chip__logo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.dkx-tab {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 999px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.dkx-tab:hover {
    background: var(--pill-bg);
    color: var(--text);
}

.dkx-tab[aria-current] {
    background: var(--dk-lav-grad);
    color: #21142e;
}

.dkx-tab--vip {
    color: #ecd09a;
}

html.light .dkx-tab--vip {
    color: #9a6b1f;
}

.dkx-tab--vip[aria-current] {
    background: var(--dk-gold-grad);
    color: #2a1d08;
}

.dkx-footer {
    margin-top: 48px;
    border-top: 1px solid var(--dkx-line);
}

.dkx-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding-block: 36px;
}

.dkx-footer .dkx-brand {
    font-size: 24px;
}

.dkx-footer p {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.dkx-footer nav {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    color: var(--text-muted);
    font-size: 12.5px;
}

.dkx-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-block: 20px;
    border-top: 1px solid var(--dkx-line);
    color: var(--text-dim);
    font-size: 11px;
}

/* =====================================================================
   Layout lama: konten (utility app.css dipetakan ke palet lavender)
   ===================================================================== */

body.dk-legacy h1,
body.dk-legacy h2,
body.dk-legacy .font-black {
    font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
}

body.dk-legacy .font-black {
    font-weight: 600;
    letter-spacing: -.025em;
}

body.dk-legacy .text-gray-300 { color: #d8d2df; }
body.dk-legacy .text-gray-400 { color: #a29bad; }
body.dk-legacy .text-gray-500 { color: #7d7688; }
body.dk-legacy .text-gray-600 { color: #5f5869; }

body.dk-legacy .glass {
    background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01)), #121118;
    border: 1px solid rgba(255, 255, 255, .07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), 0 30px 70px -40px rgba(0, 0, 0, .85);
    backdrop-filter: none;
}

body.dk-legacy .glass.rounded-full,
body.dk-legacy .glass.rounded-xl {
    background: rgba(255, 255, 255, .04);
    box-shadow: none;
}

html.light body.dk-legacy .glass {
    background: #fff;
    border-color: rgba(38, 16, 59, .1);
    box-shadow: 0 20px 50px -35px rgba(58, 29, 85, .35);
}

body.dk-legacy .bg-gradient-brand {
    background: var(--dk-lav-grad);
    color: #1f1229;
}

body.dk-legacy .bg-gradient-brand .text-white {
    color: #1f1229;
}

body.dk-legacy .bg-gradient-gold {
    background: var(--dk-gold-grad);
    color: #2a1d08;
}

body.dk-legacy .shadow-lg[class*="shadow-plum"],
body.dk-legacy .shadow-xl[class*="shadow-plum"] {
    box-shadow: 0 14px 32px -14px rgba(169, 119, 220, .75);
}

body.dk-legacy .shadow-2xl[class*="shadow-plum"] {
    box-shadow: 0 40px 90px -40px rgba(169, 119, 220, .55), 0 30px 60px -30px #000;
}

body.dk-legacy .text-gradient {
    background: linear-gradient(100deg, #f4e9ff, #c9acec 50%, #a77ddb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dk-legacy .text-plum-300 { color: #dcc6f7; }
body.dk-legacy .text-plum-300\/70 { color: rgba(220, 198, 247, .7); }

body.dk-legacy .text-plum-400,
body.dk-legacy .hover\:text-plum-400:hover,
body.dk-legacy .group:hover .group-hover\:text-plum-400 {
    color: var(--dkx-accent);
}

body.dk-legacy .bg-plum-500\/5 { background: rgba(201, 172, 236, .05); }
body.dk-legacy .bg-plum-500\/10 { background: rgba(201, 172, 236, .1); }
body.dk-legacy .hover\:bg-plum-500\/15:hover { background: rgba(201, 172, 236, .15); }
body.dk-legacy .border-plum-500\/20 { border-color: rgba(201, 172, 236, .22); }
body.dk-legacy .bg-plum-600\/20 { background: rgba(169, 119, 220, .22); }
body.dk-legacy .text-amber-300 { color: #ecd09a; }
body.dk-legacy .bg-amber-500\/20 { background: rgba(236, 208, 154, .18); }

/* Kartu drama: poster mengambang tanpa kotak, cahaya lavender saat hover. */
body.dk-legacy .drama-card.glass {
    overflow: visible;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

body.dk-legacy .drama-card.card:hover {
    box-shadow: none;
}

body.dk-legacy .drama-card.card::after {
    display: none;
}

body.dk-legacy .drama-card .card-media {
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    transition: transform .35s var(--dk-ease), box-shadow .35s ease, border-color .35s ease;
}

body.dk-legacy .drama-card:hover .card-media {
    border-color: rgba(201, 172, 236, .42);
    box-shadow: 0 26px 50px -22px rgba(169, 119, 220, .7);
    transform: translateY(-5px);
}

body.dk-legacy .drama-card .card-media img {
    transform: none;
}

body.dk-legacy .drama-card:hover .card-media img {
    transform: scale(1.05);
}

body.dk-legacy .drama-card .p-3 {
    padding: 10px 2px 0;
}

body.dk-legacy .drama-card h3 {
    font-weight: 500;
}

/* Badge "eps" di atas poster tetap terang meski teks halaman gelap (mode terang). */
html.light body.dk-legacy .drama-card .bg-black\/70 {
    color: #fff;
}

/* Halaman tonton */
body.dk-legacy .ep-btn,
body.dk-legacy .ep-locked {
    border-radius: 12px;
    font-family: 'Outfit', ui-sans-serif, sans-serif;
    font-weight: 500;
}

body.dk-legacy .ep-btn:not(.bg-gradient-brand):hover {
    border-color: rgba(201, 172, 236, .35);
}

body.dk-legacy .ep-btn.bg-gradient-brand {
    box-shadow: 0 10px 24px -10px rgba(169, 119, 220, .85);
}

body.dk-legacy #player::cue {
    font-family: 'DM Sans', sans-serif;
}

/* Kepala halaman browse & paginasi */
.dkx-head-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(160deg, rgba(201, 172, 236, .22), rgba(201, 172, 236, .05));
    border: 1px solid rgba(201, 172, 236, .22);
    border-radius: 14px;
    color: #dcc6f7;
}

.dkx-head-icon.is-gold {
    background: linear-gradient(160deg, rgba(236, 208, 154, .22), rgba(236, 208, 154, .05));
    border-color: rgba(236, 208, 154, .28);
    color: #ecd09a;
}

.dkx-head-icon svg,
.dkx-empty svg {
    width: 24px;
    height: 24px;
}

.dkx-empty {
    display: grid;
    place-items: center;
    gap: 14px;
    padding: 90px 16px;
    color: var(--text-muted);
    text-align: center;
}

.dkx-empty > span {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    background: rgba(201, 172, 236, .08);
    border: 1px solid rgba(201, 172, 236, .18);
    border-radius: 20px;
    color: var(--dkx-accent);
}

.dkx-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 36px 0 8px;
    font-size: 13px;
}

.dkx-pager a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--dkx-line);
    border-radius: 10px;
    color: var(--text-muted);
    text-decoration: none;
    transition: background-color .2s ease, color .2s ease;
}

.dkx-pager a:hover {
    background: var(--pill-bg);
    color: var(--text);
}

.dkx-pager a[aria-current] {
    background: var(--dk-lav-grad);
    border-color: transparent;
    box-shadow: 0 10px 24px -12px rgba(169, 119, 220, .8);
    color: #21142e;
    font-weight: 700;
}

.dkx-pager .is-disabled {
    opacity: .35;
    pointer-events: none;
}

.dkx-pager > span {
    padding: 0 2px;
    color: var(--text-dim);
}

/* ----- Responsif ----- */

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

@media (max-width: 767px) {
    .dkx-bar {
        gap: 12px;
        height: 64px;
    }

    .dkx-brand {
        font-size: 23px;
    }

    .dkx-search {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        max-width: none;
        margin: 0;
        padding: 0 0 12px;
        background: var(--bg);
    }

    .dkx-search svg {
        top: 12px;
    }

    body.dkx-search-open .dkx-search {
        display: flex;
    }

    .dkx-search input {
        font-size: 16px;
    }

    .dkx-search-toggle {
        display: grid;
    }

    .dkx-actions {
        gap: 2px;
        margin-left: auto;
    }

    .dkx-sub__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-block: 8px;
    }

    .dkx-footer__top,
    .dkx-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .dkx-footer nav {
        gap: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
