/* ============================================
   封神与哪吒 - 新手引导样式
   高亮遮罩 + 气泡提示 + 动画引导
   ============================================ */

/* ---------- 遮罩层 ---------- */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tutorial-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- 高亮挖孔区域 ---------- */
.tutorial-highlight {
    position: absolute;
    border-radius: 8px;
    box-shadow:
        0 0 0 9999px rgba(10, 10, 26, 0.82),
        0 0 0 3px rgba(212, 168, 83, 0.6),
        0 0 20px rgba(212, 168, 83, 0.3);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 1;
}

.tutorial-highlight--pulse {
    animation: highlightPulse 1.8s ease-in-out infinite;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow:
            0 0 0 9999px rgba(10, 10, 26, 0.82),
            0 0 0 3px rgba(212, 168, 83, 0.6),
            0 0 20px rgba(212, 168, 83, 0.3);
    }
    50% {
        box-shadow:
            0 0 0 9999px rgba(10, 10, 26, 0.82),
            0 0 0 3px rgba(212, 168, 83, 0.9),
            0 0 30px rgba(212, 168, 83, 0.5);
    }
}

/* ---------- 提示气泡 ---------- */
.tutorial-bubble {
    position: absolute;
    max-width: 280px;
    min-width: 200px;
    background: linear-gradient(135deg, #1a1a3e 0%, #2a2a4a 100%);
    border: 1px solid rgba(212, 168, 83, 0.4);
    border-radius: 12px;
    padding: 16px 18px;
    color: #f5efe0;
    z-index: 2;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.tutorial-bubble.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 气泡箭头 */
.tutorial-bubble::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #2a2a4a;
    border: 1px solid rgba(212, 168, 83, 0.4);
    transform: rotate(45deg);
}

/* 气泡在下方时箭头朝上 */
.tutorial-bubble[data-pos="bottom"]::before {
    top: -7px;
    left: 50%;
    margin-left: -6px;
    border-right: none;
    border-bottom: none;
}

/* 气泡在上方时箭头朝下 */
.tutorial-bubble[data-pos="top"]::before {
    bottom: -7px;
    left: 50%;
    margin-left: -6px;
    border-left: none;
    border-top: none;
}

/* 气泡在左侧时箭头朝右 */
.tutorial-bubble[data-pos="left"]::before {
    right: -7px;
    top: 50%;
    margin-top: -6px;
    border-left: none;
    border-bottom: none;
}

/* 气泡在右侧时箭头朝左 */
.tutorial-bubble[data-pos="right"]::before {
    left: -7px;
    top: 50%;
    margin-top: -6px;
    border-right: none;
    border-top: none;
}

/* ---------- 气泡内容 ---------- */
.tutorial-step-indicator {
    font-size: 0.65rem;
    color: rgba(212, 168, 83, 0.6);
    letter-spacing: 0.1em;
    margin-bottom: 6px;
    font-family: 'ZCOOL XiaoWei', serif;
}

.tutorial-title {
    font-family: 'ZCOOL XiaoWei', serif;
    font-size: 1.05rem;
    color: #d4a853;
    margin-bottom: 6px;
    text-shadow: 0 0 8px rgba(212, 168, 83, 0.2);
}

.tutorial-desc {
    font-size: 0.8rem;
    color: rgba(245, 239, 224, 0.8);
    line-height: 1.6;
}

/* ---------- 操作按钮 ---------- */
.tutorial-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    align-items: center;
}

.tutorial-btn {
    padding: 7px 18px;
    border: 1px solid rgba(212, 168, 83, 0.4);
    border-radius: 999px;
    background: rgba(212, 168, 83, 0.1);
    color: #d4a853;
    font-size: 0.8rem;
    font-family: 'Noto Sans SC', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.05em;
}

.tutorial-btn:hover {
    background: rgba(212, 168, 83, 0.2);
    border-color: #d4a853;
}

.tutorial-btn:active {
    transform: scale(0.95);
}

.tutorial-btn--primary {
    background: rgba(192, 60, 60, 0.8);
    border-color: rgba(192, 60, 60, 1);
    color: #fff;
}

.tutorial-btn--primary:hover {
    background: rgba(192, 60, 60, 1);
}

.tutorial-btn--skip {
    border: none;
    background: transparent;
    color: rgba(245, 239, 224, 0.35);
    font-size: 0.7rem;
    margin-left: auto;
    padding: 7px 8px;
}

.tutorial-btn--skip:hover {
    color: rgba(245, 239, 224, 0.6);
    background: transparent;
}

/* ---------- 进度点 ---------- */
.tutorial-dots {
    display: flex;
    gap: 5px;
    align-items: center;
}

.tutorial-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(212, 168, 83, 0.2);
    transition: all 0.3s ease;
}

.tutorial-dot.is-active {
    background: #d4a853;
    width: 16px;
    border-radius: 3px;
}

.tutorial-dot.is-done {
    background: rgba(212, 168, 83, 0.5);
}

/* ---------- 手指引导动画 ---------- */
.tutorial-finger {
    position: absolute;
    width: 28px;
    height: 28px;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.tutorial-finger.is-visible {
    opacity: 1;
}

.tutorial-finger svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    animation: fingerTap 1.2s ease-in-out infinite;
}

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

/* ---------- 全屏遮罩（无高亮时） ---------- */
.tutorial-overlay--fullmask {
    background: rgba(10, 10, 26, 0.85);
}

.tutorial-overlay--fullmask .tutorial-highlight {
    display: none;
}
