/* --- CONTENEDOR PRINCIPAL DEL VIDEO --- */
.custom-video {
    width: 100%;
    margin-bottom: 20px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.video-main-container {
    position: relative;
    width: 100%;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Wrappers Proporcionales (Evitan el espacio blanco) */
.v-wrapper-horizontal { padding-bottom: 56.25%; height: 0; width: 100%; }
.v-wrapper-vertical { width: 80%; max-width: 400px; aspect-ratio: 9 / 16; margin: 0 auto; position: relative; }

/* --- CAPAS DE INTERACCIÓN (Z-INDEX) --- */

/* 1. Capa base del anuncio (Video/Imagen) */
.ad-iframe-wrapper { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 101; 
}

.ad-iframe-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 2. Capa de protección invisible (Evita tocar controles del video) */
.ad-shield { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    z-index: 110; 
    background: transparent; 
    pointer-events: none; /* Permite que el clic pase a los botones superiores */
}

/* 3. Overlay General de control */
.fake-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 120;
    cursor: pointer;
    background: rgba(0,0,0,0.1);
}

/* --- BOTONES INTERACTIVOS (CAPA SUPERIOR) --- */

/* Botón de Acción (Arriba Izquierda) - AHORA CLICKEABLE */
.ad-label-btn {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: bold;
    z-index: 150; /* Por encima de todas las capas */
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.4);
    cursor: pointer;
    pointer-events: auto; /* Asegura que reciba el clic */
    transition: all 0.2s ease;
    text-transform: uppercase;
}

.ad-label-btn:hover {
    background: #fff;
    color: #000;
    transform: scale(1.05);
}

/* Contenedor Saltar Anuncio (Abajo Derecha) */
.skip-container { 
    position: absolute; 
    bottom: 50px; 
    right: 0; 
    z-index: 150; 
    pointer-events: auto;
}

.skip-btn {
    background: rgba(0, 0, 0, 0.85); 
    color: #fff; 
    border: none;
    padding: 10px 24px; 
    font-size: 14px; 
    cursor: default;
    min-width: 100px;
    text-align: center;
}

.skip-btn:disabled {
    font-family: monospace;
    font-size: 16px;
}

.skip-btn.active { 
    color: white; 
    cursor: pointer; 
    background: #000; 
    border-left: 2px solid #fff;
}

/* --- ELEMENTOS DE ESTADO (PLAY / CARGA) --- */

.play-btn-circular {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px; height: 80px;
    background: rgba(255, 0, 0, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
    z-index: 125;
}

.play-btn-circular::after {
    content: ''; position: absolute;
    border-left: 25px solid white; border-top: 15px solid transparent; border-bottom: 15px solid transparent;
    left: 32px; top: 25px;
}

/* --- AJUSTES MÓVILES --- */
@media(max-width:768px){
    .ad-label-btn { top: 10px; left: 10px; font-size: 11px; padding: 6px 12px; }
    .skip-container { bottom: 35px; }
    .skip-btn { padding: 8px 16px; font-size: 13px; }
    .play-btn-circular { width: 65px; height: 65px; }
    .play-btn-circular::after { border-left-width: 20px; border-top-width: 12px; border-bottom-width: 12px; left: 26px; top: 20px; }
}