/* ==========================================================================
   Archive & Listing Pages (Latest & Popular)
   ========================================================================== */

.archive-badge {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(229, 9, 20, 0.15);
    color: var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
}

.movie-list-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 18px;
}

.movie-row-card {
    display: flex;
    flex-direction: row;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition:
        transform var(--transition-fast),
        border-color var(--transition-fast),
        box-shadow var(--transition-fast);
}

.movie-row-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

/* Poster */
.row-poster-wrap {
    flex: 0 0 160px;
    position: relative;
    background: var(--bg-card-hover);
    overflow: hidden;
}

.row-poster-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card content */
.row-content {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.row-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.row-title-fa {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
}

.row-title-fa a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.row-title-fa a:hover {
    color: var(--accent);
}

.row-title-en {
    color: var(--text-muted);
    font-size: 0.85rem;
    direction: ltr;
    text-align: right;
}

.row-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(245, 197, 24, 0.15);
    color: var(--gold);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
}

/* Genres */
.row-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.genre-tag {
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
}

/* Plot */
.row-plot {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.7;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Card footer */
.row-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.row-meta-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.quality-badge {
    padding: 2px 7px;
    background: #1e3a5f;
    color: #64b5f6;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Pagination */
.pagination-nav {
    display: flex;
    justify-content: center;
    margin: 40px 0 20px;
}

.pagination {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-decoration: none;
    transition:
        background var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.pagination li.active span {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    font-weight: 700;
}

.pagination li a:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

.pagination li.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Mobile */
@media (max-width: 640px) {
    .movie-row-card {
        flex-direction: column;
    }

    .row-poster-wrap {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 3;
    }

    .row-poster-wrap img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: #000;
    }

    .row-content {
        padding: 14px;
    }

    .row-plot {
        -webkit-line-clamp: 2;
    }
}
