/* ═══════════════════════════════════════════════════════════
   DOWNLOAD SECTION — Modern Vertical Card Design (2025)
   Color Science: Emerald/Teal for trust & action,
   Amber accents for urgency, Violet for premium feel.
   ═══════════════════════════════════════════════════════════ */

/* ── Section Container ─────────────────────────────────── */
.dlx-section {
    margin-bottom: 32px;
}

/* ── Section Header ────────────────────────────────────── */
.dlx-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.dlx-header::before,
.dlx-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(16,185,129,0.35), transparent);
}

.dlx-title {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.06em;
    white-space: nowrap;
    text-align: center;
    background: linear-gradient(135deg, #10b981 0%, #06b6d4 40%, #8b5cf6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
}

.dlx-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    border-radius: 99px;
    background: linear-gradient(90deg, #10b981, #06b6d4);
    opacity: 0.6;
}

/* ── Season Card ───────────────────────────────────────── */
.dlx-season {
    margin-bottom: 18px;
    border-radius: 20px;
    background: linear-gradient(
        145deg,
        rgba(16,185,129,0.03) 0%,
        rgba(6,182,212,0.02) 50%,
        rgba(139,92,246,0.02) 100%
    );
    border: 1px solid rgba(255,255,255,0.06);
    overflow: hidden;
    transition: border-color 0.35s, box-shadow 0.35s;
}

.dlx-season:hover {
    border-color: rgba(16,185,129,0.18);
    box-shadow:
        0 8px 40px rgba(0,0,0,0.3),
        0 0 24px rgba(16,185,129,0.06);
}

/* ── Season Header ─────────────────────────────────────── */
.dlx-season-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: linear-gradient(
        135deg,
        rgba(16,185,129,0.08) 0%,
        rgba(6,182,212,0.05) 100%
    );
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dlx-season-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #fff;
    background: linear-gradient(135deg, #059669 0%, #0891b2 100%);
    box-shadow:
        0 4px 16px rgba(5,150,105,0.35),
        inset 0 1px 0 rgba(255,255,255,0.15);
    position: relative;
    overflow: hidden;
}

.dlx-season-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: dlxBadgeShine 3s ease-in-out infinite;
}

@keyframes dlxBadgeShine {
    0% { left: -80%; }
    60%, 100% { left: 130%; }
}

.dlx-season-badge svg {
    opacity: 0.85;
    flex-shrink: 0;
}

.dlx-season-badge--plain {
    background: linear-gradient(135deg, #4b5563, #6b7280) !important;
    box-shadow: 0 3px 12px rgba(0,0,0,0.3) !important;
}

.dlx-file-count {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ── Episodes Grid — vertical card list ────────────────── */
.dlx-episodes {
    padding: 8px 12px;
}

/* ── Single Episode Card — vertical stacked layout ─────── */
.dlx-ep {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 16px;
    margin: 6px 0;
    border-radius: 14px;
    background: rgba(255,255,255,0.018);
    border: 1px solid rgba(255,255,255,0.04);
    transition:
        background 0.2s,
        border-color 0.2s,
        box-shadow 0.2s,
        transform 0.2s;
    overflow: hidden;
}

.dlx-ep:hover {
    background: rgba(16,185,129,0.03);
    border-color: rgba(16,185,129,0.12);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2), 0 0 12px rgba(16,185,129,0.05);
    transform: translateY(-1px);
}

/* Episode top row: number + language */
.dlx-ep-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* allow wrapping if multiple languages */
    gap: 10px;
    margin-bottom: 12px;
}

.dlx-ep-num {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.dlx-ep-num--pack {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 2px 10px rgba(139, 92, 246, 0.3);
    font-style: normal;
}

.dlx-ep-lang {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(52,211,153,0.15);
    border: 1px solid rgba(52,211,153,0.25);
    color: #34d399;
    white-space: nowrap;
    letter-spacing: 0.04em;
}

/* ── Quality Options — vertical grid ──────────────────── */
.dlx-qualities {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

/* Single quality row — horizontal with download action */
.dlx-q {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.05);
    text-decoration: none;
    transition:
        background 0.18s,
        border-color 0.18s,
        transform 0.18s,
        box-shadow 0.18s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dlx-q:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.2);
}

/* Quality-specific hover accents */
.dlx-q--4k:hover {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.25);
}
.dlx-q--1080:hover {
    background: rgba(139,92,246,0.08);
    border-color: rgba(139,92,246,0.25);
}
.dlx-q--720:hover {
    background: rgba(6,182,212,0.08);
    border-color: rgba(6,182,212,0.25);
}
.dlx-q--480:hover {
    background: rgba(20,184,166,0.08);
    border-color: rgba(20,184,166,0.25);
}
.dlx-q--360:hover {
    background: rgba(107,114,128,0.08);
    border-color: rgba(107,114,128,0.25);
}
.dlx-q--def:hover {
    background: rgba(16,185,129,0.08);
    border-color: rgba(16,185,129,0.25);
}

/* Quality badge pill */
.dlx-q-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #fff;
    min-width: 72px;
    text-align: center;
    flex-shrink: 0;
}

/* Quality-specific badge gradients */
.dlx-q--4k .dlx-q-badge {
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 2px 10px rgba(239,68,68,0.3);
}
.dlx-q--1080 .dlx-q-badge {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    box-shadow: 0 2px 10px rgba(124,58,237,0.3);
}
.dlx-q--720 .dlx-q-badge {
    background: linear-gradient(135deg, #0891b2, #06b6d4);
    box-shadow: 0 2px 10px rgba(6,182,212,0.3);
}
.dlx-q--480 .dlx-q-badge {
    background: linear-gradient(135deg, #0d9488, #14b8a6);
    box-shadow: 0 2px 10px rgba(20,184,166,0.25);
}
.dlx-q--360 .dlx-q-badge {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    box-shadow: 0 2px 10px rgba(107,114,128,0.25);
}
.dlx-q--def .dlx-q-badge {
    background: linear-gradient(135deg, #059669, #10b981);
    box-shadow: 0 2px 10px rgba(16,185,129,0.25);
}

/* Info area: label + size */
.dlx-q-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dlx-q-label {
    font-size: 13px;
    font-weight: 800;
    color: rgba(255,255,255,0.88);
    letter-spacing: 0.02em;
}

.dlx-q-size {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.32);
    font-variant-numeric: tabular-nums;
}

/* Download icon arrow on right */
.dlx-q-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(16,185,129,0.12), rgba(6,182,212,0.08));
    border: 1px solid rgba(16,185,129,0.15);
    color: #34d399;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.dlx-q:hover .dlx-q-icon {
    background: linear-gradient(135deg, #059669, #0891b2);
    color: #fff;
    transform: translateY(2px);
    box-shadow: 0 4px 14px rgba(5,150,105,0.4);
}

/* Download arrow bounce animation */
.dlx-q-icon svg {
    transition: transform 0.2s;
}
.dlx-q:hover .dlx-q-icon svg {
    animation: dlxArrowBounce 0.6s ease infinite;
}
@keyframes dlxArrowBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(3px); }
}

/* ── Divider line between episodes ─────────────────────── */
.dlx-ep + .dlx-ep {
    margin-top: 4px;
}

/* ═════════════════════════════════════════════════════════
   RESPONSIVE
   ═════════════════════════════════════════════════════════ */

/* ── Large screens: 2 columns for quality options ─────── */
@media (min-width: 640px) {
    .dlx-qualities {
        grid-template-columns: repeat(2, 1fr);
    }

    .dlx-episodes {
        padding: 10px 16px;
    }

    .dlx-ep {
        padding: 18px 20px;
    }
}

/* ── Medium screens: max-width for readability ───────── */
@media (min-width: 768px) {
    .dlx-season {
        max-width: 100%;
    }
}

/* ── Mobile ──────────────────────────────────────────── */
@media (max-width: 639px) {
    .dlx-header {
        gap: 10px;
        margin-bottom: 18px;
    }

    .dlx-title {
        font-size: 20px;
    }

    .dlx-season {
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .dlx-season-head {
        padding: 12px 16px;
    }

    .dlx-season-badge {
        font-size: 12px;
        padding: 7px 16px;
    }

    .dlx-episodes {
        padding: 6px 8px;
    }

    .dlx-ep {
        padding: 14px 12px;
        margin: 4px 0;
        border-radius: 12px;
    }

    .dlx-ep-num {
        font-size: 14px;
    }

    .dlx-q {
        padding: 9px 12px;
        gap: 10px;
    }

    .dlx-q-badge {
        min-width: 62px;
        font-size: 10px;
        padding: 4px 10px;
    }

    .dlx-q-label {
        font-size: 12px;
    }

    .dlx-q-icon {
        width: 32px;
        height: 32px;
        border-radius: 8px;
    }
}

/* ── Ultra small ─────────────────────────────────────── */
@media (max-width: 380px) {
    .dlx-title {
        font-size: 18px;
        letter-spacing: 0.03em;
    }

    .dlx-season-badge {
        font-size: 11px;
        padding: 6px 14px;
    }

    .dlx-ep {
        padding: 12px 10px;
    }

    .dlx-q {
        padding: 8px 10px;
    }

    .dlx-q-badge {
        min-width: 56px;
        font-size: 9.5px;
    }
}
