/* Tutorial System Styles */

/* ============================================
   OVERLAY
   ============================================ */

.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.tutorial-overlay.modal-mode {
    pointer-events: auto;
    clip-path: none !important;
}

.tutorial-overlay.spotlight-mode {
    /* Spotlight mode uses clip-path set by JS */
    pointer-events: auto;
}

.tutorial-overlay.passthrough-mode {
    /* Allow clicks through the overlay - used when user needs to interact freely */
    pointer-events: none !important;
}

/* ============================================
   HIGHLIGHTED ELEMENT
   ============================================ */

.tutorial-highlighted {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.8), 
                0 0 20px rgba(0, 212, 255, 0.6),
                0 0 40px rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    animation: tutorialPulse 1.5s ease-in-out infinite;
}

@keyframes tutorialPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.8), 
                    0 0 20px rgba(0, 212, 255, 0.6),
                    0 0 40px rgba(0, 212, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(0, 212, 255, 1), 
                    0 0 30px rgba(0, 212, 255, 0.8),
                    0 0 60px rgba(0, 212, 255, 0.5);
    }
}

/* ============================================
   COACH MARK (TOOLTIP & MODAL CONTAINER)
   ============================================ */

.tutorial-coach-mark {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-coach-mark.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ============================================
   MODAL STYLE
   ============================================ */

.tutorial-coach-mark.modal-style {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
}

.tutorial-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 16px;
    padding: 30px 40px;
    max-width: 450px;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4),
                0 10px 40px rgba(0, 0, 0, 0.5);
    animation: modalAppear 0.4s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.tutorial-modal h3 {
    color: #00d4ff;
    font-size: 1.5rem;
    margin: 0 0 15px 0;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.tutorial-modal p {
    color: #e0e0e0;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0 0 25px 0;
}

.tutorial-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

/* ============================================
   TOOLTIP STYLE (FOR SPOTLIGHT)
   ============================================ */

.tutorial-tooltip {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #00d4ff;
    border-radius: 12px;
    padding: 20px 25px;
    max-width: 320px;
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4),
                0 5px 25px rgba(0, 0, 0, 0.5);
    animation: tooltipAppear 0.3s ease-out;
    position: relative;
}

@keyframes tooltipAppear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tutorial-tooltip h4 {
    color: #00d4ff;
    font-size: 1.1rem;
    margin: 0 0 10px 0;
}

.tutorial-tooltip p {
    color: #e0e0e0;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

/* ============================================
   TOOLTIP ARROWS
   ============================================ */

.tutorial-tooltip-arrow {
    position: absolute;
    width: 0;
    height: 0;
}

.tutorial-tooltip-arrow.bottom {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid #00d4ff;
}

.tutorial-tooltip-arrow.top {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #00d4ff;
}

.tutorial-tooltip-arrow.left {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 10px solid #00d4ff;
}

.tutorial-tooltip-arrow.right {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 10px solid #00d4ff;
}

/* ============================================
   BUTTONS
   ============================================ */

.tutorial-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tutorial-btn-primary {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.tutorial-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.6);
}

.tutorial-btn-skip {
    background: transparent;
    color: #888;
    font-size: 0.9rem;
    padding: 8px 20px;
}

.tutorial-btn-skip:hover {
    color: #ccc;
}

.tutorial-btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.tutorial-btn-primary-small {
    background: linear-gradient(135deg, #00a8ff, #0078d4);
    color: white;
    font-size: 0.85rem;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
}

.tutorial-btn-primary-small:hover {
    background: linear-gradient(135deg, #00bfff, #0088e8);
}

.tutorial-btn-skip-small {
    background: transparent;
    color: #666;
    font-size: 0.8rem;
    padding: 5px 10px;
    cursor: pointer;
    border: none;
}

.tutorial-btn-skip-small:hover {
    color: #aaa;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .tutorial-modal {
        max-width: 90vw;
        padding: 20px 25px;
    }
    
    .tutorial-modal h3 {
        font-size: 1.25rem;
    }
    
    .tutorial-modal p {
        font-size: 0.95rem;
    }
    
    .tutorial-tooltip {
        max-width: 280px;
        padding: 15px 20px;
    }
}
