/* ============================================================
   Tutorial Overlay System
   ============================================================ */

/* Spotlight overlay — darkens everything except the target */
#tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
}

/* The four shadow panels that create the spotlight cutout */
.tutorial-shadow {
    position: fixed;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9001;
    pointer-events: all;
    transition: all 0.3s ease;
}

/* Highlight ring around the target element */
#tutorial-highlight {
    position: fixed;
    z-index: 9002;
    border: 3px solid #DC143C;
    border-radius: 8px;
    box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.3), 0 0 20px rgba(220, 20, 60, 0.4);
    pointer-events: none;  /* always click-through so target stays interactive */
    transition: all 0.3s ease;
    animation: tutorial-pulse 2s ease-in-out infinite;
}

@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(220, 20, 60, 0.3), 0 0 20px rgba(220, 20, 60, 0.4); }
    50%       { box-shadow: 0 0 0 6px rgba(220, 20, 60, 0.5), 0 0 30px rgba(220, 20, 60, 0.6); }
}

/* Tooltip bubble */
#tutorial-tooltip {
    position: fixed;
    z-index: 9100;
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid #DC143C;
    border-radius: 12px;
    padding: 20px 22px 16px;
    max-width: 340px;
    min-width: 260px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(220, 20, 60, 0.2);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: all 0.25s ease;
}

/* Arrow pointer on tooltip */
#tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #DC143C;
    transform: rotate(45deg);
}

#tutorial-tooltip.arrow-top::before    { top: -7px;    left: 24px; }
#tutorial-tooltip.arrow-bottom::before { bottom: -7px; left: 24px; }
#tutorial-tooltip.arrow-left::before   { left: -7px;   top: 24px;  }
#tutorial-tooltip.arrow-right::before  { right: -7px;  top: 24px;  }
#tutorial-tooltip.arrow-none::before   { display: none; }

/* Step counter */
#tutorial-step-counter {
    font-size: 0.75em;
    color: #DC143C;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Tooltip text */
#tutorial-tooltip-text {
    font-size: 0.95em;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 16px;
}

/* Tooltip action row */
.tutorial-tooltip-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.tutorial-btn-skip {
    background: transparent;
    border: 1px solid #4a5568;
    border-radius: 6px;
    color: #718096;
    font-size: 0.8em;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tutorial-btn-skip:hover {
    border-color: #DC143C;
    color: #DC143C;
}

.tutorial-btn-next {
    background: linear-gradient(135deg, #8B0000 0%, #660000 100%);
    border: 2px solid #DC143C;
    border-radius: 6px;
    color: #fff;
    font-size: 0.85em;
    font-weight: 600;
    padding: 7px 16px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tutorial-btn-next:hover {
    background: linear-gradient(135deg, #A50000 0%, #8B0000 100%);
    border-color: #FF1744;
    transform: translateY(-1px);
}

/* Full-screen centered modal (for welcome / completion steps) */
#tutorial-modal {
    position: fixed;
    inset: 0;
    z-index: 9200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

#tutorial-modal-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 3px solid #DC143C;
    border-radius: 16px;
    padding: 36px 40px;
    max-width: 520px;
    width: 90%;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7), 0 0 40px rgba(220, 20, 60, 0.2);
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

#tutorial-modal-icon {
    font-size: 3em;
    margin-bottom: 16px;
}

#tutorial-modal-title {
    font-size: 1.6em;
    font-weight: bold;
    color: #DC143C;
    margin-bottom: 14px;
}

#tutorial-modal-body {
    font-size: 0.95em;
    line-height: 1.7;
    color: #e2e8f0;
    margin-bottom: 28px;
}

.tutorial-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tutorial-modal-btn-primary {
    background: linear-gradient(135deg, #8B0000 0%, #660000 100%);
    border: 2px solid #DC143C;
    border-radius: 8px;
    color: #fff;
    font-size: 1em;
    font-weight: 600;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tutorial-modal-btn-primary:hover {
    background: linear-gradient(135deg, #A50000 0%, #8B0000 100%);
    border-color: #FF1744;
    transform: translateY(-2px);
}

.tutorial-modal-btn-secondary {
    background: transparent;
    border: 2px solid #4a5568;
    border-radius: 8px;
    color: #a0aec0;
    font-size: 0.9em;
    padding: 10px 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tutorial-modal-btn-secondary:hover {
    border-color: #DC143C;
    color: #fff;
}

/* Landing page tutorial button */
.landing-btn.tutorial-btn {
    background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
    border: 2px solid #4a5568;
    color: #a0aec0;
    font-size: 1em;
    padding: 14px 40px;
}

.landing-btn.tutorial-btn:hover {
    border-color: #DC143C;
    color: #fff;
    background: linear-gradient(135deg, #2d1a1a 0%, #1a0d0d 100%);
}

/* Glow animation for tutorial-highlighted buttons */
.tutorial-glow-btn {
    animation: tutorial-btn-glow 1.2s ease-in-out infinite !important;
    position: relative;
    z-index: 1;
}

@keyframes tutorial-btn-glow {
    0%, 100% {
        box-shadow: 0 0 6px 2px rgba(72, 187, 120, 0.5), 0 0 14px 4px rgba(72, 187, 120, 0.3);
        border-color: #48bb78 !important;
    }
    50% {
        box-shadow: 0 0 14px 6px rgba(72, 187, 120, 0.8), 0 0 28px 10px rgba(72, 187, 120, 0.4);
        border-color: #68d391 !important;
    }
}

/* First-launch prompt banner */
#tutorial-first-launch-banner {
    background: linear-gradient(135deg, #2d1a1a 0%, #1a0d0d 100%);
    border: 2px solid #DC143C;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    text-align: center;
    color: #e2e8f0;
    font-size: 0.95em;
    line-height: 1.5;
}

#tutorial-first-launch-banner strong {
    color: #DC143C;
    display: block;
    font-size: 1.05em;
    margin-bottom: 6px;
}
