/* Tutorial System - Duck Boss Guide (v30.4) */

/* Backdrop dim - allows interaction with highlighted element through transparent area */
#tutorial-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9990;
    pointer-events: auto;
    transition: opacity 300ms ease;
}

/* Highlight ring around target element */
.tutorial-highlight {
    position: relative;
    z-index: 9991 !important;
    box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.95), 0 0 30px 10px rgba(0, 217, 255, 0.5);
    border-radius: 12px;
    animation: tutorial-pulse 1.6s ease-in-out infinite;
}

@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(0, 217, 255, 0.95), 0 0 30px 10px rgba(0, 217, 255, 0.5); }
    50%      { box-shadow: 0 0 0 6px rgba(0, 217, 255, 1), 0 0 50px 15px rgba(0, 217, 255, 0.8); }
}

/* Duck Boss character container */
#tutorial-duck-boss {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    gap: 12px;
    pointer-events: auto;
    animation: tutorial-boss-enter 400ms ease-out;
}

@keyframes tutorial-boss-enter {
    from { transform: translateX(-120%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

#tutorial-duck-boss img {
    width: 110px;
    height: auto;
    image-rendering: pixelated;
    filter: drop-shadow(0 4px 12px rgba(0, 217, 255, 0.45));
    animation: tutorial-boss-bounce 2s ease-in-out infinite;
}

@keyframes tutorial-boss-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* Speech bubble */
#tutorial-bubble {
    background: linear-gradient(135deg, #1a1625 0%, #0a0015 100%);
    border: 2px solid rgba(0, 217, 255, 0.6);
    border-radius: 16px;
    padding: 14px 18px;
    max-width: min(340px, calc(100vw - 180px));
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 6px 24px rgba(0,0,0,0.5), 0 0 20px rgba(0,217,255,0.2);
    position: relative;
    animation: tutorial-bubble-appear 400ms ease-out;
}

@keyframes tutorial-bubble-appear {
    from { transform: scale(0.85) translateY(8px); opacity: 0; }
    to   { transform: scale(1) translateY(0); opacity: 1; }
}

/* Bubble tail pointing to Duck Boss */
#tutorial-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    bottom: 22px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 10px 8px 0;
    border-color: transparent rgba(0, 217, 255, 0.6) transparent transparent;
}

#tutorial-bubble-text {
    min-height: 1.5em;
}

#tutorial-controls {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    align-items: center;
}

.tutorial-btn {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all 200ms;
    cursor: pointer;
    border: none;
}

.tutorial-btn-next {
    background: linear-gradient(90deg, #f4e225, #d4c220);
    color: #0a0015;
}
.tutorial-btn-next:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 226, 37, 0.4);
}

.tutorial-btn-skip {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
}
.tutorial-btn-skip:hover {
    background: rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.8);
}

.tutorial-step-indicator {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.1em;
}

/* Persistent skip button (top-right) */
#tutorial-skip-all {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 10000;
    background: rgba(0,0,0,0.7);
    color: rgba(255,255,255,0.7);
    border: 1px solid rgba(255,255,255,0.15);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 200ms;
}
#tutorial-skip-all:hover {
    background: rgba(0,0,0,0.9);
    color: #fff;
}

/* Mobile-friendly */
@media (max-width: 480px) {
    #tutorial-duck-boss {
        bottom: 12px;
        left: 12px;
        gap: 8px;
    }
    #tutorial-duck-boss img {
        width: 80px;
    }
    #tutorial-bubble {
        font-size: 12px;
        padding: 12px 14px;
        max-width: calc(100vw - 130px);
    }
}
