.mediathek-scout {
    margin-bottom: 3rem;
}

.mediathek-toolbar {
    background-color: var(--card-background);
}

.mediathek-filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.mediathek-genre-select,
.mediathek-topic-select {
    width: min(280px, 100%);
}

.mediathek-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr));
    gap: 1rem;
}

.mediathek-results-series {
    grid-template-columns: 1fr;
}

.mediathek-series-season-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mediathek-series-group {
    display: grid;
    gap: 0.55rem;
}

.mediathek-series-group-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    background: rgba(26, 32, 44, 0.7);
    border-radius: 0.35rem;
}

.mediathek-series-group-title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.25;
}

.mediathek-series-group-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.mediathek-series-group-list {
    display: grid;
    gap: 0.45rem;
}

.mediathek-loading-status {
    overflow: hidden;
}

.mediathek-loading-time,
.mediathek-loading-detail {
    color: #bee3f8;
    font-size: 0.82rem;
}

.mediathek-loading-detail {
    margin-top: 0.25rem;
}

.mediathek-progress {
    position: relative;
    height: 0.35rem;
    margin-top: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(190, 227, 248, 0.22);
}

.mediathek-progress-bar {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -35%;
    width: 35%;
    border-radius: inherit;
    background: #bee3f8;
    animation: mediathek-progress-slide 1.25s ease-in-out infinite;
}

@keyframes mediathek-progress-slide {
    from {
        left: -35%;
    }

    to {
        left: 100%;
    }
}

.mediathek-card {
    display: grid;
    grid-template-columns: clamp(155px, 30%, 190px) minmax(0, 1fr);
    align-items: stretch;
    overflow: hidden;
    background-color: var(--card-background);
    border-radius: 0.35rem;
    box-shadow: var(--shadow-light);
}

.mediathek-poster {
    position: relative;
    min-height: 280px;
    background: #1a202c;
}

.mediathek-poster img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mediathek-poster-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 1rem;
    color: #a0aec0;
    text-align: center;
    font-weight: 600;
}

.mediathek-score {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    background-color: #c05621;
    color: #fff;
    border-radius: 999px;
    padding: 0.25rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
}

.mediathek-select {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 1.5rem;
    height: 1.5rem;
    margin: -0.08rem 0 0;
    border-radius: 999px;
    background: rgba(45, 55, 72, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.mediathek-select input {
    margin: 0;
}

.mediathek-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: 1rem;
}

.mediathek-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}

.mediathek-title {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
    overflow-wrap: anywhere;
}

.mediathek-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.mediathek-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    border-radius: 999px;
    background-color: #1a202c;
    color: #cbd5e0;
    padding: 0.15rem 0.5rem;
    font-size: 0.78rem;
}

.mediathek-tmdb {
    background-color: #b7791f;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.mediathek-watched {
    background-color: #2f855a;
    color: #fff;
    font-weight: 700;
}

.mediathek-tmdb:hover {
    color: #fff;
    background-color: #c05621;
    text-decoration: none;
}

.mediathek-genres,
.mediathek-description {
    overflow-wrap: anywhere;
}

.mediathek-genres {
    color: #a0aec0;
    font-size: 0.86rem;
    margin-bottom: 0.65rem;
}

.mediathek-credits {
    display: grid;
    gap: 0.2rem;
    color: #cbd5e0;
    font-size: 0.84rem;
    line-height: 1.35;
    margin-bottom: 0.65rem;
    overflow-wrap: anywhere;
}

.mediathek-credits strong {
    color: #edf2f7;
}

.mediathek-description {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.mediathek-aria2-lines {
    min-height: 11rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.85rem;
    white-space: pre;
}

.mediathek-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.mediathek-series-card {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
}

.mediathek-series-main {
    min-width: 0;
}

.mediathek-series-card .mediathek-title-row {
    margin-bottom: 0.45rem;
}

.mediathek-series-card .mediathek-meta {
    margin-bottom: 0;
}

.mediathek-series-links {
    flex: 0 0 auto;
    margin-top: 0;
    justify-content: flex-end;
}

@media (max-width: 575.98px) {
    .mediathek-results {
        grid-template-columns: 1fr;
    }

    .mediathek-card {
        grid-template-columns: minmax(135px, 40%) minmax(0, 1fr);
    }

    .mediathek-poster {
        min-height: 240px;
    }

    .mediathek-series-card {
        grid-template-columns: 1fr;
    }

    .mediathek-series-links {
        justify-content: flex-start;
    }
}
