/* ===== EXPLORE ===== */

.explore-page {
    padding: 12px 16px 8px;
}

.explore-shell {
    width: min(100%, 720px);
    margin: 0 auto;
}

.explore-heading {
    min-height: 54px;
    margin: 2px 2px 14px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.explore-heading h1 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 25px;
    line-height: 1.04;
    font-weight: 790;
    letter-spacing: -.72px;
}

.explore-count {
    padding-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.explore-feed {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.explore-card {
    width: 100%;
    min-width: 0;
    padding: 0;
    display: block;
    overflow: hidden;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, .055);
    border-radius: 18px;
    background:
        linear-gradient(145deg, rgba(255,255,255,.026), rgba(255,255,255,.012)),
        #0e1219;
    box-shadow: 0 14px 34px rgba(0,0,0,.17);
    color: var(--text);
    transform: translateZ(0);
    transition:
        transform 150ms var(--ease-ios),
        border-color 180ms ease,
        box-shadow 180ms ease;
}

.explore-card:active {
    transform: scale(.988);
}

.explore-card-media {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.012)),
        #0a0d13;
}

.explore-card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.001);
    transition:
        opacity 220ms ease,
        transform 260ms var(--ease-ios),
        filter 220ms ease;
}

.explore-card.is-vip .explore-card-media img,
.explore-vip-visual img {
    /* Medium blur: small text becomes unreadable while the scene remains recognizable. */
    filter: blur(1.5px);
    transform: scale(1.045);
}

.explore-card.is-vip .explore-card-media::after,
.explore-vip-visual::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    /* Same dim treatment used by the full-screen Detail video controls. */
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, .48), rgba(0, 0, 0, .06) 30%, rgba(0, 0, 0, .08) 68%, rgba(0, 0, 0, .58)),
        rgba(0, 0, 0, .08);
}

.explore-lock {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 50%;
    background: rgba(8,10,14,.46);
    color: rgba(255,255,255,.92);
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

.explore-lock svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.explore-card-caption {
    margin: 0;
    padding: 12px 13px 14px;
    min-height: 48px;
    color: rgba(255,255,255,.88);
    font-size: 13px;
    line-height: 1.44;
    font-weight: 620;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-see-more {
    width: 100%;
    min-height: 48px;
    margin: 18px 0 2px;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 15px;
    background: rgba(255,255,255,.035);
    color: rgba(255,255,255,.86);
    font-size: 12px;
    font-weight: 760;
    transition:
        transform 140ms var(--ease-ios),
        background-color 160ms ease;
}

.explore-see-more:active {
    transform: scale(.985);
    background: rgba(255,255,255,.065);
}

.explore-see-more svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.explore-state {
    min-height: 220px;
    padding: 42px 18px;
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
    color: var(--muted);
}

.explore-state strong {
    color: rgba(255,255,255,.86);
    font-size: 15px;
}

.explore-state span {
    margin-top: 7px;
    max-width: 270px;
    font-size: 12px;
    line-height: 1.5;
}

.explore-skeleton {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,.045);
    background: rgba(255,255,255,.015);
}

.explore-skeleton-cover {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.explore-skeleton-copy {
    width: 64%;
    height: 12px;
    margin: 13px 13px 15px;
    border-radius: 999px;
}

/* Related/Search/Activity reuse the exact VIP teaser language. */
.search-result-card.explore-result.is-vip .search-result-cover img,
.activity-card.explore-activity-card.is-vip .activity-cover img,
.detail-related-card.explore-related-card.is-vip .detail-related-cover img {
    filter: blur(1.5px);
    transform: scale(1.045);
}

.search-result-card.explore-result.is-vip .search-result-cover::after,
.activity-card.explore-activity-card.is-vip .activity-cover::after,
.detail-related-card.explore-related-card.is-vip .detail-related-cover::after {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, .48), rgba(0, 0, 0, .06) 30%, rgba(0, 0, 0, .08) 68%, rgba(0, 0, 0, .58)),
        rgba(0, 0, 0, .08);
}

.search-result-cover .explore-lock,
.activity-cover .explore-lock,
.detail-related-cover .explore-lock {
    width: 34px;
    height: 34px;
}

.search-result-cover .explore-lock svg,
.activity-cover .explore-lock svg,
.detail-related-cover .explore-lock svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 760px) {
    .explore-page {
        padding-inline: 22px;
    }

    .explore-feed {
        gap: 18px;
    }
}

html[data-motion-mode="reduced"] .explore-card,
html[data-motion-mode="reduced"] .explore-card-media img,
html[data-motion-mode="reduced"] .explore-see-more {
    transition: none !important;
}

.explore-result.is-unavailable,
.explore-activity-card.is-unavailable,
.explore-related-card.is-unavailable {
    opacity: .62;
    pointer-events: none;
}

/* ===== EXPLORE POLISH / SHARED CARD STATUS ===== */
.kg-duration-badge,
.kg-new-badge,
.kg-watched-badge {
    position: absolute;
    z-index: 4;
    display: inline-grid;
    place-items: center;
    min-height: 22px;
    border-radius: 7px;
    color: rgba(255,255,255,.94);
    background: rgba(5,7,10,.72);
    border: 1px solid rgba(255,255,255,.09);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    pointer-events: none;
}

.kg-duration-badge {
    right: 8px;
    bottom: 8px;
    padding: 0 7px;
    font-size: 9px;
    line-height: 1;
    font-weight: 760;
    font-variant-numeric: tabular-nums;
}

.kg-new-badge {
    left: 8px;
    top: 8px;
    padding: 0 7px;
    color: #171009;
    background: var(--accent);
    border-color: transparent;
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: .06em;
}

.kg-watched-badge {
    right: 8px;
    top: 8px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
}

.kg-watched-badge svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.kg-resume-line {
    --kg-resume: 0%;
    position: absolute;
    z-index: 5;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,.12);
    pointer-events: none;
}

.kg-resume-line::after {
    content: "";
    display: block;
    width: var(--kg-resume);
    height: 100%;
    background: var(--accent);
}

.explore-retry {
    min-width: 102px;
    min-height: 40px;
    margin-top: 16px;
    padding: 0 16px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.045);
    font-size: 11px;
    font-weight: 760;
}

.explore-card.is-vip.is-unlocking .explore-lock,
.explore-result.is-vip.is-unlocking .explore-lock,
.explore-activity-card.is-vip.is-unlocking .explore-lock,
.explore-related-card.is-vip.is-unlocking .explore-lock {
    animation: kg-vip-lock-feedback 180ms ease both;
}

@keyframes kg-vip-lock-feedback {
    50% { transform: translate(-50%, -50%) scale(.90); opacity: .78; }
}

html[data-motion-mode="reduced"] .explore-card.is-vip.is-unlocking .explore-lock,
html[data-motion-mode="reduced"] .explore-result.is-vip.is-unlocking .explore-lock,
html[data-motion-mode="reduced"] .explore-activity-card.is-vip.is-unlocking .explore-lock,
html[data-motion-mode="reduced"] .explore-related-card.is-vip.is-unlocking .explore-lock,
html[data-motion-mode="reduced"] .kg-skeleton::after {
    animation: none !important;
    transition: none !important;
}


/* VIP teaser blur tuning — lighter */
.explore-card.is-vip .explore-card-media img,
.explore-vip-visual img {
    filter: blur(.75px) !important;
    transform: scale(1.015) !important;
}

.search-result-card.explore-result.is-vip .search-result-cover img,
.activity-card.explore-activity-card.is-vip .activity-cover img,
.detail-related-card.explore-related-card.is-vip .detail-related-cover img {
    filter: blur(.75px) !important;
    transform: scale(1.015) !important;
}



/* Explore offline visibility hard-stop */
#exploreSeeMore[hidden],
#exploreState[hidden] {
    display: none !important;
}

/* VIP replaces duration badge */
.kg-duration-badge.kg-vip-badge {
    min-width: 36px;
    padding-inline: 9px;
    color: #171009;
    background: var(--accent);
    border-color: transparent;
    font-weight: 900;
    letter-spacing: .05em;
}

/* VIP badge — same visual style as duration badge */
.kg-duration-badge.kg-vip-badge {
    min-width: auto !important;
    padding: 6px 10px !important;
    background: rgba(8, 10, 15, 0.88) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
}

/* Hide Explore shown-count label */
.explore-count,
#exploreCount,
[data-explore-count] {
    display: none !important;
}

/* VIP label — text only, no background */
.kg-duration-badge.kg-vip-badge {
    min-width: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #fff !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
}

/* FINAL VIP LABEL — text only */
.explore-card .kg-duration-badge.kg-vip-badge,
.activity-card .kg-duration-badge.kg-vip-badge,
.search-result-card .kg-duration-badge.kg-vip-badge,
.detail-related-card .kg-duration-badge.kg-vip-badge {
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;

    color: #fff !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
}

/* Explore Search cards — scale badges/text to the smaller thumbnail */
.search-result-card.explore-result .kg-new-badge {
    font-size: 9px !important;
    padding: 4px 7px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.search-result-card.explore-result .kg-duration-badge {
    font-size: 9px !important;
    padding: 4px 6px !important;
    border-radius: 8px !important;
    line-height: 1 !important;
    min-width: 0 !important;
}

.search-result-card.explore-result .kg-duration-badge.kg-vip-badge {
    font-size: 9px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

/* ===== EXPLORE SEARCH + RELATED — COMPACT OVERLAYS ===== */
.search-result-card.explore-result .kg-new-badge,
.detail-related-card.explore-related-card .kg-new-badge {
    left: 5px !important;
    top: 5px !important;
    min-height: 16px !important;
    padding: 0 5px !important;
    border-radius: 5px !important;
    font-size: 7px !important;
    line-height: 1 !important;
    letter-spacing: .05em !important;
}

.search-result-card.explore-result .kg-duration-badge,
.detail-related-card.explore-related-card .kg-duration-badge {
    right: 5px !important;
    bottom: 5px !important;
    min-height: 16px !important;
    padding: 0 5px !important;
    border-radius: 5px !important;
    font-size: 7px !important;
    line-height: 1 !important;
}

.search-result-card.explore-result .kg-duration-badge.kg-vip-badge,
.detail-related-card.explore-related-card .kg-duration-badge.kg-vip-badge {
    right: 5px !important;
    bottom: 5px !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    font-size: 7px !important;
    line-height: 1 !important;
    font-weight: 800 !important;
    letter-spacing: .04em !important;
}

/* ===== FINAL: VIP TEXT MATCHES FREE DURATION POSITION / TYPOGRAPHY ===== */

/* Explore main card: VIP and Free seconds use identical placement + text metrics */
.explore-card .kg-duration-badge,
.explore-card .kg-duration-badge.kg-vip-badge {
    right: 8px !important;
    bottom: 8px !important;
    display: inline-grid !important;
    place-items: center !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 22px !important;
    padding: 0 7px !important;
    border-radius: 7px !important;
    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: normal !important;
}

/* Search: VIP and Free seconds identical placement + text metrics */
.search-result-card.explore-result .kg-duration-badge,
.search-result-card.explore-result .kg-duration-badge.kg-vip-badge {
    right: 5px !important;
    bottom: 5px !important;
    display: inline-grid !important;
    place-items: center !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 16px !important;
    padding: 0 5px !important;
    border-radius: 5px !important;
    font-size: 7px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: normal !important;
}

/* Related: VIP and Free seconds identical placement + text metrics */
.detail-related-card.explore-related-card .kg-duration-badge,
.detail-related-card.explore-related-card .kg-duration-badge.kg-vip-badge {
    right: 5px !important;
    bottom: 5px !important;
    display: inline-grid !important;
    place-items: center !important;
    min-width: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 16px !important;
    padding: 0 5px !important;
    border-radius: 5px !important;
    font-size: 7px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: normal !important;
}

/* VIP stays TEXT ONLY */
.explore-card .kg-duration-badge.kg-vip-badge,
.search-result-card.explore-result .kg-duration-badge.kg-vip-badge,
.detail-related-card.explore-related-card .kg-duration-badge.kg-vip-badge {
    background: transparent !important;
    background-image: none !important;
    border-color: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: rgba(255,255,255,.94) !important;
}

/* =========================================================
   FINAL — VIP BADGE = FREE DURATION BADGE UI
   Explore Main / Search / Related
   ========================================================= */

/* MAIN EXPLORE — Free seconds + VIP exact same UI */
.explore-card .kg-duration-badge,
.explore-card .kg-duration-badge.kg-vip-badge {
    right: 8px !important;
    bottom: 8px !important;

    display: inline-grid !important;
    place-items: center !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 22px !important;

    padding: 0 7px !important;
    border-radius: 7px !important;

    color: rgba(255,255,255,.94) !important;
    background: rgba(5,7,10,.72) !important;
    background-image: none !important;
    border: 1px solid rgba(255,255,255,.09) !important;

    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: none !important;

    font-size: 9px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: normal !important;
    font-variant-numeric: tabular-nums !important;
}


/* SEARCH — Free seconds + VIP exact same compact UI */
.search-result-card.explore-result .kg-duration-badge,
.search-result-card.explore-result .kg-duration-badge.kg-vip-badge {
    right: 5px !important;
    bottom: 5px !important;

    display: inline-grid !important;
    place-items: center !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 16px !important;

    padding: 0 5px !important;
    border-radius: 5px !important;

    color: rgba(255,255,255,.94) !important;
    background: rgba(5,7,10,.72) !important;
    background-image: none !important;
    border: 1px solid rgba(255,255,255,.09) !important;

    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: none !important;

    font-size: 7px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: normal !important;
    font-variant-numeric: tabular-nums !important;
}


/* RELATED — Free seconds + VIP exact same compact UI */
.detail-related-card.explore-related-card .kg-duration-badge,
.detail-related-card.explore-related-card .kg-duration-badge.kg-vip-badge {
    right: 5px !important;
    bottom: 5px !important;

    display: inline-grid !important;
    place-items: center !important;

    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 16px !important;

    padding: 0 5px !important;
    border-radius: 5px !important;

    color: rgba(255,255,255,.94) !important;
    background: rgba(5,7,10,.72) !important;
    background-image: none !important;
    border: 1px solid rgba(255,255,255,.09) !important;

    -webkit-backdrop-filter: blur(8px) !important;
    backdrop-filter: blur(8px) !important;
    box-shadow: none !important;

    font-size: 7px !important;
    line-height: 1 !important;
    font-weight: 760 !important;
    letter-spacing: normal !important;
    font-variant-numeric: tabular-nums !important;
}


/* =========================================================
   CONTINUE WATCHING
   ========================================================= */

.explore-continue[hidden] {
    display: none !important;
}

.explore-continue {
    margin: 0 0 18px;
}

.explore-continue-heading {
    margin: 0 2px 9px;
}

.explore-continue-heading strong {
    color: rgba(255,255,255,.92);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 780;
    letter-spacing: -.18px;
}

.explore-continue-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(68vw, 240px);
    gap: 11px;

    overflow-x: auto;
    overflow-y: hidden;

    padding: 1px 1px 5px;

    scroll-snap-type: x proximity;
    overscroll-behavior-inline: contain;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.explore-continue-track::-webkit-scrollbar {
    display: none;
}

.explore-continue-card {
    width: 100%;
    min-width: 0;
    padding: 0;

    overflow: hidden;
    text-align: left;

    border: 1px solid rgba(255,255,255,.065);
    border-radius: 15px;

    background:
        linear-gradient(145deg, rgba(255,255,255,.026), rgba(255,255,255,.012)),
        #0e1219;

    color: var(--text);

    scroll-snap-align: start;
    transform: translateZ(0);

    transition:
        transform 140ms var(--ease-ios),
        border-color 180ms ease;
}

.explore-continue-card:active {
    transform: scale(.985);
}

.explore-continue-media {
    position: relative;
    display: block;

    width: 100%;
    aspect-ratio: 16 / 9;

    overflow: hidden;
    background: #090c11;
}

.explore-continue-media img {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: cover;
}

.explore-continue-caption {
    display: block;

    padding: 9px 10px 11px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    color: rgba(255,255,255,.88);

    font-size: 12px;
    line-height: 1.3;
    font-weight: 650;
}

html[data-motion-mode="reduced"] .explore-continue-card {
    transition: none !important;
}

/* Continue Watching title smaller */
.explore-continue-heading strong {
    font-size: 12px !important;
}
