/* ========================================
   CHARACTER HUB TUTORIAL - First Visit Guide
   ======================================== */

/* Overlay - blocks interaction with hub */
#hubTutorialOverlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    pointer-events: all;
    background: transparent;
}

#hubTutorialOverlay.active {
    display: block;
}

#hubTutorialOverlay.tutorial-fullcover {
    background: rgba(4, 2, 6, 0.82);
}

/* Spotlight hole - positioned over target element */
#hubTutorialHole {
    position: fixed;
    z-index: 100001;
    box-shadow: 0 0 0 9999px rgba(4, 2, 6, 0.82);
    border-radius: 6px;
    pointer-events: none;
}

/* Pulsing border around spotlight */
#hubTutorialHole::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid rgba(90, 74, 69, 0.7);
    border-radius: 8px;
    animation: tutorialPulse 1.8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tutorialPulse {
    0%, 100% {
        border-color: rgba(90, 74, 69, 0.4);
        box-shadow: 0 0 8px rgba(90, 74, 69, 0.15);
    }
    50% {
        border-color: rgba(90, 74, 69, 0.9);
        box-shadow: 0 0 16px rgba(90, 74, 69, 0.35);
    }
}

/* Tooltip - panel frame-compact style */
#hubTutorialTooltip {
    position: fixed;
    z-index: 100002;
    width: clamp(360px, 30vw, 500px);
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    transition: top 0.3s ease, left 0.3s ease;
    pointer-events: all;
    overflow-y: auto;
}

#hubTutorialTooltip.no-transition {
    transition: none !important;
}

#hubTutorialTooltip .panel-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Step counter */
.tutorial-step-counter {
    font-family: 'SFPixelate', 'Courier New', monospace;
    font-size: clamp(14px, 1.1vw, 17px);
    color: #c0a898;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
    margin-top: 4px;
}

/* Step text */
.tutorial-step-text {
    font-family: 'SFPixelate', 'Courier New', monospace;
    font-size: clamp(15px, 1.2vw, 19px);
    color: var(--kit-text-color, #8a7a75);
    line-height: 1.5;
    text-align: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 4px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
}

/* Action buttons row */
.tutorial-actions {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.tutorial-actions .btn {
    min-width: 0;
    flex: 0 1 auto;
    cursor: var(--cm-cursor-action, pointer);
    padding: 4px 4px;
}

.tutorial-actions .btn.panel > .panel-content {
    font-family: 'SFPixelate', 'Courier New', monospace;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 0 8px;
    box-sizing: border-box;
    height: 100%;
}

/* Selected state — matches main-menu pattern */
.tutorial-actions .btn.selected {
    --kit-frame-color: #6a5040;
    --kit-frame-inner: #4a3530;
    --kit-corner-color: #8a6a55;
    --kit-diamond-color: #aa8a70;
}

.tutorial-actions .btn.selected > .panel-content {
    color: #c0a080;
}

/* ========================================
   MEDIA QUERIES
   ======================================== */

@media (max-width: 1920px) {
    #hubTutorialTooltip {
        width: clamp(340px, 28vw, 460px);
    }
}

@media (max-width: 1366px) {
    #hubTutorialTooltip {
        width: clamp(320px, 26vw, 420px);
    }

    .tutorial-actions .btn {
        min-width: 80px;
    }
}
