/* TV list page — aligned with book-list / book-detail visual language */

.tv-list {
    --tv-accent: #0d9f6e;
    --tv-accent-soft: rgba(13, 159, 110, 0.12);
    --tv-muted: var(--bs-secondary-color, #6c757d);
    --tv-panel-radius: 1rem;
    --tv-card-radius: 1rem;
    --tv-card-border: rgba(0, 0, 0, 0.08);
    --tv-card-shadow: 0 0.35rem 1.1rem rgba(15, 23, 42, 0.06);
    --tv-card-shadow-hover: 0 0.85rem 1.75rem rgba(15, 23, 42, 0.12);
    --tv-hero-bg:
        radial-gradient(ellipse at 12% 20%, rgba(13, 159, 110, 0.18), transparent 50%),
        radial-gradient(ellipse at 88% 10%, rgba(45, 212, 191, 0.08), transparent 42%),
        linear-gradient(145deg, #14201c 0%, #0f1614 48%, #121a22 100%);
}

.tv-list__hero {
    position: static;
    z-index: auto;
    margin-bottom: 1.25rem;
    padding: 1.35rem 1.35rem 1.4rem;
    border-radius: var(--tv-panel-radius);
    border: 1px solid rgba(13, 159, 110, 0.22);
    background: var(--tv-hero-bg);
    color: #e8f5ef;
    box-shadow: var(--tv-card-shadow);
    overflow: hidden;
}

.tv-list__hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.1rem 1.5rem;
}

.tv-list__hero-main {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 16rem;
}

.tv-list__icon {
    flex: 0 0 auto;
    width: 3.35rem;
    height: 3.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: rgba(13, 159, 110, 0.18);
    border: 1px solid rgba(13, 159, 110, 0.35);
    color: #6ee7b7;
    font-size: 1.25rem;
}

.tv-list__title {
    font-size: clamp(1.35rem, 2vw, 1.75rem);
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 0.4rem;
    color: #fff;
}

.tv-list__subtitle {
    margin: 0;
    color: rgba(232, 245, 239, 0.82);
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 38rem;
}

.tv-list__count {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #d1fae5;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    white-space: nowrap;
}

.tv-list__count i {
    color: #6ee7b7;
}

.tv-list__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
    gap: 1.25rem;
}

.tv-list__empty {
    padding: 1.25rem 1.35rem;
    border-radius: var(--tv-panel-radius);
    border: 1px solid var(--tv-card-border);
    background: var(--tv-accent-soft);
    color: #0a7a55;
    margin: 0;
    text-align: center;
}

.tv-list__empty-icon {
    display: block;
    font-size: 1.75rem;
    margin-bottom: 0.65rem;
    opacity: 0.7;
}

.tv-list__pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.tv-list__pagination .page-link {
    border-radius: 0.55rem;
    margin: 0 0.15rem;
}

/* Cards */
.tv-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--tv-card-border);
    border-radius: var(--tv-card-radius);
    background: var(--bs-body-bg, #fff);
    box-shadow: var(--tv-card-shadow);
    overflow: hidden;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.tv-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--tv-card-shadow-hover);
    border-color: rgba(13, 159, 110, 0.28);
}

.tv-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 20%, rgba(13, 159, 110, 0.12), transparent 55%),
        linear-gradient(160deg, #f4f7f5 0%, #e8eef0 100%);
    text-decoration: none;
}

.tv-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.tv-card:hover .tv-card__image {
    transform: scale(1.04);
    filter: brightness(0.88);
}

.tv-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.15), rgba(13, 159, 110, 0.35));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tv-card:hover .tv-card__overlay {
    opacity: 1;
}

.tv-card__play {
    width: 3.25rem;
    height: 3.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--tv-accent);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.28);
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.tv-card:hover .tv-card__play {
    transform: scale(1.06);
}

.tv-card__duration {
    position: absolute;
    bottom: 0.7rem;
    inset-inline-end: 0.7rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.tv-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 0.9rem 1.05rem 1.05rem;
    min-width: 0;
}

.tv-card__title {
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.55;
    margin: 0;
    color: var(--bs-body-color, #212529);
    transition: color 0.15s ease;
}

.tv-card:hover .tv-card__title {
    color: var(--tv-accent);
}

@media (max-width: 575.98px) {
    .tv-list__hero {
        padding: 1.15rem 1.1rem;
    }

    .tv-list__icon {
        width: 2.9rem;
        height: 2.9rem;
        font-size: 1.1rem;
    }

    .tv-list__count {
        width: 100%;
        justify-content: center;
    }
}

/* Dark theme */
[data-bs-theme="dark"] .tv-list {
    --tv-card-border: rgba(255, 255, 255, 0.08);
    --tv-card-shadow: 0 0.45rem 1.25rem rgba(0, 0, 0, 0.28);
    --tv-card-shadow-hover: 0 0.9rem 1.85rem rgba(0, 0, 0, 0.4);
    --tv-accent-soft: rgba(16, 185, 129, 0.12);
}

[data-bs-theme="dark"] .tv-list__hero {
    border-color: rgba(16, 185, 129, 0.28);
    box-shadow: 0 0.55rem 1.35rem rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .tv-list__empty {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.22);
}

[data-bs-theme="dark"] .tv-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
}

[data-bs-theme="dark"] .tv-card__media {
    background:
        radial-gradient(circle at 30% 20%, rgba(16, 185, 129, 0.16), transparent 55%),
        linear-gradient(160deg, #1a2332 0%, #121820 100%);
}

[data-bs-theme="dark"] .tv-card:hover .tv-card__title {
    color: #6ee7b7;
}

[data-bs-theme="dark"] .tv-card__play {
    background: #121820;
    color: #6ee7b7;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.45);
}
