/* Homepage Tutorial Overlay */

.homepage-tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

.homepage-tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.homepage-tutorial-overlay.active .homepage-tutorial-backdrop {
    opacity: 1;
    pointer-events: auto;
}

/* Tutorial Popup */
.homepage-tutorial-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 
        0 25px 80px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    z-index: 100001;
    pointer-events: auto !important;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(220, 38, 38, 0.2);
    overflow: hidden;
}

.homepage-tutorial-overlay.active .homepage-tutorial-popup {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.tutorial-popup-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #ffffff;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.tutorial-progress {
    flex: 1;
    height: 6px;
    background: rgba(220, 38, 38, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.tutorial-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
    border-radius: 10px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.tutorial-step-indicator {
    font-size: 14px;
    font-weight: 600;
    color: #dc2626;
    white-space: nowrap;
}

.tutorial-close-btn {
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer !important;
    color: #6b7280;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.tutorial-close-btn:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.tutorial-popup-body {
    padding: 32px 24px;
    text-align: center;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.tutorial-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #fca5a5 0%, #fecaca 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.2);
}

.tutorial-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.tutorial-description {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.tutorial-highlight-info {
    margin-top: 16px;
}

.highlight-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.tutorial-popup-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #fafafa;
    pointer-events: auto;
    position: relative;
    z-index: 10;
}

.tutorial-btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer !important;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.tutorial-btn-primary {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.tutorial-btn-primary:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.tutorial-btn-secondary {
    background: #ffffff;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

.tutorial-btn-secondary:hover {
    background: #f9fafb;
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
}

.tutorial-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e5e7eb;
    transition: all 0.3s ease;
    cursor: pointer !important;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
}

.tutorial-dot.active {
    background: #dc2626;
    width: 24px;
    border-radius: 4px;
}

/* Highlight Wrapper */
.tutorial-highlight-wrapper {
    position: fixed;
    border: 3px solid #dc2626;
    border-radius: 12px;
    box-shadow: 
        0 0 0 9999px rgba(0, 0, 0, 0.3),
        0 0 0 4px #dc2626,
        0 0 20px rgba(220, 38, 38, 0.5);
    pointer-events: none;
    z-index: 99998;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateZ(0); /* Force hardware acceleration */
}

.homepage-tutorial-overlay.active .tutorial-highlight-wrapper {
    opacity: 1;
}

/* Pulse Animation */
@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.3),
            0 0 0 4px #dc2626,
            0 0 20px rgba(220, 38, 38, 0.5);
    }
    50% {
        box-shadow: 
            0 0 0 9999px rgba(0, 0, 0, 0.35),
            0 0 0 6px #dc2626,
            0 0 30px rgba(220, 38, 38, 0.7);
    }
}

.tutorial-highlight-wrapper.pulse {
    animation: tutorialPulse 2s ease-in-out infinite;
}

/* Responsive Design */
@media (max-width: 767px) {
    .homepage-tutorial-popup {
        max-width: 95%;
        width: 95%;
        border-radius: 20px;
    }
    
    .tutorial-popup-header {
        padding: 16px 20px 12px;
    }
    
    .tutorial-popup-body {
        padding: 24px 20px;
    }
    
    .tutorial-icon {
        width: 64px;
        height: 64px;
        margin-bottom: 16px;
    }
    
    .tutorial-title {
        font-size: 20px;
    }
    
    .tutorial-description {
        font-size: 15px;
    }
    
    .tutorial-popup-footer {
        padding: 16px 20px;
        flex-wrap: wrap;
    }
    
    .tutorial-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .tutorial-dots {
        order: -1;
        width: 100%;
        margin-bottom: 12px;
    }
}

/* Skip Confirmation */
.tutorial-skip-confirm {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 100001;
    max-width: 360px;
    width: 90%;
    text-align: center;
    display: none;
}

.tutorial-skip-confirm.show {
    display: block;
}

.tutorial-skip-confirm h4 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #1f2937;
}

.tutorial-skip-confirm p {
    margin: 0 0 20px 0;
    color: #6b7280;
    font-size: 14px;
}

.tutorial-skip-confirm-btns {
    display: flex;
    gap: 12px;
}

.tutorial-skip-confirm-btns .tutorial-btn {
    flex: 1;
    justify-content: center;
}

