/* Episode Card — files.php episode list */

.ep-card {
    display: flex;
    position: relative;
    background: var(--theme-surface);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    margin-bottom: 8px;
    transition: box-shadow 0.2s ease;
}

.ep-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
}

/* Thumbnail — 16:9 aspect, fixed width */

.ep-card-thumb {
    flex: 0 0 130px;
    width: 130px;
    height: 130px;
    overflow: hidden;
    background-image: linear-gradient(to right bottom, #ff00f0, #d800f0, #ad00f0, #780dee, #121ceb);
    position: relative;
}

.ep-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ep-card-thumb-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--theme-on-media);
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    padding: 6px;
    word-break: break-word;
    line-height: 1.3;
}

/* Content area */

.ep-card-body {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ep-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin: 0 0 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ep-card-series {
    font-size: 11px;
    color: #666;
    line-height: 1.3;
    margin: 0 0 4px;
}

/* S01E02 badge */
.ep-card-badge {
    display: inline-block;
    background: var(--theme-accent);
    color: var(--theme-on-accent);
    font-size: 11px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 3px;
    margin-right: 5px;
    letter-spacing: 0.3px;
    vertical-align: middle;
}

.ep-card-badge.extras {
    background: var(--theme-muted);
}

/* Aired date */
.ep-card-date {
    font-size: 11px;
    color: #888;
    margin-top: 2px;
}

/* Format pill buttons row */
.ep-card-formats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
    align-items: center;
}

.ep-card-fmt {
    font-size: 11px;
    font-weight: 600;
    color: var(--theme-accent);
    text-decoration: none;
    padding: 2px 8px;
    border: 1px solid var(--theme-accent);
    border-radius: 3px;
    transition: all 0.2s;
    line-height: 1.4;
}

.ep-card-fmt:hover {
    background: var(--theme-accent);
    color: var(--theme-on-accent);
}

/* "Updating" notice */
.ep-card-updating {
    font-size: 11px;
    color: green;
    font-style: italic;
    margin-top: 3px;
}

/* Show details toggle */
.ep-card-details-toggle {
    font-size: 11px;
    color: var(--theme-accent);
    cursor: pointer;
    text-decoration: none;
    margin-top: 4px;
    display: inline-block;
}
.ep-card-details-toggle:hover {
    text-decoration: underline;
}
.ep-card-details-toggle .material-icons {
    font-size: 14px;
    vertical-align: middle;
}

/* Collapsible detail section */
.ep-card-details {
    display: none;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
    padding: 6px 0 0;
    font-weight: normal;
    animation: epDetailSlide 0.2s ease-out;
}
.ep-card-details.is-visible {
    display: block;
}

@keyframes epDetailSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Report flag — top-right corner */
.ep-card .report-toggle {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: background 0.2s;
}
.ep-card .report-toggle:hover {
    background: rgba(255,255,255,1);
}
.ep-card .report-toggle .material-icons {
    font-size: 14px;
}

/* Report panel inside card */
.ep-card .report-panel {
    margin-top: 6px;
    border-radius: 4px;
}

/* Responsive */

@media (max-width: 400px) {
    .ep-card-thumb {
        flex: 0 0 100px;
        width: 100px;
        height: 100px;
    }
    .ep-card-body {
        padding: 6px 8px;
    }
    .ep-card-title {
        font-size: 12px;
    }
    .ep-card-badge {
        font-size: 10px;
        padding: 1px 5px;
    }
}

@media (min-width: 401px) and (max-width: 600px) {
    .ep-card-thumb {
        flex: 0 0 115px;
        width: 115px;
        height: 115px;
    }
}

@media (min-width: 901px) {
    .ep-card-thumb {
        flex: 0 0 140px;
        width: 140px;
        height: 140px;
    }
    .ep-card-title {
        font-size: 14px;
    }
}
