/* ================================================
   VIDEO GALLERY — Modern UI v3
   ================================================ */

/* ---------- HERO ---------- */
.vg-hero {
    color: var(--smoke);
    position: relative;
    overflow: clip;
    padding: 0;
    background:
        radial-gradient(ellipse 800px 500px at 80% 20%, rgba(255,106,43,.10), transparent 60%),
        radial-gradient(ellipse 600px 500px at 10% 80%, rgba(63,143,106,.08), transparent 60%),
        linear-gradient(180deg, var(--ink) 0%, var(--charcoal-2) 40%, var(--charcoal) 100%);
}
.vg-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 85% 15%, rgba(215,38,61,.18), transparent 45%),
        radial-gradient(circle at 100% 90%, rgba(240,192,32,.10), transparent 40%);
    pointer-events: none;
}
.vg-hero .container {
    position: relative;
    z-index: 1;
    padding: 80px 24px 64px;
}
.vg-hero .section-kicker { color: var(--amber); }
.vg-hero .section-kicker::before { background: var(--amber); }
.vg-hero h1 {
    font-family: var(--font-bn);
    font-weight: 900;
    font-size: clamp(32px, 4.6vw, 52px);
    line-height: 1.15;
    color: var(--smoke);
    margin-bottom: 14px;
}
.vg-hero p {
    font-size: 17px;
    color: rgba(247,247,244,.65);
    max-width: 520px;
}

/* Back */
.vg-back { padding: 20px 0 0; }
.vg-back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255,253,246,.55);
    font-size: 14px;
    text-decoration: none;
    transition: color .15s;
}
.vg-back a:hover { color: var(--amber); }

/* ---------- MAIN ---------- */
.vg-main {
    padding: 0 0 80px;
    background: var(--paper-white);
}

/* ---------- TOOLBAR ---------- */
.vg-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 32px 0 28px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 32px;
}

/* Stats */
.vg-stats {
    display: flex;
    gap: 24px;
}
.vg-stat {
    text-align: center;
}
.vg-stat-num {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    display: block;
}
.vg-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--steel);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 4px;
    display: block;
}

/* Filter Pills */
.vg-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.vg-pill {
    padding: 7px 18px;
    border: 1px solid var(--line);
    border-radius: 100px;
    background: transparent;
    color: var(--steel);
    font-family: var(--font-bn);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.vg-pill:hover {
    border-color: var(--ink);
    color: var(--ink);
}
.vg-pill.active {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--smoke);
}

/* ---------- FEATURED ---------- */
.vg-featured-wrap {
    margin-bottom: 40px;
    position: relative;
}
/* Animated gradient border */
.vg-featured-wrap::before {
    content: "";
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--amber), var(--alarm), var(--ink), var(--amber));
    background-size: 300% 300%;
    animation: vgGradient 4s ease infinite;
    z-index: -1;
    opacity: 0;
    transition: opacity .4s ease;
}
.vg-featured-wrap:hover::before {
    opacity: 1;
}
@keyframes vgGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.vg-featured {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    aspect-ratio: 16/9;
    background: var(--ink);
}
.vg-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .7s cubic-bezier(.22,1,.36,1), filter .5s ease;
}
.vg-featured .vg-uploaded-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}
.vg-featured:hover img {
    transform: scale(1.03);
    filter: brightness(.6);
}

/* Featured Play — Ripple */
.vg-featured-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.vg-featured-play::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.4);
    animation: vgRipple 2s ease-out infinite;
}
.vg-featured-play::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.vg-featured-play svg {
    width: 32px;
    height: 32px;
    fill: var(--ink);
    margin-left: 5px;
    position: relative;
    z-index: 1;
}
.vg-featured:hover .vg-featured-play {
    transform: translate(-50%, -50%) scale(1.12);
}
@keyframes vgRipple {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

.vg-featured-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--alarm);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    padding: 5px 14px;
    z-index: 3;
}
.vg-featured-index {
    position: absolute;
    bottom: 16px;
    left: 16px;
    font-family: var(--font-mono);
    font-size: 60px;
    font-weight: 900;
    color: rgba(255,255,255,.08);
    line-height: 1;
    z-index: 2;
    pointer-events: none;
}
.vg-featured-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 70px 28px 24px;
    background: linear-gradient(transparent, rgba(0,0,0,.8));
    z-index: 2;
}
.vg-featured-info h2 {
    font-family: var(--font-bn);
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 700;
    color: #fff;
    margin: 0;
}

/* ---------- GRID ---------- */
.vg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ---------- CARD ---------- */
.vg-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease, border-color .35s ease;
    opacity: 0;
    transform: translateY(30px);
}
.vg-card.visible {
    opacity: 1;
    transform: translateY(0);
}
.vg-card:hover {
    transform: translateY(-8px);
    border-color: transparent;
    box-shadow:
        0 24px 48px -12px rgba(18,53,36,.2),
        0 0 0 1px rgba(240,192,32,.3);
}

/* Card Number */
.vg-card-num {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 30px;
    height: 30px;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(4px);
    color: var(--amber);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    z-index: 3;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .25s ease, transform .25s ease;
}
.vg-card:hover .vg-card-num {
    opacity: 1;
    transform: translateY(0);
}

/* Thumbnail */
.vg-thumb {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--ink);
}
.vg-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.22,1,.36,1), filter .4s ease;
}
.vg-thumb .vg-uploaded-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}
.vg-card:hover .vg-thumb img {
    transform: scale(1.08);
    filter: brightness(.6);
}

/* Play Button — Pulse */
.vg-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transition: opacity .3s ease, transform .3s cubic-bezier(.22,1,.36,1);
}
.vg-play::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.95);
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.vg-play::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.5);
    opacity: 0;
    transform: scale(.8);
    transition: opacity .3s ease, transform .3s ease;
}
.vg-play svg {
    width: 22px;
    height: 22px;
    fill: var(--ink);
    margin-left: 3px;
    position: relative;
    z-index: 1;
}
.vg-card:hover .vg-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.vg-card:hover .vg-play::after {
    opacity: 1;
    transform: scale(1);
    animation: vgPulse 1.5s ease infinite;
}
@keyframes vgPulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.25); opacity: 0; }
}

/* Duration Badge */
.vg-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,.8);
    backdrop-filter: blur(4px);
    color: #fff;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 3;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .25s ease, transform .25s ease;
}
.vg-card:hover .vg-duration {
    opacity: 1;
    transform: translateY(0);
}

/* Info */
.vg-info {
    padding: 16px 18px 20px;
}
.vg-info h3 {
    font-family: var(--font-bn);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 6px;
    line-height: 1.4;
    transition: color .2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vg-card:hover .vg-info h3 { color: var(--alarm); }
.vg-info p {
    font-size: 12.5px;
    color: var(--steel);
    margin: 0;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Hover Glow */
.vg-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(240,192,32,.08), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.vg-card:hover::after { opacity: 1; }

/* ---------- LIGHTBOX ---------- */
.vg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
    opacity: 0;
    transition: opacity .35s ease;
}
.vg-lightbox.active {
    display: flex;
    opacity: 1;
}
.vg-lightbox-container {
    width: 100%;
    max-width: 960px;
    position: relative;
}
.vg-lightbox-inner {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,.6);
}
.vg-lightbox-inner iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.vg-lightbox-inner video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}
.vg-lightbox-close {
    position: absolute;
    top: -52px;
    right: 0;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all .2s ease;
}
.vg-lightbox-close:hover {
    background: var(--alarm);
    border-color: var(--alarm);
    transform: rotate(90deg);
}
.vg-lightbox-title {
    text-align: center;
    color: rgba(255,255,255,.6);
    font-family: var(--font-bn);
    font-size: 14px;
    margin-top: 16px;
}

/* ---------- SCROLL TOP ---------- */
.vg-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 44px;
    height: 44px;
    background: var(--ink);
    color: var(--amber);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all .3s ease;
    box-shadow: 0 6px 20px rgba(18,53,36,.3);
}
.vg-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.vg-scroll-top:hover {
    background: var(--amber);
    color: var(--ink);
}

/* ---------- EMPTY STATE ---------- */
.vg-empty {
    text-align: center;
    padding: 80px 20px;
}
.vg-empty-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    background: var(--paper);
    border: 2px dashed var(--line);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    animation: vgFloat 3s ease-in-out infinite;
}
@keyframes vgFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.vg-empty h3 {
    font-family: var(--font-bn);
    font-size: 20px;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 8px;
}
.vg-empty p {
    font-size: 14px;
    color: var(--steel);
    margin: 0;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .vg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
    .vg-hero .container { padding: 60px 24px 48px; }
    .vg-main { padding: 0 0 64px; }
    .vg-toolbar { flex-direction: column; align-items: flex-start; }
    .vg-featured-play { width: 68px; height: 68px; }
    .vg-featured-play svg { width: 26px; height: 26px; }
    .vg-featured-index { font-size: 44px; }
    .vg-lightbox { padding: 20px; }
    .vg-lightbox-close { top: -46px; }
    .vg-stat-num { font-size: 22px; }
}
@media (max-width: 640px) {
    .vg-grid { grid-template-columns: 1fr; gap: 16px; }
    .vg-hero .container { padding: 48px 16px 36px; }
    .vg-main { padding: 0 0 48px; }
    .vg-toolbar { padding: 24px 0 20px; }
    .vg-info { padding: 14px 16px 16px; }
    .vg-featured-info { padding: 40px 20px 18px; }
    .vg-lightbox { padding: 10px; }
    .vg-scroll-top { bottom: 20px; right: 20px; }
}
