/* tutorial.css - 新手引导（v2：聚光灯 + 浮窗跟随） */

/* ─── 旧版全屏 overlay（仅兼容：无 target 时居中使用） ─── */
.tutorial-overlay:not(.tutorial-overlay--v2) {
    position: fixed; inset: 0; z-index: 9998;
    background: rgba(5, 8, 15, 0.92);
    display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}

/* ─── v2 透明覆盖层（聚光灯靠 spotlight 元素镂空） ─── */
.tutorial-overlay--v2 {
    animation: fadeIn 0.25s ease;
}

/* ─── 聚光灯 ─── */
.tutorial-spotlight {
    /* 重要位置样式写在内联里，这里只补视觉 */
    animation: tutorialPulse 2s ease-in-out infinite;
}
@keyframes tutorialPulse {
    0%,   100% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.78), 0 0 0 0   rgba(244, 208, 111, 0.0); }
    50%        { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.78), 0 0 0 8px rgba(244, 208, 111, 0.35); }
}

/* ─── 浮窗卡片（tutorial-card-float 是 v2 专用） ─── */
.tutorial-card-float {
    width: 360px;
    max-width: calc(100vw - 24px);
    background: var(--color-bg-light, #1a1f2e);
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--color-surface-light, #2a3142);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── 旧版全屏 card（无 target 时用全屏 overlay 居中，仅兼容 TitleScene 的 welcome） ─── */
.tutorial-overlay:not(.tutorial-overlay--v2) .tutorial-card {
    width: 90%; max-width: 440px;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-surface-light);
    box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: scaleIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tutorial-progress {
    height: 3px; background: var(--color-surface, #2a3142);
}
.tutorial-progress__fill {
    height: 100%; background: var(--color-gold, #f4d06f);
    transition: width 0.4s ease;
}
.tutorial-step {
    padding: 24px 22px 18px;
    text-align: center;
}
.tutorial-step__icon {
    font-size: 40px;
    margin-bottom: 10px;
    line-height: 1;
    animation: float 3s ease infinite;
}
.tutorial-step__title {
    font-size: 17px; font-weight: 800;
    margin-bottom: 10px;
    color: var(--color-gold, #f4d06f);
    letter-spacing: 0.5px;
}
.tutorial-step__content {
    font-size: 13px;
    line-height: 1.75;
    color: var(--color-text, #e6e9f2);
    text-align: left;
    max-height: 32vh;
    overflow-y: auto;
}
.tutorial-step__content strong {
    color: #f4d06f;
    font-weight: 700;
}
.tutorial-nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: var(--color-surface, #1f2531);
    border-top: 1px solid var(--color-surface-light, #2a3142);
}
.tutorial-nav .btn {
    padding: 6px 14px !important;
    font-size: 13px !important;
    min-width: 80px;
}
.tutorial-counter {
    font-size: 11px;
    color: var(--color-text-dim, #8a93a5);
    font-variant-numeric: tabular-nums;
}
.tutorial-skip { font-size: 12px !important; }

/* ─── 浮窗小箭头（可选：指向 target） ─── */
.tutorial-card-float::before {
    content: '';
    position: absolute;
    width: 12px; height: 12px;
    background: inherit;
    border: 1px solid var(--color-surface-light, #2a3142);
    transform: rotate(45deg);
    z-index: -1;
}
.tutorial-card-float[data-placement="right"]::before  { left: -7px;  top: 50%;  margin-top: -6px; border-right: none; border-top: none; }
.tutorial-card-float[data-placement="left"]::before   { right: -7px; top: 50%;  margin-top: -6px; border-left: none;  border-bottom: none; }
.tutorial-card-float[data-placement="bottom"]::before { top: -7px;   left: 50%; margin-left: -6px; border-right: none; border-bottom: none; }
.tutorial-card-float[data-placement="top"]::before    { bottom: -7px; left: 50%; margin-left: -6px; border-left: none;  border-top: none; }
