/* Welcome Video Modal */
.welcome-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.welcome-modal-overlay.closing {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
    }
}

.welcome-modal {
    background: white;
    border-radius: 24px;
    max-width: 900px;
    width: 90%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: scale(0.9);
    animation: scaleIn 0.5s ease 0.2s forwards;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

@keyframes scaleIn {
    to {
        transform: scale(1);
    }
}

.welcome-modal-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 40px 32px;
    text-align: center;
    color: white;
    position: relative;
}

.welcome-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.welcome-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.welcome-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.welcome-logo img {
    width: 60px;
    height: auto;
}

.welcome-modal-header h1 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px 0;
    font-family: 'Poppins', sans-serif;
}

.welcome-modal-header p {
    font-size: 16px;
    margin: 0;
    color: #ffffff;
    font-weight: 500;
}

.welcome-modal-body {
    padding: 32px;
    flex: 1;
    overflow-y: auto;
}

.video-intro {
    text-align: center;
    margin-bottom: 24px;
}

.video-intro h2 {
    font-size: 24px;
    color: #0f172a;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.video-intro p {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 16px;
    overflow: visible;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
}

/* Special handling for YouTube Shorts in modal */
.video-container iframe[src*="WdMoKy3DJOI"] {
    max-width: 400px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
}

/* Video wrapper with play button overlay */
.video-wrapper-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-wrapper-modal video {
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Fullscreen video wrapper styling */
.video-wrapper-modal:fullscreen {
    background: #000;
}

.video-wrapper-modal:-webkit-full-screen {
    background: #000;
}

.video-wrapper-modal:-moz-full-screen {
    background: #000;
}

.video-wrapper-modal:-ms-fullscreen {
    background: #000;
}

/* Remove border radius in fullscreen */
.video-wrapper-modal:fullscreen video,
.video-wrapper-modal:-webkit-full-screen video,
.video-wrapper-modal:-moz-full-screen video,
.video-wrapper-modal:-ms-fullscreen video {
    border-radius: 0;
}

.video-overlay-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    border-radius: 16px;
}

.video-overlay-modal:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.45) 0%, rgba(139, 92, 246, 0.45) 100%);
}

.play-button-modal {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: 4px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.5);
}

.play-button-modal:hover {
    transform: scale(1.15);
    box-shadow: 0 16px 60px rgba(99, 102, 241, 0.7);
}

.play-button-modal svg {
    margin-left: 4px;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
}

.video-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 16px;
    opacity: 0.8;
}

.video-placeholder p {
    font-size: 16px;
    opacity: 0.9;
}

.welcome-modal-footer {
    padding: 24px 32px;
    background: #f8fafc;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    border-bottom-left-radius: 24px;
    border-bottom-right-radius: 24px;
    flex-shrink: 0;
}

.skip-btn {
    padding: 14px 32px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
}

.skip-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #475569;
}

.continue-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.dont-show-again {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #64748b;
    cursor: pointer;
    user-select: none;
}

.dont-show-again input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .welcome-modal-header {
        padding: 32px 24px;
    }
    
    .welcome-modal-header h1 {
        font-size: 24px;
    }
    
    .welcome-modal-header p {
        font-size: 14px;
    }
    
    .welcome-modal-body {
        padding: 24px;
    }
    
    .video-intro h2 {
        font-size: 20px;
    }
    
    .welcome-modal-footer {
        flex-direction: column;
        padding: 20px 24px;
    }
    
    .skip-btn,
    .continue-btn {
        width: 100%;
    }
}
