/* DMS+ Deeplink Landing — V2 Editorial (poster card layout) */

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.deeplink-page {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
}

/* HERO */
.deeplink-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 28px 24px 220px 24px;
    overflow: hidden;
}

/* Decorative backgrounds (absolute layers behind content) */
.hero-bg-mesh,
.hero-bg-radial,
.hero-bg-scrim {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero-bg-mesh {
    background:
        radial-gradient(at 17% 17%, var(--mesh-1) 0%, transparent 45%),
        radial-gradient(at 67% 33%, var(--mesh-2) 0%, transparent 50%),
        radial-gradient(at 50% 70%, var(--mesh-3) 0%, transparent 55%),
        #000;
    z-index: 0;
}

.hero-bg-radial {
    background: radial-gradient(circle at 70% 30%, var(--accent-spotlight) 0%, transparent 60%);
    z-index: 1;
}

.hero-bg-icon {
    position: absolute;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    height: 180px;
    opacity: 0.06;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
}

.hero-bg-icon svg { width: 100%; height: 100%; }

.hero-bg-scrim {
    background: linear-gradient(180deg, transparent 0%, transparent 30%, rgba(0,0,0,0.6) 70%, #000 100%);
    z-index: 3;
}

/* Poster card (flex child, sits at top of hero) */
.hero-poster-card {
    position: relative;
    z-index: 4;
    width: clamp(280px, 78vw, 340px);
    aspect-ratio: 2 / 3;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background-color: var(--mesh-2);
    background-size: cover;
    background-position: center;
    box-shadow: 0 24px 48px -8px rgba(0, 0, 0, 0.8);
    flex-shrink: 0;
}

.hero-poster-card--landscape {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
}

.hero-poster-card--square {
    aspect-ratio: 1 / 1;
    width: clamp(260px, 70vw, 320px);
}

/* Hero overlay slots (Live badge, Generic mark) */
.hero-overlay {
    position: absolute;
    z-index: 4;
}

.hero-overlay--live {
    top: 28px;
    left: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #EF4444;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(237, 27, 46, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

.hero-overlay--live::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
}

.hero-overlay--live span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(237, 27, 46, 0.5); }
    50% { box-shadow: 0 0 30px rgba(237, 27, 46, 0.9); }
}

.hero-overlay--mark {
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 120px;
    background: var(--accent);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 32px -6px rgba(237, 27, 46, 0.5);
    overflow: hidden;
}

.hero-overlay--mark img {
    width: 70%;
    height: 70%;
    object-fit: contain;
}

/* HERO CONTENT (text below poster) */
.hero-content {
    position: relative;
    z-index: 5;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hero-content--center { align-items: center; text-align: center; }

.hero-eyebrow {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--accent, #ED1B2E);
    text-transform: uppercase;
    margin-bottom: -4px;
}

.hero-title {
    font-family: 'Playfair Display', 'Times New Roman', serif;
    font-size: clamp(32px, 9vw, 42px);
    font-weight: 700;
    line-height: 1.05;
    margin: 0;
    color: #fff;
    letter-spacing: -0.02em;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
}

.meta-item {
    color: rgba(255, 255, 255, 0.8);
}

.meta-dot {
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    flex-shrink: 0;
}

.meta-tag {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 0.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
}

.hero-caption {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
    margin: 0;
}

/* Episode list (siblings from same playlist) */
.episode-list {
    width: 100%;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.episode-list-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    text-transform: uppercase;
}

.episode-list-items {
    list-style: none;
    padding: 0 0 12px 0;
    margin: 0 -24px;
    display: flex;
    flex-direction: row;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.episode-list-items:active { cursor: grabbing; }

.episode-list-items::-webkit-scrollbar { height: 4px; }
.episode-list-items::-webkit-scrollbar-track { background: transparent; }
.episode-list-items::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
}
.episode-list-items::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); }

/* Hide scrollbar on touch devices (swipe is the gesture) */
@media (hover: none) and (pointer: coarse) {
    .episode-list-items { scrollbar-width: none; cursor: default; }
    .episode-list-items::-webkit-scrollbar { display: none; }
}

.episode-list-items > li {
    scroll-snap-align: start;
    flex-shrink: 0;
}

.episode-list-items > li:first-child { margin-left: 24px; }
.episode-list-items > li:last-child { margin-right: 24px; }

.episode-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 124px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}

.episode-item:active { transform: scale(0.97); }

.episode-thumb {
    position: relative;
    width: 124px;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    background-color: var(--mesh-2);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 28px;
}

.episode-number-overlay {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-transform: uppercase;
}

.episode-title {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ACTION (sticky bottom) */
.deeplink-action {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 24px max(24px, env(safe-area-inset-bottom, 24px)) 24px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.95) 35%, #000 100%);
    z-index: 100;
}

.cta-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    background: linear-gradient(180deg, #FF2A3D 0%, #C8101F 100%);
    border-radius: 27px;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
    text-decoration: none;
    box-shadow: 0 10px 24px -4px rgba(237, 27, 46, 0.5);
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.cta-primary:active { transform: scale(0.98); }
.cta-primary i { font-size: 16px; }

.cta-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
}

.cta-divider::before, .cta-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
}

.cta-divider span {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.5);
}

.cta-store-row {
    display: flex;
    gap: 10px;
}

.cta-store-row a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    height: 46px;
    background: #0F0F0F;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease;
}

.cta-store-row a:active, .cta-store-row a:hover { background: #1A1A1A; }

.store-text { display: flex; flex-direction: column; line-height: 1; gap: 1px; }
.store-text-upper { font-size: 7px; font-weight: 500; letter-spacing: 1px; color: rgba(255,255,255,0.5); text-transform: uppercase; }
.store-text-lower { font-size: 13px; font-weight: 600; color: #fff; }
.cta-store-row i { font-size: 18px; }

/* PER-TYPE THEMES */
.theme-video {
    --accent: #ED1B2E;
    --mesh-1: #1A0507; --mesh-2: #5C0F1C; --mesh-3: #2C0604;
    --accent-spotlight: rgba(245, 208, 160, 0.27);
}
.theme-short {
    --accent: #F59E0B;
    --mesh-1: #1F1206; --mesh-2: #7A4118; --mesh-3: #33180A;
    --accent-spotlight: rgba(255, 184, 92, 0.27);
}
.theme-news {
    --accent: #3B82F6;
    --mesh-1: #06121F; --mesh-2: #0F315C; --mesh-3: #0A1A2A;
    --accent-spotlight: rgba(92, 168, 255, 0.20);
}
.theme-sosok {
    --accent: #A85CFF;
    --mesh-1: #150A1F; --mesh-2: #3D1A5C; --mesh-3: #1F0E33;
    --accent-spotlight: rgba(168, 92, 255, 0.20);
}
.theme-playlist {
    --accent: #ED1B2E;
    --mesh-1: #1F0606; --mesh-2: #5C0F1C; --mesh-3: #2A0810;
    --accent-spotlight: rgba(255, 107, 80, 0.27);
}
.theme-podcast {
    --accent: #22C55E;
    --mesh-1: #06141A; --mesh-2: #0F4A36; --mesh-3: #051A1F;
    --accent-spotlight: rgba(92, 255, 168, 0.20);
}
.theme-live {
    --accent: #EF4444;
    --mesh-1: #26060A; --mesh-2: #8A1626; --mesh-3: #400A14;
    --accent-spotlight: rgba(255, 58, 74, 0.33);
}
.theme-generic {
    --accent: #ED1B2E;
    --mesh-1: #0F0507; --mesh-2: #2A0A0F; --mesh-3: #1F0608;
    --accent-spotlight: rgba(237, 27, 46, 0.20);
}

.deeplink-action, .deeplink-hero { -webkit-tap-highlight-color: transparent; }
