/* ══════════════════════════════════════════════════════════════════════
   YubeStream  –  gallery.css
   Fully responsive: desktop 3-col, tablet 2-col, mobile 1-col
   IE9+ / VS2012 compatible (no CSS variables, vendor prefixes added)
   ══════════════════════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    margin: 0; padding: 0;
}

/* ── Base ───────────────────────────────────────────────────────────── */
html { font-size: 16px; }

body {
    background: #0d0d14;
    color: #eeedf8;
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.55;
    min-height: 100vh;
}

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }

/* ── Header ─────────────────────────────────────────────────────────── */
.site-header {
    background: #0f0e1c;
    border-bottom: 2px solid #ff3b5c;
    padding: 24px 20px 20px;
}

.header-inner {
    max-width: 1260px;
    margin: 0 auto;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 10px;
}

.logo-icon {
    width: 40px; height: 40px;
    background: #ff3b5c;
    color: #fff;
    border-radius: 8px;
    font-size: 16px;
    line-height: 40px;
    text-align: center;
    display: inline-block;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.logo-text {
    font-size: 1.65rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.5px;
}

.tagline {
    width: 100%;
    color: #6e6e90;
    font-size: .82rem;
    margin-top: 4px;
}

/* ── Content wrap ───────────────────────────────────────────────────── */
.content-wrap {
    max-width: 1260px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

/* ── Status label ───────────────────────────────────────────────────── */
.status-bar { margin-bottom: 14px; }

.status-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #4a4a68;
}

/* ══════════════════════════════════════════════════════════════════════
   PAGER  (used top + bottom)
   ══════════════════════════════════════════════════════════════════════ */
.pager-wrap {
    text-align: center;
    padding: 14px 0;
}

.pager {
    display: inline-block;
    font-size: 0; /* remove inline-block gaps */
}

/* Every pager button = plain <a> rendered by HtmlAnchor */
.pager a.page-btn {
    display: inline-block;
    font-size: .82rem;
    font-weight: 600;
    min-width: 38px;
    height: 38px;
    line-height: 36px;
    padding: 0 12px;
    margin: 3px;
    border: 1px solid #2a2a40;
    border-radius: 7px;
    background: #161622;
    color: #8888aa;
    text-align: center;
    cursor: pointer;
    -webkit-transition: background .18s, color .18s, border-color .18s, -webkit-transform .18s;
            transition: background .18s, color .18s, border-color .18s,         transform .18s;
    vertical-align: middle;
}

.pager a.page-btn:hover {
    background: #1f1f32;
    color: #eeedf8;
    border-color: #ff3b5c;
    -webkit-transform: translateY(-1px);
            transform: translateY(-1px);
}

/* Active / current page */
.pager a.page-btn.active {
    background: #ff3b5c;
    border-color: #ff3b5c;
    color: #fff;
    cursor: default;
    pointer-events: none;
    -webkit-box-shadow: 0 3px 14px rgba(255,59,92,.45);
            box-shadow: 0 3px 14px rgba(255,59,92,.45);
}

.pager .ellipsis {
    display: inline-block;
    font-size: .85rem;
    color: #3a3a58;
    line-height: 38px;
    padding: 0 4px;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════════════════════
   VIDEO GRID  – 3 col desktop / 2 col tablet / 1 col mobile
   Uses inline-block instead of flex for IE9 compat
   ══════════════════════════════════════════════════════════════════════ */
.video-grid {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    margin: 0 -10px;
}

.video-card {
    -ms-flex: 0 0 33.3333%;
        flex: 0 0 33.3333%;
    max-width: 33.3333%;
    padding: 10px;
}

/* ── Card inner ─────────────────────────────────────────────────────── */
.video-card-inner {
    background: #12121e;
    border: 1px solid #252535;
    border-radius: 12px;
    overflow: hidden;
    -webkit-transition: border-color .22s, -webkit-box-shadow .22s, -webkit-transform .22s;
            transition: border-color .22s,         box-shadow .22s,         transform .22s;
    height: 100%;
}

.video-card-inner:hover {
    border-color: rgba(255,59,92,.5);
    -webkit-box-shadow: 0 10px 32px rgba(0,0,0,.55);
            box-shadow: 0 10px 32px rgba(0,0,0,.55);
    -webkit-transform: translateY(-4px);
            transform: translateY(-4px);
}

/* ── Thumbnail – 16:9 via padding trick ─────────────────────────────── */
.thumb-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;   /* 16:9 */
    overflow: hidden;
    background: #1a1a2c;
    cursor: pointer;
}

.thumb {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    -webkit-transition: -webkit-transform .4s ease, opacity .4s ease;
            transition:         transform .4s ease, opacity .4s ease;
}

.thumb-wrap:hover .thumb {
    -webkit-transform: scale(1.06);
            transform: scale(1.06);
    opacity: .5;
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: center;
        justify-content: center;
    opacity: 0;
    -webkit-transition: opacity .25s;
            transition: opacity .25s;
}

.thumb-wrap:hover .play-overlay { opacity: 1; }

.play-btn {
    width: 54px; height: 54px;
    background: #ff3b5c;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 54px;
    text-align: center;
    padding-left: 4px;
    -webkit-box-shadow: 0 4px 20px rgba(255,59,92,.55);
            box-shadow: 0 4px 20px rgba(255,59,92,.55);
}

.duration-badge {
    position: absolute;
    bottom: 7px; right: 8px;
    background: rgba(0,0,0,.78);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: .3px;
}

/* ── Card body ──────────────────────────────────────────────────────── */
.card-body { padding: 14px 15px 17px; }

.video-title {
    font-size: .9rem;
    font-weight: 700;
    line-height: 1.35;
    color: #eeedf8;
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.43em; /* keep grid rows even */
}

.channel-name {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
        align-items: center;
    gap: 6px;
    font-size: .76rem;
    color: #7878a0;
    margin-bottom: 10px;
}

.ch-dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #ff3b5c;
    -ms-flex-negative: 0;
        flex-shrink: 0;
}

.watch-link {
    font-size: .74rem;
    font-weight: 600;
    color: #ff3b5c;
    opacity: .8;
    -webkit-transition: opacity .18s;
            transition: opacity .18s;
}
.watch-link:hover { opacity: 1; text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,.88);
    -ms-flex-align: center;
        align-items: center;
    -ms-flex-pack: center;
        justify-content: center;
    padding: 16px;
}

.modal-overlay.open {
    display: -ms-flexbox;
    display: flex;
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 860px;
    background: #12121e;
    border: 1px solid #2a2a40;
    border-radius: 14px;
    overflow: hidden;
    -webkit-box-shadow: 0 20px 70px rgba(0,0,0,.8);
            box-shadow: 0 20px 70px rgba(0,0,0,.8);
}

.modal-close {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 10;
    width: 32px; height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    line-height: 32px;
    text-align: center;
    -webkit-transition: background .18s;
            transition: background .18s;
}
.modal-close:hover { background: #ff3b5c; }

.iframe-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}
.iframe-wrap iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════════════ */

/* Tablet: 2 columns */
@media (max-width: 960px) {
    .video-card { -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; }
}

/* Large mobile: still 2 columns but smaller pager */
@media (max-width: 640px) {
    .video-card { -ms-flex: 0 0 50%; flex: 0 0 50%; max-width: 50%; }

    .pager a.page-btn {
        min-width: 34px;
        height: 34px;
        line-height: 32px;
        padding: 0 9px;
        font-size: .76rem;
        margin: 2px;
        border-radius: 6px;
    }

    .logo-text { font-size: 1.3rem; }
}

/* Mobile: 1 column */
@media (max-width: 480px) {
    .video-card { -ms-flex: 0 0 100%; flex: 0 0 100%; max-width: 100%; }

    .content-wrap { padding: 16px 10px 50px; }

    .pager a.page-btn {
        min-width: 32px;
        height: 32px;
        line-height: 30px;
        padding: 0 8px;
        font-size: .72rem;
        margin: 2px;
    }

    .site-header { padding: 16px 14px 14px; }
}

/* Very small screens: hide ellipsis middle pages, keep prev/next + active */
@media (max-width: 360px) {
    .pager .ellipsis { display: none; }
}

/* ── Scrollbar (WebKit) ──────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: #0d0d14; }
::-webkit-scrollbar-thumb { background: #252535; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a58; }
