.drm-drama-wrap {
    --drm-accent: #e63b7a;
    --drm-accent-dark: #c22463;
    --drm-bg-dark: #14141c;
    --drm-card-bg: #f4f4f7;
    --drm-text-muted: #6b6b76;
    --drm-radius: 14px;

    max-width: 1080px;
    margin: 0 auto;
    padding: 28px 16px 70px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.drm-drama-wrap * {
    box-sizing: border-box;
}

/* ---------- Hero ---------- */

.drm-hero {
    margin-bottom: 26px;
}

.drm-drama-title {
    font-size: clamp(24px, 4vw, 34px);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 10px;
    letter-spacing: -0.02em;
}

.drm-drama-meta {
    margin-bottom: 14px;
}

.drm-meta-pill {
    display: inline-block;
    background: var(--drm-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 999px;
}

.drm-drama-description {
    color: var(--drm-text-muted);
    line-height: 1.65;
    font-size: 15px;
    max-width: 720px;
}

/* ---------- Player ---------- */

.drm-player-section {
    background: var(--drm-bg-dark);
    border-radius: var(--drm-radius);
    padding: 14px 14px 18px;
    margin-bottom: 34px;
}

.drm-player-topbar {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f0f0f3;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .02em;
    margin-bottom: 12px;
    padding: 0 2px;
}

.drm-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--drm-accent);
    box-shadow: 0 0 0 0 rgba(230, 59, 122, .6);
    animation: drm-pulse 1.8s infinite;
    flex: none;
}

@keyframes drm-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(230, 59, 122, .55); }
    70%  { box-shadow: 0 0 0 7px rgba(230, 59, 122, 0); }
    100% { box-shadow: 0 0 0 0 rgba(230, 59, 122, 0); }
}

.drm-player {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.drm-player iframe,
.drm-player video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.drm-current-title {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    margin: 14px 2px 0;
}

/* ---------- Episode grid ---------- */

.drm-episodes-heading {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 14px;
}

.drm-episode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.drm-episode-card {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drm-thumb-box {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: linear-gradient(135deg, #2a2a38, #14141c);
    border: 2px solid transparent;
    transition: border-color .15s ease, transform .15s ease;
}

.drm-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}

.drm-thumb-fallback-num {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 800;
    color: rgba(255, 255, 255, .35);
}

.drm-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(.9);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(20, 20, 28, .55);
    backdrop-filter: blur(2px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 2px; /* optically center the triangle */
    opacity: .92;
    transition: transform .15s ease, background .15s ease, opacity .15s ease;
}

.drm-ep-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 3px 8px;
    border-radius: 999px;
}

.drm-now-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--drm-accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: 3px 7px;
    border-radius: 999px;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity .15s ease, transform .15s ease;
}

.drm-ep-caption {
    font-size: 13px;
    color: var(--drm-text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover / focus */
.drm-episode-card:hover .drm-thumb-box,
.drm-episode-card:focus-visible .drm-thumb-box {
    border-color: var(--drm-accent);
}

.drm-episode-card:hover .drm-thumb-box img {
    transform: scale(1.05);
}

.drm-episode-card:hover .drm-play-overlay {
    background: var(--drm-accent);
    transform: translate(-50%, -50%) scale(1);
}

/* Active (currently playing) card */
.drm-episode-card.active .drm-thumb-box {
    border-color: var(--drm-accent);
    box-shadow: 0 0 0 3px rgba(230, 59, 122, .18);
}

.drm-episode-card.active .drm-play-overlay {
    background: var(--drm-accent);
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.drm-episode-card.active .drm-now-badge {
    opacity: 1;
    transform: translateY(0);
}

.drm-no-episodes {
    color: var(--drm-text-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
    .drm-drama-wrap {
        padding: 18px 12px 50px;
    }

    .drm-episode-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 10px;
    }

    .drm-play-overlay {
        width: 36px;
        height: 36px;
    }

    .drm-play-overlay svg {
        width: 18px;
        height: 18px;
    }

    .drm-current-title {
        font-size: 15px;
    }
}

@media (max-width: 400px) {
    .drm-episode-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
