/* ============================================
   TUTORIAL — Пошаговое обучение
   Spotlight overlay + tooltip bubble
   ============================================ */

/* Затемняющий оверлей */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    z-index: 99990;
    background: rgba(0, 0, 0, 0.7);
    pointer-events: all;
    transition: opacity 0.3s ease;
}

/* Подсвеченный элемент */
.tutorial-highlight {
    position: relative !important;
    z-index: 99992 !important;
    box-shadow:
        0 0 0 4px rgba(212, 168, 48, 0.6),
        0 0 0 8px rgba(212, 168, 48, 0.2),
        0 0 30px rgba(212, 168, 48, 0.15) !important;
    border-radius: 6px;
    animation: tutorialPulse 2s ease-in-out infinite;
    pointer-events: auto;
}

@keyframes tutorialPulse {
    0%, 100% {
        box-shadow:
            0 0 0 4px rgba(212, 168, 48, 0.6),
            0 0 0 8px rgba(212, 168, 48, 0.2),
            0 0 30px rgba(212, 168, 48, 0.15);
    }
    50% {
        box-shadow:
            0 0 0 4px rgba(212, 168, 48, 0.8),
            0 0 0 12px rgba(212, 168, 48, 0.3),
            0 0 40px rgba(212, 168, 48, 0.25);
    }
}

/* Тултип-подсказка */
.tutorial-tooltip {
    position: fixed;
    z-index: 99995;
    background:
        linear-gradient(180deg, #3a3025 0%, #2e2418 100%);
    border: 2px solid #d4a830;
    border-radius: 6px;
    padding: 16px 20px;
    max-width: 340px;
    min-width: 240px;
    box-shadow:
        0 0 0 1px rgba(0,0,0,0.3),
        0 8px 32px rgba(0,0,0,0.6),
        0 0 20px rgba(212,168,48,0.1);
    color: #e4d8c4;
    font-size: 0.9em;
    line-height: 1.6;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tutorial-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Стрелка тултипа (вверх) */
.tutorial-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #3a3025;
    border-top: 2px solid #d4a830;
    border-left: 2px solid #d4a830;
    transform: rotate(45deg);
}

.tutorial-tooltip.arrow-top::before {
    top: -8px;
    left: 24px;
}

.tutorial-tooltip.arrow-bottom::before {
    bottom: -8px;
    left: 24px;
    transform: rotate(225deg);
}

.tutorial-tooltip.arrow-left::before {
    left: -8px;
    top: 20px;
    transform: rotate(-45deg);
}

.tutorial-tooltip.arrow-right::before {
    right: -8px;
    top: 20px;
    transform: rotate(135deg);
}

/* Счётчик шагов */
.tutorial-step-counter {
    font-size: 0.72em;
    color: #8a7a60;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Текст подсказки */
.tutorial-text {
    margin-bottom: 14px;
    color: #e4d8c4;
}

/* Кнопка «Далее» */
.tutorial-next-btn {
    display: inline-block;
    padding: 8px 24px;
    background: linear-gradient(180deg, #4a3d2e 0%, #3a3025 100%);
    border: 1px solid #6a5a40;
    border-radius: 3px;
    color: #d4a830;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 2px 6px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,230,180,0.06);
    letter-spacing: 0.3px;
}

.tutorial-next-btn:hover {
    background: linear-gradient(180deg, #5a4d3e 0%, #4a3d2e 100%);
    border-color: #d4a830;
    box-shadow:
        0 3px 10px rgba(0,0,0,0.4),
        0 0 10px rgba(212,168,48,0.15);
}

/* Кнопка «Пропустить» */
.tutorial-skip-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #4a3d2e;
    border-radius: 3px;
    color: #8a7a60;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tutorial-skip-btn:hover {
    color: #b0a08a;
    border-color: #5a4a35;
    background: rgba(255,255,255,0.02);
}

/* Fade-in анимация для всего тултипа */
.tutorial-tooltip.entering {
    animation: tutorialFadeIn 0.4s ease forwards;
}

@keyframes tutorialFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
