/* ══════════════════════════════════════════
   MY VIDEO GALLERY v3
   ══════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }

.mvg-wrap {
    max-width: 1100px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── GRID ─────────────────────────────────── */
.mvg-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
@media (max-width: 780px) { .mvg-gallery { grid-template-columns: repeat(2, 1fr); gap: 7px; } }
@media (max-width: 420px) { .mvg-gallery { grid-template-columns: repeat(2, 1fr); gap: 5px; } }

/* ── CARD ─────────────────────────────────── */
.mvg-card {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: 8px;
    overflow: hidden;
    background: #111;
    cursor: pointer;
}
.mvg-card.mvg-hidden { display: none; }

/* ── THUMB LAYER ──────────────────────────── */
.mvg-thumb-layer {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: transform 0.35s ease;
}
.mvg-card:hover .mvg-thumb-layer { transform: scale(1.04); }

/* no-thumbnail placeholder */
.mvg-no-thumb {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    font-size: 36px;
    color: rgba(255,255,255,0.25);
}

/* ── HOVER ACTIONS ────────────────────────── */
.mvg-actions {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0,0,0,0.48);
    opacity: 0;
    transition: opacity 0.22s ease;
}
.mvg-card:hover .mvg-actions { opacity: 1; }

.mvg-action-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 2px solid rgba(255,255,255,0.85);
    background: rgba(0,0,0,0.45);
    color: #fff;
    border-radius: 40px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(6px);
    transition: background 0.18s, transform 0.15s;
    letter-spacing: 0.3px;
    min-width: 110px;
    justify-content: center;
}
.mvg-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.mvg-action-btn:hover { background: rgba(255,255,255,0.22); transform: scale(1.05); }
.mvg-inline-play { border-color: #fff; }
.mvg-popup-btn   { border-color: rgba(255,255,255,0.65); background: rgba(0,0,0,0.25); }

/* ── CARD FOOTER ──────────────────────────── */
.mvg-card-footer {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 36px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, transparent 100%);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.mvg-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888);
    display: flex; align-items: center; justify-content: center;
}
.mvg-avatar img { width:100%; height:100%; object-fit:cover; display:block; }
.mvg-av-fallback { color:#fff; font-size:8px; font-weight:700; }
.mvg-card-meta { flex: 1; overflow: hidden; }
.mvg-card-name {
    display: block; color: #fff; font-size: 11px; font-weight: 700;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mvg-card-date  { display: block; color: rgba(255,255,255,0.7); font-size: 10px; margin-top:1px; }

/* ── INLINE VIDEO LAYER ───────────────────── */
.mvg-inline-layer {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 5;
}
.mvg-inline-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.mvg-inline-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 22px 8px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.mvg-ic-btn {
    background: rgba(255,255,255,0.18);
    border: none; color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    text-decoration: none;
    transition: background 0.18s;
}
.mvg-ic-btn:hover { background: rgba(255,255,255,0.32); }
.mvg-ic-progress {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.28);
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
}
.mvg-ic-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 4px;
    pointer-events: none;
}

/* ── LOAD MORE ────────────────────────────── */
.mvg-more-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 28px 0 12px;
}
.mvg-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #222;
    border: 2px solid #ddd;
    padding: 11px 32px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s;
}
.mvg-more-btn:hover { background: #f5f5f5; border-color: #bbb; }
.mvg-more-count { color: #888; font-size: 12px; }

/* ── LIGHTBOX ─────────────────────────────── */
.mvg-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.mvg-lightbox.is-open { display: flex; }

.mvg-lb-bg {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.94);
    cursor: pointer;
}

.mvg-lb-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
}

.mvg-lb-video-box {
    position: relative;
    width: min(350px, 88vw);
    aspect-ratio: 9/16;
    max-height: 88vh;
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    animation: mvgPop 0.22s cubic-bezier(.34,1.56,.64,1);
}
@keyframes mvgPop {
    from { opacity:0; transform:scale(0.9); }
    to   { opacity:1; transform:scale(1); }
}

#mvgLbVideo {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* lightbox close */
.mvg-lb-close {
    position: absolute;
    top: 10px; right: 10px;
    width: 34px; height: 34px;
    background: rgba(0,0,0,0.55);
    border: none; color: #fff;
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    display: flex; align-items:center; justify-content:center;
    backdrop-filter: blur(4px);
    z-index: 2;
    transition: background 0.15s;
}
.mvg-lb-close:hover { background: rgba(255,255,255,0.2); }

/* lightbox nav */
.mvg-lb-nav {
    width: 46px; height: 46px;
    background: rgba(255,255,255,0.14);
    border: none; color: #fff;
    border-radius: 50%;
    font-size: 26px;
    cursor: pointer;
    display: flex; align-items:center; justify-content:center;
    backdrop-filter: blur(4px);
    transition: background 0.15s;
    flex-shrink: 0;
}
.mvg-lb-nav:hover { background: rgba(255,255,255,0.28); }
.mvg-lb-nav:disabled { opacity: 0.25; pointer-events: none; }

/* lightbox controls bar */
.mvg-lb-controls {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88), transparent);
    padding: 26px 12px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.mvg-lb-btn {
    background: rgba(255,255,255,0.18);
    border: none; color: #fff;
    width: 38px; height: 38px;
    border-radius: 50%; font-size: 16px;
    cursor: pointer;
    display: flex; align-items:center; justify-content:center;
    text-decoration: none; flex-shrink: 0;
    transition: background 0.15s;
}
.mvg-lb-btn:hover { background: rgba(255,255,255,0.32); }

.mvg-lb-prog-wrap {
    flex: 1;
    padding: 6px 0;
    cursor: pointer;
}
.mvg-lb-prog-bar {
    height: 4px;
    background: rgba(255,255,255,0.28);
    border-radius: 4px;
    overflow: hidden;
}
.mvg-lb-prog-fill {
    height: 100%;
    width: 0%;
    background: #fff;
    border-radius: 4px;
    pointer-events: none;
    transition: width 0.12s linear;
}

/* lightbox title */
.mvg-lb-title {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
    max-width: min(350px, 88vw);
}

@media (max-width: 520px) {
    .mvg-lb-nav { display: none; }
    .mvg-lb-video-box { width: 94vw; }
}

/* ── SVG ICON SIZING ─────────────────────────────── */
.mvg-ic-btn svg,
.mvg-lb-btn svg,
.mvg-lb-close svg,
.mvg-lb-nav svg {
    width: 20px;
    height: 20px;
    display: block;
    pointer-events: none;
}
.mvg-lb-nav svg {
    width: 22px;
    height: 22px;
}
.mvg-lb-close svg {
    width: 18px;
    height: 18px;
}
/* Remove any default button padding that misaligns SVGs */
.mvg-ic-btn,
.mvg-lb-btn,
.mvg-lb-close,
.mvg-lb-nav {
    padding: 0;
    line-height: 1;
}
