/* ============================================================================
   VIDEO PAGE v2.0 — Showreel cinematográfico premium
   ============================================================================ */

/* ============ BARRA DE METADATA SUPERIOR ============ */
.showreel-meta-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 16px 22px;
    background: linear-gradient(135deg,
        rgba(168, 85, 247, 0.06) 0%,
        rgba(6, 182, 212, 0.06) 100%);
    border: 1px solid var(--c-border);
    border-radius: var(--r-md);
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.srm-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.srm-stat-num {
    font-family: var(--f-title);
    font-size: 22px;
    font-weight: 800;
    color: var(--c-accent);
    letter-spacing: -0.02em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.srm-stat-label {
    font-family: var(--f-mono);
    font-size: 10px;
    color: var(--c-muted);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
}

.srm-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg, transparent, var(--c-border), transparent);
}

.live-dot {
    font-size: 8px;
    color: #EF4444;
    animation: live-blink 1.4s ease-in-out infinite;
    text-shadow: 0 0 8px #EF4444;
}

@keyframes live-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

/* ============ VIDEO STAGE PRO ============ */
.video-stage-pro {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 30px;
    align-items: stretch;
    padding: 28px;
    background:
        radial-gradient(circle at 0% 0%, rgba(168, 85, 247, 0.08), transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(6, 182, 212, 0.08), transparent 50%),
        linear-gradient(135deg, var(--c-card) 0%, var(--c-bg-3) 100%);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-xl);
    box-shadow: var(--s-lg);
    position: relative;
    overflow: hidden;
    margin-bottom: 36px;
    isolation: isolate;
}

.video-stage-pro::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--r-xl);
    background: linear-gradient(135deg, var(--c-accent), transparent 50%, var(--c-accent-2));
    z-index: -1;
    opacity: 0.35;
    filter: blur(18px);
    animation: vp-pulse 6s ease-in-out infinite alternate;
}

@keyframes vp-pulse {
    0%   { opacity: 0.25; }
    100% { opacity: 0.55; }
}

/* ============ PLAYER WRAP con esquinas cinematográficas independientes ============ */
.video-stage-player-wrap {
    position: relative;
    border-radius: var(--r-md);
}

.vsp-corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--c-accent);
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 0 6px var(--c-accent-glow));
    animation: corner-glow 3s ease-in-out infinite alternate;
}

@keyframes corner-glow {
    from { filter: drop-shadow(0 0 4px var(--c-accent-glow)); }
    to   { filter: drop-shadow(0 0 12px var(--c-accent-glow)); }
}

.vsp-tl { top: -2px; left: -2px;  border-right: 0; border-bottom: 0; border-top-left-radius: 8px; }
.vsp-tr { top: -2px; right: -2px; border-left:  0; border-bottom: 0; border-top-right-radius: 8px; }
.vsp-bl { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 8px; }
.vsp-br { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 8px; }

/* Player con aspect 16/9 */
.video-stage-player {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--r-md);
    overflow: hidden;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255,255,255,0.04);
}

.video-stage-player iframe {
    width: 100%; height: 100%;
    border: 0;
    display: block;
}

/* ============================================================
   FACEPLATE LAZY v26.0 — Carga instantánea del Showreel
   El iframe de Vimeo NO se carga hasta pulsar play.
   ============================================================ */
.vsp-player-slot {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.vsp-player-slot iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.vsp-faceplate {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: #05070d;
    overflow: hidden;
    -webkit-tap-highlight-color: transparent;
}
.vsp-faceplate[hidden] { display: none; }

.vsp-faceplate-img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform .6s cubic-bezier(.22,1,.36,1), opacity .4s ease;
    opacity: 0;
}
.vsp-faceplate-img.is-loaded { opacity: 1; }
.vsp-faceplate:hover .vsp-faceplate-img { transform: scale(1.04); }

.vsp-faceplate-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 45%, transparent 30%, rgba(0,0,0,0.45) 100%),
        linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.55) 100%);
}

.vsp-faceplate-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: clamp(64px, 9vw, 88px);
    height: clamp(64px, 9vw, 88px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(22px, 3vw, 30px);
    color: #fff;
    background: linear-gradient(135deg, var(--c-accent, #D4AF37), var(--c-accent-2, #E8C766));
    box-shadow:
        0 10px 30px rgba(0,0,0,0.45),
        0 0 0 0 rgba(212,175,55,0.55);
    transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .35s ease;
    animation: vspPlayPulse 2.4s ease-in-out infinite;
}
.vsp-faceplate-play i { margin-left: 4px; }
.vsp-faceplate:hover .vsp-faceplate-play {
    transform: translate(-50%, -50%) scale(1.08);
}
@keyframes vspPlayPulse {
    0%, 100% { box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 0 0 rgba(212,175,55,0.45); }
    50%      { box-shadow: 0 10px 30px rgba(0,0,0,0.45), 0 0 0 14px rgba(212,175,55,0.0); }
}

.vsp-faceplate-hint {
    position: absolute;
    left: 50%;
    bottom: clamp(14px, 3vw, 22px);
    transform: translateX(-50%);
    font-family: var(--f-body, 'Inter', sans-serif);
    font-size: clamp(11px, 1.6vw, 13px);
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(255,255,255,0.92);
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
    background: rgba(0,0,0,0.32);
    backdrop-filter: blur(6px);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.14);
}

/* Spinner mientras el reproductor de Vimeo carga */
.vsp-loading .vsp-faceplate-play {
    animation: none;
    background: rgba(255,255,255,0.10);
}
.vsp-loading .vsp-faceplate-play i { display: none; }
.vsp-loading .vsp-faceplate-play::after {
    content: '';
    width: 46%;
    height: 46%;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.25);
    border-top-color: #fff;
    animation: vspSpin .8s linear infinite;
}
@keyframes vspSpin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .vsp-faceplate-play { animation: none; }
    .vsp-faceplate-img  { transition: none; }
}

/* Scanline cinematográfica sobre el player */
.vsp-scanline {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg,
        transparent 0%,
        transparent 49%,
        rgba(255,255,255,0.025) 50%,
        transparent 51%,
        transparent 100%);
    background-size: 100% 3px;
    opacity: 0.6;
    mix-blend-mode: overlay;
    z-index: 2;
}

/* Controles laterales prev/next */
.vsp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1.5px solid var(--c-accent);
    color: var(--c-accent);
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all var(--t-fast);
    opacity: 0.7;
}

.vsp-nav:hover {
    background: var(--c-accent);
    color: var(--c-bg);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 22px var(--c-accent-glow);
}

.vsp-prev { left: -22px; }
.vsp-next { right: -22px; }

/* ============ INFO PANEL ============ */
.video-stage-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    position: relative;
}

.vsi-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vsi-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.vsi-ai {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(236, 72, 153, 0.2));
    border: 1px solid #A855F7;
    color: #D8B4FE;
}

.vsi-ai i { animation: spark 3s ease-in-out infinite; color: #F59E0B; }

@keyframes spark {
    0%, 100% { transform: rotate(0); }
    50% { transform: rotate(15deg) scale(1.1); }
}

.vsi-4k {
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
    border: 1px solid #06B6D4;
    color: #67E8F9;
}

.vsi-now {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.2));
    border: 1px solid #EF4444;
    color: #FCA5A5;
    position: relative;
    overflow: hidden;
}

.vsi-now::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.4), transparent);
    animation: now-sweep 2.5s linear infinite;
}

@keyframes now-sweep {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

.vsi-counter {
    font-family: var(--f-mono);
    font-size: 13px;
    color: var(--c-muted);
    letter-spacing: 0.08em;
    font-weight: 600;
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.vsi-counter #videoCurrentIdx {
    font-size: 28px;
    color: var(--c-accent);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.vsi-counter-sep {
    color: var(--c-muted);
    margin: 0 2px;
}

.video-stage-info h3 {
    font-family: var(--f-title);
    font-size: clamp(22px, 2.6vw, 28px);
    color: var(--c-text);
    margin: 0;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.video-stage-info > p {
    font-size: 14px;
    color: var(--c-text-soft);
    margin: 0;
    line-height: 1.55;
}

/* Metadata pills */
.vsi-meta-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.vsi-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    background: var(--c-bg-3);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-size: 12.5px;
}

.vsi-meta-item i {
    color: var(--c-accent);
    font-size: 12px;
    width: 16px;
    text-align: center;
}

.vsi-meta-k {
    font-family: var(--f-mono);
    font-size: 10.5px;
    color: var(--c-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.vsi-meta-v {
    flex: 1;
    text-align: right;
    color: var(--c-text);
    font-weight: 600;
    font-family: var(--f-mono);
    font-size: 12px;
}

/* Progress bar (animada al cambiar de video) */
.vsi-progress {
    width: 100%;
    height: 3px;
    background: var(--c-bg-3);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.vsi-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--c-accent), var(--c-accent-2));
    border-radius: 999px;
    box-shadow: 0 0 12px var(--c-accent-glow);
    transition: width 0.6s cubic-bezier(.4, 0, .2, 1);
}

/* ============ HEADER DE GALERÍA ============ */
.showreel-thumbs-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.showreel-thumbs-header h4 {
    font-family: var(--f-title);
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.showreel-thumbs-header h4 i { color: var(--c-accent); }

.showreel-thumbs-hint {
    font-family: var(--f-mono);
    font-size: 11px;
    color: var(--c-muted);
    letter-spacing: 0.06em;
}

/* ============ GRID DE THUMBNAILS ============ */
.video-thumb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 14px;
}

.video-thumb-pro {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--c-card) 0%, var(--c-bg-3) 100%);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--t-mid);
}

.video-thumb-pro::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
    pointer-events: none;
    z-index: 1;
}

.video-thumb-pro:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--c-accent);
    box-shadow: 0 18px 38px var(--c-accent-glow);
}

.video-thumb-pro.active {
    border-color: var(--c-accent);
    box-shadow: 0 0 0 2px var(--c-accent), 0 18px 44px var(--c-accent-glow);
}

.video-thumb-pro.active::before {
    content: '● REPRODUCIENDO';
    position: absolute;
    top: 8px; left: 8px;
    padding: 4px 10px;
    background: linear-gradient(135deg, #EF4444, #F97316);
    color: #FFFFFF;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.12em;
    border-radius: 999px;
    z-index: 3;
    animation: now-blink 1.4s ease-in-out infinite;
    font-family: var(--f-mono);
}

@keyframes now-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.vt-num {
    position: absolute;
    top: 8px; right: 10px;
    font-family: var(--f-mono);
    font-size: 24px;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    z-index: 2;
    letter-spacing: -0.02em;
}

.vt-title {
    position: absolute;
    left: 12px; right: 12px; bottom: 10px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
    z-index: 2;
    font-weight: 700;
    line-height: 1.25;
    max-height: 30px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.vt-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(201, 162, 75, 0.20) 0%, transparent 60%);
    opacity: 0;
    transition: opacity var(--t-mid);
    z-index: 2;
}

.video-thumb-pro:hover .vt-overlay,
.video-thumb-pro.active .vt-overlay { opacity: 1; }

.vt-play {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-accent), var(--c-accent-2));
    color: var(--c-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 10px 28px var(--c-accent-glow);
    transition: transform var(--t-fast);
}

.video-thumb-pro:hover .vt-play { transform: scale(1.12); }

/* ============ TOOLS GRID COLOREADOS ============ */
.video-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.video-tool-card {
    --tool-c1: var(--c-accent);
    --tool-c2: var(--c-accent-2);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 18px 18px;
    background: linear-gradient(135deg, var(--c-card) 0%, var(--c-bg-3) 100%);
    border: 1.5px solid var(--c-border);
    border-radius: var(--r-md);
    text-align: center;
    transition: all var(--t-mid);
    overflow: hidden;
    isolation: isolate;
}

.video-tool-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tool-c1), var(--tool-c2));
    opacity: 0.6;
    transition: opacity var(--t-mid);
}

.video-tool-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--tool-c1) 8%, transparent),
        transparent 70%);
    opacity: 0;
    transition: opacity var(--t-mid);
    z-index: -1;
}

.video-tool-card:hover {
    transform: translateY(-6px);
    border-color: var(--tool-c1);
    box-shadow: 0 18px 38px color-mix(in srgb, var(--tool-c1) 30%, transparent);
}

.video-tool-card:hover::before { opacity: 1; }
.video-tool-card:hover::after { opacity: 1; }

.video-tool-card i {
    font-size: 30px;
    background: linear-gradient(135deg, var(--tool-c1), var(--tool-c2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.video-tool-card span {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--c-text);
    font-family: var(--f-title);
    letter-spacing: -0.01em;
}

.video-tool-card small {
    font-family: var(--f-mono);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--c-bg-3);
    border: 1px solid var(--c-border);
    color: var(--tool-c1);
}

/* ============ EMPTY STATE ============ */
.empty-state {
    grid-column: 1 / -1;
    padding: 40px 20px;
    text-align: center;
    color: var(--c-muted);
    font-size: 14px;
}

.empty-state i { color: var(--c-accent); margin-right: 10px; }

/* ============================================================================
   MODO DÍA — Fondo blanco limpio
   ============================================================================ */
body.day-mode .showreel-meta-bar {
    background: #FAFBFC;
    border-color: #E5E7EB;
}

body.day-mode .video-stage-pro {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 12px 36px rgba(0,0,0,0.08);
}

body.day-mode .video-stage-pro::before { opacity: 0.15; }

body.day-mode .vsi-meta-item {
    background: #FAFBFC;
    border-color: #E5E7EB;
}

body.day-mode .vsi-progress { background: #F3F4F6; }

body.day-mode .video-thumb-pro {
    background: #F9FAFB;
    border-color: #E5E7EB;
}

body.day-mode .video-tool-card {
    background: #FFFFFF;
    border-color: #E5E7EB;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

body.day-mode .video-tool-card small {
    background: #F9FAFB;
    border-color: #E5E7EB;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 980px) {
    .video-stage-pro {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 22px;
        border-radius: var(--r-lg);
    }
    .vsp-nav { display: none; }
    .video-stage-info h3 { font-size: 20px; }
    .video-thumb-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .video-tool-card { padding: 20px 14px 16px; }
    .video-tool-card i { font-size: 26px; }
    .showreel-meta-bar { gap: 12px; padding: 12px 14px; }
    .srm-divider { display: none; }
}

@media (max-width: 480px) {
    .video-stage-pro { padding: 14px; }
    .vt-num { font-size: 20px; }
    .vt-play { width: 44px; height: 44px; font-size: 15px; }
    .showreel-meta-bar { font-size: 11px; }
    .srm-stat-num { font-size: 18px; }
    .video-tools-grid { grid-template-columns: repeat(2, 1fr); }
}
