/* YouTube section: archive, genre and channel pages, cards, the single page additions.
   Follows the theme's light mode and its dark mode (body.dark); pink (#c71786) marks what is active. */

:root {
    --yt-text: #1d1d1f;
    --yt-muted: rgba(0, 0, 0, .58);
    --yt-surface: rgba(0, 0, 0, .04);
    --yt-border: rgba(0, 0, 0, .12);
    --yt-thumb: #e4e4e7;
    --yt-active: #c71786;
}
body.dark {
    --yt-text: #f1f1f1;
    --yt-muted: rgba(255, 255, 255, .6);
    --yt-surface: rgba(255, 255, 255, .05);
    --yt-border: rgba(255, 255, 255, .14);
    --yt-thumb: #1b1b1b;
    --yt-active: #ff4fb7;
}

.yt-page { padding-bottom: 3rem; }

/* ---------- Hero ---------- */
.yt-hero {
    position: relative;
    overflow: hidden;
    margin: 1.5rem auto 1.25rem;
    width: 1600px;
    max-width: 95%;
    border-radius: 22px;
    background: radial-gradient(120% 140% at 85% 0%, #7a0f55 0%, #3d0a2c 45%, #161016 100%);
}
.yt-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .35));
    pointer-events: none;
}
.yt-hero .main { width: 100%; max-width: 100%; }
.yt-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.6rem 2.8rem;
}
.yt-hero-title { margin: 0; font-size: 2rem; font-weight: 800; color: #fff; line-height: 1.5; }
.yt-hero-sub { margin: .6rem 0 0; font-size: 1.05rem; color: rgba(255, 255, 255, .72); line-height: 1.9; }
.yt-hero-logo {
    flex: 0 0 auto;
    width: 150px;
    height: 104px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #a51e78, #5c0c42);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .15);
    transform: rotate(-8deg);
}
.yt-hero-logo i { font-size: 3rem; color: #fff; opacity: .92; margin-right: -.3rem; }
.yt-kicker { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; color: rgba(255, 255, 255, .7); margin-bottom: .3rem; }
.yt-kicker i { color: #ff3d3d; }

/* Channel header */
.yt-channel-hero .yt-hero-inner { justify-content: flex-start; }
.yt-channel-avatar {
    flex: 0 0 auto;
    width: 116px;
    height: 116px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(255, 255, 255, .18);
    background: #2a1a24;
    display: flex;
    align-items: center;
    justify-content: center;
}
.yt-channel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.yt-channel-avatar span { font-size: 2.6rem; font-weight: 800; color: #fff; }
.yt-channel-hero .yt-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1.2rem;
    border-radius: 12px;
    background: #c71786;
    color: #fff !important;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.yt-btn:hover { background: #a5126f; }
.yt-btn i.fa-youtube { color: #fff; }
.yt-btn.ghost i.fa-youtube { color: #ff2b2b; transition: color .2s; }
.yt-btn.ghost:hover i.fa-youtube { color: #fff; }
.yt-btn.ghost { background: var(--yt-surface); color: var(--yt-text) !important; border: 1px solid var(--yt-border); }
.yt-btn.ghost:hover { background: #c71786; border-color: #c71786; color: #fff !important; }
.yt-hero .yt-btn.ghost { background: rgba(255, 255, 255, .08); color: #fff !important; border-color: rgba(255, 255, 255, .2); }
.yt-btn.sm { padding: .4rem .8rem; font-size: .85rem; border-radius: 10px; }

/* ---------- Chips ---------- */
.yt-chips {
    display: flex;
    gap: .6rem;
    overflow-x: auto;
    padding: .25rem 0 1.25rem;
    scrollbar-width: none;
}
.yt-chips::-webkit-scrollbar { display: none; }
.yt-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem 1.05rem;
    border-radius: 12px;
    border: 1px solid var(--yt-border);
    background: var(--yt-surface);
    color: var(--yt-muted) !important;
    font-size: .92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .2s, background .2s, color .2s;
}
.yt-chip:hover { border-color: rgba(199, 23, 134, .7); color: var(--yt-text) !important; }
.yt-chip.active { background: rgba(199, 23, 134, .14); border-color: #c71786; color: var(--yt-active) !important; font-weight: 700; }
.yt-chip.sort i { color: var(--yt-active); }

/* ---------- Grid and cards ---------- */
.yt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.6rem 1.25rem;
}
.yt-card { min-width: 0; }
.yt-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: var(--yt-thumb);
}
.yt-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.yt-card:hover .yt-card-thumb img { transform: scale(1.05); }
.yt-card-noimg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; color: var(--yt-muted); opacity: .5; }
.yt-duration {
    position: absolute;
    left: .5rem;
    bottom: .5rem;
    padding: .1rem .45rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    direction: ltr;
    letter-spacing: .02em;
}
.yt-badges { position: absolute; top: .5rem; right: .5rem; display: flex; gap: .3rem; }
.yt-badge { padding: .1rem .45rem; border-radius: 6px; background: rgba(199, 23, 134, .88); color: #fff; font-size: .72rem; }
.yt-play {
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(199, 23, 134, .9);
    color: #fff;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .25s, transform .25s;
}
.yt-card:hover .yt-play { opacity: 1; transform: scale(1); }
.yt-card-body { display: flex; gap: .75rem; padding-top: .75rem; align-items: flex-start; }
.yt-avatar {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: #6b6b75;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.yt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.yt-avatar.lg { width: 48px; height: 48px; font-size: 1.2rem; }
.yt-card-text { min-width: 0; flex: 1; }
.yt-card-title { margin: 0; font-size: .98rem; font-weight: 700; line-height: 1.7; }
.yt-card-title a {
    color: var(--yt-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.yt-card-title a:hover { color: var(--yt-active); }
.yt-card-meta { display: flex; align-items: center; gap: .6rem; margin-top: .3rem; font-size: .84rem; color: var(--yt-muted); flex-wrap: wrap; }
.yt-channel-name { color: var(--yt-muted) !important; text-decoration: none; }
.yt-channel-name:hover { color: var(--yt-text) !important; }
.yt-views i { font-size: .65rem; margin-left: .15rem; }

.yt-pagination { display: flex; justify-content: center; gap: .4rem; margin-top: 2.4rem; flex-wrap: wrap; }
.yt-pagination .page-numbers {
    min-width: 40px;
    height: 40px;
    padding: 0 .6rem;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--yt-surface);
    color: var(--yt-text);
    text-decoration: none;
}
.yt-pagination .page-numbers.current, .yt-pagination .page-numbers:hover { background: #c71786; color: #fff; }
.yt-pagination .dots { background: none; }

.yt-empty { text-align: center; padding: 4rem 1rem; color: var(--yt-muted); }
.yt-empty i { font-size: 3rem; opacity: .4; }

/* ---------- Sections (single page, search) ---------- */
.yt-section { margin: 2.2rem 0; }
.yt-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; }
.yt-section-title { margin: 0; font-size: 1.15rem; color: var(--yt-text); display: flex; align-items: center; gap: .5rem; }
.yt-section-title .fa-youtube { color: #ff2b2b; }
.yt-more { color: var(--yt-muted); text-decoration: none; font-size: .9rem; white-space: nowrap; }
.yt-more:hover { color: var(--yt-active); }

/* ---------- Single page additions ---------- */
/* A 16:9 thumbnail instead of the movie poster column */
.main-single .movies-h-single.yt-single .movies-h-info .thumb { width: 400px; max-width: 100%; }
.main-single .movies-h-single.yt-single .movies-h-info .thumb .post-image { height: auto; aspect-ratio: 16 / 9; border-radius: 16px; }
.main-single .movies-h-single.yt-single .movies-h-info .thumb .post-image img { object-fit: cover; }
.main-single .movies-h-single.yt-single .movies-h-info .thumb .post-image .yt-duration { left: .7rem; bottom: .7rem; font-size: .85rem; }
.main-single .movies-h-single.yt-single .movies-h-info .left-h-content { flex: 1; min-width: 0; padding-right: 2rem; }
.yt-original-title { margin: .25rem 0 0; color: var(--yt-muted); font-size: .95rem; }
.yt-channel-row {
    display: flex;
    align-items: center;
    gap: .8rem;
    margin: 0 0 1.2rem;
    padding: .7rem .9rem;
    border-radius: 14px;
    background: var(--yt-surface);
    border: 1px solid var(--yt-border);
    width: fit-content;
    max-width: 100%;
}
.yt-channel-text { display: flex; flex-direction: column; min-width: 0; }
.yt-channel-text .yt-channel-name { color: var(--yt-text) !important; font-weight: 700; }
.yt-channel-count { font-size: .8rem; color: var(--yt-muted); }
.yt-single .post-btns { display: flex; gap: .7rem; flex-wrap: wrap; align-items: center; }
.yt-body .yt-description { margin-top: 1.5rem; }

@media (max-width: 768px) {
    .yt-hero-inner { padding: 1.8rem 1.4rem; }
    .yt-hero-title { font-size: 1.45rem; }
    .yt-hero-logo { display: none; }
    .yt-channel-hero .yt-hero-inner { flex-direction: column; text-align: center; }
    .yt-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.2rem .9rem; }
}
.yt-single .post-btns .btn.yt-original i.fa-youtube { color: #ff2b2b; }
@media (max-width: 992px) {
    .main-single .movies-h-single.yt-single .movies-h-info .thumb { width: 100%; }
    .main-single .movies-h-single.yt-single .movies-h-info .left-h-content { padding-right: 0; }
}
