/* Kiryoku YouTube/TikTok Playlist – Frontend
   Glassmorphism, dark, theme-konsistent mit dem restlichen Kiryoku-UI. */

.kyp-container {
    --kyp-radius:   16px;
    --kyp-card-bg:  rgba(255, 255, 255, .9);
    --kyp-card-bd:  rgba(255, 255, 255, .7);
    --kyp-text:     #fff;
    --kyp-muted:    rgba(255, 255, 255, .7);
    --kyp-accent:   #c62828;

    max-width: 100%;
    margin: 20px 0 40px;
    color: var(--kyp-text);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Player (Klick-zum-Laden) ─────────────────────────────────────── */
.kyp-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--kyp-radius);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .3);
    cursor: pointer;
    isolation: isolate;
}
.kyp-player:focus-visible {
    outline: 3px solid var(--kyp-accent);
    outline-offset: 2px;
}
.kyp-player__poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kyp-player__play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: transform .2s;
}
.kyp-player__play svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .4));
}
.kyp-player:hover .kyp-player__play { transform: scale(1.08); }
.kyp-player__consent {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, .85), rgba(0, 0, 0, 0));
    font-size: 12px;
    color: rgba(255, 255, 255, .85);
    pointer-events: none;
    line-height: 1.4;
}
.kyp-player__consent a {
    color: #fff;
    text-decoration: underline;
    pointer-events: auto;
}
.kyp-player.is-active .kyp-player__poster,
.kyp-player.is-active .kyp-player__play,
.kyp-player.is-active .kyp-player__consent { display: none; }
.kyp-player iframe,
.kyp-player .tiktok-embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── Info ─────────────────────────────────────────────────────────── */
.kyp-info { margin: 16px 4px 28px; }
.kyp-info__title {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--kyp-text);
}
.kyp-info__desc {
    font-size: 1rem;
    line-height: 1.55;
    color: #000;
    white-space: pre-line;
}

/* ── Grid ─────────────────────────────────────────────────────────── */
.kyp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 12px;
}
.kyp-grid::before,
.kyp-grid::after { content: none !important; display: none !important; }
@media (max-width: 900px) { .kyp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .kyp-grid { grid-template-columns: 1fr; } }

/* ── Card ─────────────────────────────────────────────────────────── */
.kyp-card {
    all: unset;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px;
    background: var(--kyp-card-bg);
    backdrop-filter: blur(20px) saturate(1.3);
    -webkit-backdrop-filter: blur(20px) saturate(1.3);
    border: 1px solid var(--kyp-card-bd);
    border-radius: var(--kyp-radius);
    box-shadow: 0 2px 20px rgba(0, 0, 0, .03);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.kyp-card:hover,
.kyp-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .08);
    border-color: rgba(255, 255, 255, .8);
}
.kyp-card:focus-visible {
    outline: 2px solid var(--kyp-accent);
    outline-offset: 2px;
}
.kyp-card__thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: calc(var(--kyp-radius) - 4px);
    overflow: hidden;
    background: #000;
}
.kyp-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.kyp-card__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 2rem;
    opacity: 0;
    transition: opacity .2s;
}
.kyp-card:hover .kyp-card__overlay,
.kyp-card:focus-visible .kyp-card__overlay { opacity: 1; }
.kyp-card__badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, .85);
    color: #fff;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}
.kyp-card__title {
    padding: 4px 6px 6px;
    font-size: .95rem;
    font-weight: 600;
    line-height: 1.35;
    color: #000;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* ── Pagination ───────────────────────────────────────────────────── */
.kyp-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
}
.kyp-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--kyp-card-bg);
    border: 1px solid var(--kyp-card-bd);
    border-radius: 999px;
    color: #000 !important;
    text-decoration: none;
    font-weight: 600;
    transition: background .15s, border-color .15s;
}
.kyp-pagination__link:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .18);
    color: #000 !important;
}
.kyp-pagination__link.is-active {
    background: var(--kyp-accent);
    border-color: var(--kyp-accent);
    color: #fff !important;
}

.kyp-empty {
    padding: 24px;
    text-align: center;
    color: var(--kyp-muted);
}
