/* ========================================================================== */
/* MODULE 5 STYLES: FIRST-TIME TUTORIAL SYSTEM (css/tutorial.css)            */
/* Guided hand/mouse cursor pointer, overlay instructions, and SKIP button   */
/* ========================================================================== */

.tutorial-overlay {
    position: absolute;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 8, 20, 0.45);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: calc(env(safe-area-inset-top, 20px) + 60px) 16px 30px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tutorial-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

/* Tutorial Header Banner */
.tutorial-banner {
    background: linear-gradient(180deg, #ffea4c 0%, #ff9d00 100%);
    border: 3px solid #ffffff;
    border-radius: 25px;
    padding: 10px 24px;
    box-shadow: 0 6px 0 #cc7a00, 0 10px 20px rgba(0,0,0,0.5);
    color: #4a2400;
    text-align: center;
    max-width: 90%;
    z-index: 1020;
    animation: bannerBounce 2s ease-in-out infinite;
}

.tutorial-overlay.active .tutorial-banner,
.tutorial-overlay.active .tutorial-hand-img,
.tutorial-overlay.active .tutorial-target-ring {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.tutorial-banner p {
    font-family: 'Fredoka One', cursive;
    font-size: 18px;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow:
        -1.5px -1.5px 0 #2a2a2a,
         1.5px -1.5px 0 #2a2a2a,
        -1.5px  1.5px 0 #2a2a2a,
         1.5px  1.5px 0 #2a2a2a,
         0px  3px 3px rgba(0,0,0,0.4);
}

@keyframes bannerBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* SKIP TUTORIAL BUTTON */
.skip-tutorial-btn {
    position: absolute;
    top: calc(env(safe-area-inset-top, 20px) + 12px);
    right: 16px;
    background: linear-gradient(180deg, #7bed2f 0%, #26c014 100%);
    border: 2px solid #ffffff;
    border-radius: 20px;
    padding: 8px 18px;
    color: #ffffff;
    font-family: 'Fredoka One', cursive;
    font-size: 14px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 0 #1a850e, 0 6px 12px rgba(0,0,0,0.4);
    cursor: pointer;
    z-index: 1050;
    pointer-events: auto;
    transition: transform 0.1s ease;
}

.skip-tutorial-btn:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 #1a850e;
}

/* ANIMATED MOUSE / HAND CURSOR POINTER */
.tutorial-cursor-pointer {
    position: absolute;
    width: 60px;
    height: 60px;
    z-index: 1010;
    pointer-events: none;
    transition: left 0.7s cubic-bezier(0.25, 1, 0.5, 1), top 0.7s cubic-bezier(0.25, 1, 0.5, 1);
    display: none;
}

.tutorial-cursor-pointer.visible {
    display: block;
}

.tutorial-hand-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
    animation: handTapBounce 1.2s infinite ease-in-out;
}

/* Pulsing Target Ring around the guided difference */
.tutorial-target-ring {
    position: absolute;
    width: 64px;
    height: 64px;
    border: 3.5px dashed #7bed2f;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 1005;
    pointer-events: none;
    box-shadow: 0 0 16px #7bed2f;
    animation: ringRotatePulse 1.6s infinite linear;
    display: none;
}

@keyframes handTapBounce {
    0%, 100% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(0.80) translate(-6px, -6px); }
}

@keyframes ringRotatePulse {
    0% { transform: translate(-50%, -50%) rotate(0deg) scale(1); opacity: 0.9; }
    50% { transform: translate(-50%, -50%) rotate(180deg) scale(1.18); opacity: 1; }
    100% { transform: translate(-50%, -50%) rotate(360deg) scale(1); opacity: 0.9; }
}
