/* =======================================================
   BASIC RIBBON STYLE (Default)
======================================================= */
.ribbon {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    font-size: 0.73rem;
    font-weight: 600;
    border-radius: 999px;
    z-index: 5;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    backdrop-filter: blur(4px);
    opacity: 0.95;
}

/* Jika API menyediakan warna cornerC → class auto-color */
.ribbon-inline-color {
    color: #fff;
}

/* =======================================================
   AUTO COLOR BASED ON CORNER NAME (fallback)
======================================================= */

/* POPULAR */
.ribbon-popular {
    background: linear-gradient(135deg, #ff2965, #d61d50);
    color: #fff;
}

/* NEW / BARU */
.ribbon-new {
    background: linear-gradient(135deg, #1cc88a, #13855c);
    color: #fff;
}

/* TRENDING / HOT */
.ribbon-trending {
    background: linear-gradient(135deg, #ff9f43, #ff6f00);
    color: #fff;
}

/* DEFAULT (jika tidak dikenali) */
.ribbon-default {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

/* =======================================================
   EPISODE PILL (di pojok gambar)
======================================================= */

.ep-pill {
    position: absolute;
    bottom: 8px;
    left: 8px;
    padding: 3px 9px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.75);
    border-radius: 999px;
    z-index: 5;
    backdrop-filter: blur(4px);
}

/* =======================================================
   PLAY OVERLAY (Tengah gambar)
======================================================= */

.play-overlay {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 4;
}

.card-link:hover .play-overlay {
    display: flex;
}

.play-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
}

.play-circle svg {
    width: 26px;
    height: 26px;
    fill: #111827;
}

/* =======================================================
   RESPONSIVE TUNING
======================================================= */
@media (max-width: 576px) {
    .ribbon {
        top: 6px;
        left: 6px;
        padding: 3px 8px;
        font-size: 0.65rem;
    }

    .ep-pill {
        bottom: 6px;
        left: 6px;
        padding: 2px 7px;
        font-size: 0.65rem;
    }

    .play-circle {
        width: 42px;
        height: 42px;
    }

    .play-circle svg {
        width: 22px;
        height: 22px;
    }
}

/* Ribbon pojok kiri atas (tanpa perubahan) */
.ribbon-corner {
    position: absolute;
    top: 8px;
    left: 8px;
}

/* EPISODE badge di pojok kanan atas */
.ep-pill-top {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #fff;
    background: rgba(0, 0, 0, 0.78);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    z-index: 6;
    white-space: nowrap;
}

/* Tags di pojok kiri bawah */
.tags-bottom {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    z-index: 5;
}

.ep-tag-pill {
    padding: 3px 8px;
    font-size: 0.68rem;
    background: rgba(17, 24, 39, 0.75);
    color: #f9fafb;
    border-radius: 999px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

/* Responsive tweak untuk mobile */
@media (max-width: 576px) {
    .ep-pill-top {
        top: 6px;
        right: 6px;
        padding: 2px 8px;
        font-size: 0.66rem;
    }

    .tags-bottom {
        bottom: 6px;
        left: 6px;
        gap: 4px;
    }

    .ep-tag-pill {
        padding: 2px 7px;
        font-size: 0.64rem;
    }
}

/* Responsive tweak untuk mobile */
@media (max-width: 576px) {

    /* pindahkan EPISODE ke bawah kiri, bekas tags */
    .ep-pill-top {
        top: auto;
        /* matikan posisi top */
        right: auto;
        /* matikan posisi right */
        bottom: 6px;
        /* taruh di bawah */
        left: 6px;
        /* dan kiri */
        padding: 2px 8px;
        font-size: 0.66rem;
    }

    /* sembunyikan tags di mobile */
    .tags-bottom {
        display: none !important;
    }

    .ep-tag-pill {
        display: none !important;
    }

    /* kalau mau, teks deskripsi di body bisa disembunyiin juga */
    .card-drama .card-text {
        display: none;
    }
}

/* ===============================
   GLOBAL SKELETON
   =============================== */
.drbx-skeleton {
    position: relative;
    overflow: hidden;
    background-color: #1f2933;
    /* abu gelap */
    border-radius: 0.5rem;
}

.drbx-skeleton-line {
    height: 10px;
    border-radius: 999px;
    background-color: #1f2933;
}

.drbx-skeleton-thumb {
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    border-radius: 0.75rem;
    background-color: #111827;
}

.drbx-skeleton,
.drbx-skeleton-line,
.drbx-skeleton-thumb {
    position: relative;
    overflow: hidden;
}

.drbx-skeleton::before,
.drbx-skeleton-line::before,
.drbx-skeleton-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(90deg,
            rgba(255, 255, 255, 0) 0,
            rgba(255, 255, 255, 0.08) 20%,
            rgba(255, 255, 255, 0) 40%);
    animation: drbx-skeleton-shimmer 1.4s infinite;
}

@keyframes drbx-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Skeleton layout kecil */
.drbx-skeleton-text-sm {
    height: 8px;
    margin-bottom: 6px;
}

.drbx-skeleton-text-md {
    height: 12px;
    margin-bottom: 8px;
}

.drbx-skeleton-text-lg {
    height: 16px;
    margin-bottom: 10px;
}

/* ===== STREAM LAYOUT SKELETON ===== */
.drbx-player-skeleton-wrapper {
    position: relative;
}

.drbx-ep-sidebar-skeleton .drbx-skeleton-line {
    margin-bottom: 0.5rem;
}

.drbx-ep-card-skeleton {
    height: 135px;
    border-radius: 0.75rem;
}

/* ===== SEARCH SKELETON ===== */
.drbx-search-skeleton-card {
    border-radius: 0.75rem;
    padding: 12px;
    margin-bottom: 12px;
}