/* Episode Detail Page — Card-based layout */

/* ========================================
   BREADCRUMB
   ======================================== */

.ep-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--theme-surface-soft);
    border: 1px solid var(--theme-border);
    border-radius: 20px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--theme-muted);
}

.ep-breadcrumb a {
    color: var(--theme-text-soft);
    text-decoration: none;
    padding: 3px 10px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ep-breadcrumb a:hover {
    background: var(--theme-accent);
    border-color: var(--theme-accent);
    color: var(--theme-on-accent);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-accent) 25%, transparent);
}

.ep-breadcrumb-sep {
    color: #bbb;
    font-size: 14px;
    line-height: 1;
    user-select: none;
}

.ep-breadcrumb-current {
    color: var(--theme-accent);
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* ========================================
   HERO CARD
   ======================================== */

.ep-hero {
    background: var(--theme-surface);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 12px;
}

.ep-hero-top {
    display: flex;
    gap: 0;
}

.ep-hero-thumb {
    flex: 0 0 160px;
    width: 160px;
    min-height: 160px;
    overflow: hidden;
    background-image: linear-gradient(to right bottom, #ff00f0, #d800f0, #ad00f0, #780dee, #121ceb);
    position: relative;
}

.ep-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ep-hero-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-on-media);
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    padding: 10px;
    word-break: break-word;
    line-height: 1.3;
}

.ep-hero-info {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ep-hero-badge {
    display: inline-block;
    background: var(--theme-accent);
    color: var(--theme-on-accent);
    font-size: 12px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 6px;
    letter-spacing: 0.4px;
    align-self: flex-start;
}

.ep-hero-badge.extras {
    background: var(--theme-muted);
}

.ep-hero-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--theme-text);
    line-height: 1.3;
    margin: 0 0 6px;
}

.ep-hero-series {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.ep-hero-series a {
    color: var(--theme-accent);
    text-decoration: none;
}

.ep-hero-series a:hover {
    text-decoration: underline;
}

.ep-hero-date {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.ep-hero-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}

.ep-hero-rating .material-icons {
    font-size: 16px;
    color: var(--status-rating-star);
}

/* ========================================
   DETAILS (plot, cast, crew)
   ======================================== */

.ep-hero-details {
    padding: 0 16px 14px;
    border-top: 1px solid var(--theme-border);
}

.ep-hero-details-toggle {
    font-size: 12px;
    color: var(--theme-accent);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    padding: 8px 0 4px;
}

.ep-hero-details-toggle:hover {
    text-decoration: underline;
}

.ep-hero-details-toggle .material-icons {
    font-size: 16px;
    vertical-align: middle;
}

.ep-hero-details-body {
    display: none;
    font-size: 13px;
    color: #555;
    line-height: 1.6;
    padding-top: 4px;
    font-weight: normal;
    animation: epDetailSlide 0.2s ease-out;
}

.ep-hero-details-body.is-visible {
    display: block;
}

.ep-hero-details-body b {
    color: var(--theme-text-soft);
}

/* ========================================
   DOWNLOAD BUTTONS
   ======================================== */

.ep-downloads {
    margin-bottom: 12px;
}

.ep-dl-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    margin-bottom: 6px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.ep-dl-btn .material-icons {
    font-size: 20px;
}

.ep-dl-btn-primary {
    background: linear-gradient(135deg, var(--theme-accent), #e74c3c);
    color: var(--theme-on-media);
    box-shadow: 0 3px 12px color-mix(in srgb, var(--theme-accent) 30%, transparent);
}

.ep-dl-btn-primary:hover {
    background: linear-gradient(135deg, var(--theme-accent-hover), #c0392b);
    transform: translateY(-1px);
    box-shadow: 0 5px 16px color-mix(in srgb, var(--theme-accent) 40%, transparent);
}

.ep-dl-btn-secondary {
    background: var(--theme-surface);
    color: var(--theme-accent);
    border: 2px solid var(--theme-accent);
}

.ep-dl-btn-secondary:hover {
    background: var(--theme-accent);
    color: var(--theme-on-accent);
    transform: translateY(-1px);
    box-shadow: 0 3px 12px color-mix(in srgb, var(--theme-accent) 25%, transparent);
}

.ep-dl-btn-app {
    background: var(--theme-surface);
    color: var(--theme-text);
    border: 2px solid var(--theme-border);
}

.ep-dl-btn-app:hover {
    border-color: var(--theme-text);
    transform: translateY(-1px);
}

.ep-dl-btn-app .material-icons {
    color: var(--status-ok-solid);
}

.ep-dl-size {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.85;
}

.ep-dl-btn-primary .ep-dl-size {
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 8px;
}

.ep-dl-btn-secondary .ep-dl-size {
    color: #888;
}

/* ========================================
   REPORT ISSUE BUTTON
   ======================================== */

.ep-report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 16px;
    background: var(--theme-surface-soft);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    color: #666;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    margin-bottom: 12px;
}

.ep-report-btn:hover {
    background: var(--theme-surface);
    border-color: var(--status-bad-solid);
    color: var(--status-bad-text);
}

.ep-report-btn .material-icons {
    font-size: 18px;
}

/* Report panel inside episode page */
.ep-page-report {
    margin-bottom: 12px;
}

/* ========================================
   NEXT / PREVIOUS NAVIGATION
   ======================================== */

.ep-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ep-nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--theme-surface);
    border: 1px solid var(--theme-border);
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    overflow: hidden;
}

.ep-nav-link:hover {
    border-color: var(--theme-accent);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--theme-accent) 12%, transparent);
}

.ep-nav-link .material-icons {
    color: var(--theme-accent);
    font-size: 20px;
    flex-shrink: 0;
}

.ep-nav-link-next {
    flex-direction: row-reverse;
    text-align: right;
}

.ep-nav-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ep-nav-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-nav-text {
    flex: 1;
    min-width: 0;
}

/* ========================================
   SEASON PILLS ON EPISODE PAGE
   ======================================== */

.ep-page-seasons {
    margin-bottom: 12px;
}

/* ========================================
   MORE EPISODES SCROLLER SECTION
   ======================================== */

.ep-more-episodes {
    margin-bottom: 12px;
}

/* ========================================
   FORMAT QUALITY NOTE
   ======================================== */

.ep-format-note {
    text-align: center;
    font-size: 12px;
    color: #888;
    font-style: italic;
    padding: 4px 0 8px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 400px) {
    .ep-breadcrumb {
        padding: 6px 10px;
        gap: 4px;
        font-size: 11px;
    }
    .ep-breadcrumb a {
        padding: 2px 8px;
        font-size: 11px;
    }
    .ep-breadcrumb-current {
        max-width: 140px;
    }

    .ep-hero-thumb {
        flex: 0 0 35%;
        width: 35%;
        min-height: 100px;
    }
    .ep-hero-info {
        padding: 10px 12px;
    }
    .ep-hero-title {
        font-size: 14px;
    }
    .ep-hero-badge {
        font-size: 11px;
    }

    .ep-dl-btn {
        padding: 12px 14px;
        font-size: 13px;
    }

    .ep-nav {
        flex-direction: column;
    }
}

@media (min-width: 401px) and (max-width: 600px) {
    .ep-hero-thumb {
        flex: 0 0 135px;
        width: 135px;
        min-height: 135px;
    }
}

@media (min-width: 601px) {
    .ep-hero-thumb {
        flex: 0 0 180px;
        width: 180px;
        min-height: 180px;
    }
    .ep-hero-title {
        font-size: 18px;
    }
    .ep-hero-info {
        padding: 18px 20px;
    }
}
