.watch-tutorial-btn {
    text-underline-offset: 8px;
}
/* Video Popup Modal Styles */
.video-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.video-popup-container {
    position: relative;
    width: 90%;
    max-width: 900px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.video-popup-overlay.active .video-popup-container {
    transform: scale(1);
}

.video-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.video-popup-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.video-popup-title i {
    color: #ff0000;
}

.video-popup-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.video-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.video-popup-close:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.video-popup-body {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-popup-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-popup-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.video-popup-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #ff0000;
    border-radius: 50%;
    animation: video-popup-spin 0.8s linear infinite;
}

@keyframes video-popup-spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .video-popup-container {
        width: 95%;
        max-width: none;
        border-radius: 8px;
    }
    
    .video-popup-header {
        padding: 10px 12px;
    }
    
    .video-popup-title {
        font-size: 0.9rem;
    }
    
    .video-popup-close {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
}

/* Very small screens (landscape phones) */
@media (max-height: 500px) and (orientation: landscape) {
    .video-popup-container {
        width: 80%;
        max-height: 90vh;
    }
    
    .video-popup-header {
        padding: 6px 12px;
    }
    
    .video-popup-body {
        padding-bottom: 50%;
    }
}

/* RTL Support */
[dir="rtl"] .video-popup-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .video-popup-title {
    flex-direction: row-reverse;
}

/* Accessibility - reduce motion */
@media (prefers-reduced-motion: reduce) {
    .video-popup-overlay,
    .video-popup-container,
    .video-popup-close {
        transition: none;
    }
    
    .video-popup-loading .spinner {
        animation: none;
    }
}
