/* ============================================
   TUTORIAL — Estilos do Sistema de Tutorial
   Caça-Palavras Saúde
============================================ */

/* ============================================
   TUTORIAL RÁPIDO (Slides de Como Jogar)
============================================ */

#tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

#tutorial-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.tutorial-card {
    position: relative;
    background: linear-gradient(160deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
    border: 2px solid rgba(0, 201, 167, 0.4);
    border-radius: 24px;
    padding: 36px 28px 28px;
    max-width: 340px;
    width: 88%;
    text-align: center;
    box-shadow:
        0 0 40px rgba(0, 201, 167, 0.15),
        0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
    opacity: 0;
}

#tutorial-overlay.active .tutorial-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Slide transition */
.tutorial-card.slide-out-left {
    transform: translateX(-60px) scale(0.9);
    opacity: 0;
    transition: transform 0.25s ease-in, opacity 0.25s ease-in;
}

.tutorial-card.slide-in-right {
    transform: translateX(60px) scale(0.9);
    opacity: 0;
}

.tutorial-card.slide-in-right.active {
    transform: translateX(0) scale(1);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

/* Ícone do slide */
.tutorial-icon {
    font-size: 64px;
    margin-bottom: 16px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0, 201, 167, 0.4));
    animation: tutorialIconFloat 3s ease-in-out infinite;
}

@keyframes tutorialIconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.tutorial-title {
    font-family: 'Fredoka One', 'Luckiest Guy', cursive;
    font-size: 24px;
    color: #00C9A7;
    margin: 0 0 12px;
    text-shadow: 0 2px 8px rgba(0, 201, 167, 0.4);
    letter-spacing: 0.5px;
}

.tutorial-text {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    margin: 0 0 24px;
}

.tutorial-text strong {
    color: #FFD700;
}

/* Indicador de progresso (bolinhas) */
.tutorial-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 24px;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: all 0.3s ease;
}

.tutorial-dot.active {
    background: #00C9A7;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 0 8px rgba(0, 201, 167, 0.6);
}

/* Botões */
.tutorial-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-tutorial-skip {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-tutorial-skip:hover,
.btn-tutorial-skip:active {
    border-color: rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.btn-tutorial-next {
    background: linear-gradient(135deg, #00C9A7, #845EC2);
    border: none;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 2;
    box-shadow: 0 4px 15px rgba(0, 201, 167, 0.35);
    letter-spacing: 0.3px;
}

.btn-tutorial-next:hover,
.btn-tutorial-next:active {
    transform: scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 201, 167, 0.5);
}

/* Animação de entrada do ícone de mão (slide 2) */
.tutorial-hand-demo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 8px 0 16px;
    font-size: 28px;
}

.tutorial-hand-demo .hand {
    animation: swipeHand 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes swipeHand {
    0% {
        transform: translateX(-20px);
        opacity: 0.4;
    }

    50% {
        transform: translateX(20px);
        opacity: 1;
    }

    100% {
        transform: translateX(-20px);
        opacity: 0.4;
    }
}

/* ============================================
   TOUR DA HOME (Spotlight Interativo)
============================================ */

#tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99998;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#tour-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* SVG de máscara com furo (spotlight) */
#tour-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Tooltip do tour */
.tour-tooltip {
    position: fixed;
    background: linear-gradient(160deg, #1a1a2e, #0f3460);
    border: 2px solid rgba(0, 201, 167, 0.5);
    border-radius: 16px;
    padding: 16px 20px;
    max-width: 260px;
    width: 80%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 201, 167, 0.15);
    z-index: 100000;
    pointer-events: all;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tour-tooltip.visible {
    opacity: 1;
    transform: scale(1);
}

/* Seta do tooltip */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #0f3460;
    border-left: 2px solid rgba(0, 201, 167, 0.5);
    border-top: 2px solid rgba(0, 201, 167, 0.5);
    border-radius: 2px;
}

.tour-tooltip.arrow-top::before {
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
}

.tour-tooltip.arrow-bottom::before {
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(225deg);
}

.tour-tooltip.arrow-left::before {
    left: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

.tour-tooltip.arrow-right::before {
    right: -7px;
    top: 50%;
    transform: translateY(-50%) rotate(135deg);
}

.tour-tooltip-icon {
    font-size: 28px;
    margin-bottom: 6px;
    display: block;
}

.tour-tooltip-title {
    font-family: 'Fredoka One', cursive;
    font-size: 17px;
    color: #00C9A7;
    margin: 0 0 6px;
}

.tour-tooltip-text {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin: 0 0 14px;
}

.tour-tooltip-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.tour-step-counter {
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

.btn-tour-next {
    background: linear-gradient(135deg, #00C9A7, #845EC2);
    border: none;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(0, 201, 167, 0.3);
}

.btn-tour-next:active {
    transform: scale(0.97);
}

.btn-tour-skip {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s;
}

.btn-tour-skip:active {
    color: rgba(255, 255, 255, 0.7);
}

/* Spotlight pulsante no elemento destacado */
.tour-spotlight-ring {
    position: fixed;
    border: 3px solid rgba(0, 201, 167, 0.8);
    border-radius: inherit;
    pointer-events: none;
    z-index: 99999;
    animation: spotlightPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(0, 201, 167, 0.4);
}

@keyframes spotlightPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 201, 167, 0.5);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 201, 167, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 201, 167, 0);
    }
}