/* ========== WELCOME VIDEO MODAL STYLES - PREMIUM EDITION ========== */

/* CSS Variables para consistencia */
:root {
    --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    --gradient-purple: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    --gradient-mixed: linear-gradient(90deg, #FFD700, #8b5cf6, #FFD700);
    --glow-gold: 0 0 40px rgba(255, 215, 0, 0.4);
    --glow-purple: 0 0 40px rgba(139, 92, 246, 0.4);
    --shadow-deep: 0 20px 60px rgba(0, 0, 0, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 215, 0, 0.3);
}

/* Video Promo Floating Button - Más Pequeño */
.video-promo-btn {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    width: 50px !important;
    height: 50px !important;
}

.video-promo-btn i {
    font-size: 1.6rem !important;
}

.video-promo-btn:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important;
    box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6);
    transform: translateY(-3px);
}

/* Welcome Modal Base */
.welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.welcome-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Overlay con fade mejorado */
.welcome-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: overlayFade 0.4s ease-out;
}

@keyframes overlayFade {
    from {
        opacity: 0;
        backdrop-filter: blur(0);
        -webkit-backdrop-filter: blur(0);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
}

/* Modal Content - Glassmorphism Avanzado con Flexbox */
.welcome-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    background: linear-gradient(
        135deg,
        rgba(26, 26, 46, 0.98) 0%,
        rgba(15, 15, 35, 0.95) 50%,
        rgba(26, 26, 46, 0.98) 100%
    );
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border: 2px solid transparent;
    background-image: 
        linear-gradient(135deg, rgba(26, 26, 46, 0.98), rgba(15, 15, 35, 0.95)),
        linear-gradient(135deg, #FFD700, #8b5cf6, #FFD700);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    border-radius: 25px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    padding: 1.8rem;
    box-shadow: 
        0 0 0 1px rgba(255, 215, 0, 0.1),
        0 20px 60px rgba(0, 0, 0, 0.7),
        0 0 100px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: slideUpCinematic 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10001;
}

/* Partículas flotantes de fondo */
.welcome-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 215, 0, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    pointer-events: none;
    border-radius: 25px;
    z-index: -1;
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(10px, -10px) scale(1.05);
    }
    50% {
        transform: translate(-10px, 10px) scale(0.95);
    }
    75% {
        transform: translate(-10px, -10px) scale(1.02);
    }
}

/* Close Button - Efecto Magnético */
.welcome-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 215, 0, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    flex-shrink: 0;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.welcome-close-btn::before {
    content: '';
    position: absolute;
    inset: -5px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.welcome-close-btn:hover::before {
    opacity: 1;
    transform: scale(1.2);
    animation: ripple 1s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.welcome-close-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 
        0 6px 25px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.3);
}

/* Header con animación escalonada - Ultra Optimizado SIN ÍCONO */
.welcome-header {
    flex-shrink: 0;
    text-align: center;
    padding-top: 0.8rem;
    margin-bottom: 0.6rem;
    animation: fadeInUp 0.5s ease-out 0.1s both;
}

/* Icon ELIMINADO - No se muestra */
.welcome-icon {
    display: none;
}

/* Título ELIMINADO - No se muestra */
.welcome-header h2 {
    display: none;
}

.welcome-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 400;
}

/* Tabs con indicador deslizante - Ultra Compactas */
.welcome-tabs {
    position: relative;
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
    justify-content: center;
    padding: 2px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.1);
    animation: fadeInUp 0.5s ease-out 0.2s both;
    flex-shrink: 0;
}

.welcome-tabs::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: calc(50% - 4px);
    height: calc(100% - 4px);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(99, 102, 241, 0.4));
    border-radius: 10px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 
        0 4px 20px rgba(139, 92, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    z-index: 0;
}

.welcome-tabs:has(.welcome-tab:last-child.active)::before {
    transform: translateX(calc(100% + 4px));
}

.welcome-tab {
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    border-radius: 10px;
    padding: 0.35rem 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.welcome-tab i {
    font-size: 0.9rem;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.welcome-tab:hover {
    color: #FFD700;
    transform: translateY(-2px);
}

.welcome-tab.active {
    background: transparent;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.welcome-tab.active i {
    transform: rotate(360deg) scale(1.1);
}

/* Video Container - Altura Dinámica con Flexbox */
.welcome-video-container {
    position: relative;
    flex: 1;
    min-height: 0;
    max-height: calc(95vh - 320px);
    margin-bottom: 1rem;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

.video-wrapper {
    display: none;
    position: relative;
    height: auto;
    max-height: 100%;
    transition: 
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: scale(0.95);
}

.video-wrapper.active {
    display: block;
    opacity: 1;
    transform: scale(1);
}

/* Video Frame Premium con altura adaptativa */
.video-wrapper video {
    width: 100%;
    height: 37%;
    max-height: 100%;
    border-radius: 15px;
    background: #000;
    object-fit: contain;
    border: 2px solid transparent;
    background-image: 
        linear-gradient(#000, #000),
        linear-gradient(90deg, #FFD700, #8b5cf6, #FFD700, #8b5cf6);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 100% 100%, 200% 100%;
    animation: borderFlow 3s linear infinite, videoBreathing 4s ease-in-out infinite;
}

@keyframes borderFlow {
    0% { background-position: 0 0, 0% 0; }
    100% { background-position: 0 0, 200% 0; }
}

@keyframes videoBreathing {
    0%, 100% {
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.6),
            0 0 60px rgba(139, 92, 246, 0.3),
            0 0 80px rgba(255, 215, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    50% {
        box-shadow: 
            0 15px 60px rgba(0, 0, 0, 0.6),
            0 0 80px rgba(139, 92, 246, 0.4),
            0 0 100px rgba(255, 215, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
}

/* Esquinas con brillo */
.video-wrapper::before,
.video-wrapper::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 215, 0, 0.6);
    pointer-events: none;
    z-index: 1;
}

.video-wrapper::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 15px;
}

.video-wrapper::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 15px;
}

/* Panel de descripción con scan holográfico */
.video-description {
    margin-top: 1rem;
    padding: 0.9rem 1.1rem;
    position: relative;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.2),
        inset 0 -1px 0 rgba(139, 92, 246, 0.2);
    overflow: hidden;
}

.video-description::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        transparent,
        rgba(139, 92, 246, 0.1),
        transparent
    );
    animation: scanLine 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scanLine {
    0%, 100% { top: -100%; }
    50% { top: 100%; }
}

.video-description h4 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.3));
}

.video-description h4 i {
    color: #FFD700;
    -webkit-text-fill-color: #FFD700;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.video-description p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Footer con animación - Ultra Optimizado */
.welcome-footer {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    margin-top: auto;
    padding-top: 0.6rem;
    animation: fadeInUp 0.5s ease-out 0.4s both;
}

.welcome-btn {
    padding: 0.85rem 2rem;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

/* Botón Secundario con border glow */
.welcome-btn.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.welcome-btn.secondary::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #FFD700, #8b5cf6, #FFD700);
    background-size: 200% 200%;
    border-radius: 25px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.welcome-btn.secondary:hover::before {
    opacity: 1;
}

.welcome-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.3);
}

/* Botón Primario con shimmer */
.welcome-btn.primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    box-shadow: 
        0 5px 20px rgba(255, 215, 0, 0.4),
        0 0 40px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.welcome-btn.primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    transition: left 0.6s ease;
}

.welcome-btn.primary:hover::before {
    left: 100%;
}

.welcome-btn.primary:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 
        0 10px 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.welcome-btn.primary:hover i {
    animation: iconBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes iconBounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.welcome-btn i {
    font-size: 1.2rem;
}

/* Animaciones mejoradas */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUpCinematic {
    0% {
        transform: translateY(50px) scale(0.95);
        opacity: 0;
        filter: blur(10px);
    }
    50% {
        transform: translateY(-10px) scale(1.01);
        opacity: 0.8;
        filter: blur(0);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop Layout - Video + Description Side by Side con altura controlada */
@media screen and (min-width: 769px) {
    .video-wrapper.active {
        display: grid;
        grid-template-columns: 70fr 30fr;
        gap: 1.5rem;
        align-items: start;
        height: auto;
        max-height: 100%;
    }

    .video-description {
        margin-top: 0;
        padding: 0.9rem;
        max-height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Scrollbar personalizado para descripción */
    .video-description::-webkit-scrollbar {
        width: 6px;
    }
    
    .video-description::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 10px;
    }
    
    .video-description::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #FFD700, #8b5cf6);
        border-radius: 10px;
    }
    
    .video-description::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #FFA500, #7c3aed);
    }
}

/* Responsive - Mobile */
@media screen and (max-width: 768px) {
    .welcome-modal-content {
        padding: 1.2rem;
        max-height: 95vh;
        background: linear-gradient(
            135deg,
            rgba(26, 26, 46, 0.98) 0%,
            rgba(15, 15, 35, 0.96) 100%
        );
        box-shadow: 
            0 10px 40px rgba(0, 0, 0, 0.8),
            0 0 60px rgba(139, 92, 246, 0.2);
    }

    .welcome-header h2 {
        font-size: 1.4rem;
    }

    .welcome-icon {
        width: 42px;
        height: 42px;
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .welcome-tabs {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .welcome-tabs::before {
        display: none;
    }

    .welcome-tab {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1rem;
    }
    
    .welcome-tab:active {
        transform: scale(0.96);
        background: rgba(139, 92, 246, 0.2);
    }
    
    .video-wrapper {
        position: relative;
        margin-bottom: 1rem;
    }
    
    .video-wrapper.active {
        display: block !important;
    }

    .video-wrapper video {
        max-height: 300px;
        height: auto;
        box-shadow: 
            0 8px 30px rgba(0, 0, 0, 0.6),
            0 0 40px rgba(139, 92, 246, 0.2);
    }

    .welcome-footer {
        flex-direction: column;
    }

    .welcome-btn {
        width: 100%;
        justify-content: center;
    }
    
    .welcome-btn:active {
        transform: scale(0.97);
    }

    .welcome-close-btn {
        top: 1rem;
        right: 1rem;
        width: 35px;
        height: 35px;
        font-size: 1.3rem;
    }
    
    .video-description h4 {
        font-size: 1rem;
    }
    
    .video-description p {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .welcome-modal-content {
        width: 95%;
        padding: 1rem;
    }

    .welcome-header h2 {
        font-size: 1.3rem;
    }

    .video-description h4 {
        font-size: 1.1rem;
    }
}
