/**
 * Tour Guide Styles
 * 交互式引导系统样式
 */

/* 遮罩层 */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tour-overlay.active {
    opacity: 1;
}

/* 高亮区域 */
.tour-spotlight {
    position: absolute;
    border: 3px solid #3498db;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75),
                0 0 20px rgba(52, 152, 219, 0.8);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.tour-spotlight.pulse {
    animation: spotlightPulse 2s infinite;
}

@keyframes spotlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 20px rgba(52, 152, 219, 0.8);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75), 0 0 35px rgba(52, 152, 219, 1);
    }
}

/* 提示框容器 */
.tour-tooltip {
    position: absolute;
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 420px;
    min-width: 300px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-tooltip.active {
    opacity: 1;
    transform: scale(1);
}

/* 提示框箭头 */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
}

.tour-tooltip.position-bottom::before {
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 10px 10px 10px;
    border-color: transparent transparent white transparent;
}

.tour-tooltip.position-top::before {
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 10px 10px 0 10px;
    border-color: white transparent transparent transparent;
}

.tour-tooltip.position-left::before {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 0 10px 10px;
    border-color: transparent transparent transparent white;
}

.tour-tooltip.position-right::before {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 10px 10px 0;
    border-color: transparent white transparent transparent;
}

/* 提示框内容 */
.tour-tooltip-header {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #2c3e50;
    line-height: 1.3;
}

.tour-tooltip-content {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    white-space: pre-line;
    margin-bottom: 16px;
}

/* 时间提醒标签 */
.tour-tooltip-timer {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 8px;
    font-weight: 500;
}

.tour-tooltip-timer.warning {
    background: #f8d7da;
    color: #721c24;
    animation: timerBlink 1s infinite;
}

@keyframes timerBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 功能标签 */
.tour-tooltip-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1976d2;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    margin-top: 8px;
    font-weight: 500;
}

/* 底部操作区 */
.tour-tooltip-footer {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e1e8ed;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tour-progress {
    font-size: 14px;
    color: #888;
    font-weight: 500;
}

.tour-buttons {
    display: flex;
    gap: 10px;
}

.tour-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

.tour-btn-skip {
    background: #ecf0f1;
    color: #7f8c8d;
}

.tour-btn-skip:hover {
    background: #d5d8dc;
}

.tour-btn-prev {
    background: #e8f4f8;
    color: #3498db;
}

.tour-btn-prev:hover {
    background: #d4ebf4;
}

.tour-btn-next {
    background: #3498db;
    color: white;
    font-weight: bold;
}

.tour-btn-next:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.tour-btn-complete {
    background: #27ae60;
    color: white;
    font-weight: bold;
}

.tour-btn-complete:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* 进度条 */
.tour-progress-bar {
    width: 100%;
    height: 4px;
    background: #e1e8ed;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
}

.tour-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.4s ease;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .tour-tooltip {
        max-width: 90vw;
        min-width: unset;
        padding: 20px;
    }

    .tour-tooltip-header {
        font-size: 18px;
    }

    .tour-tooltip-content {
        font-size: 14px;
    }

    .tour-buttons {
        flex-direction: column;
        width: 100%;
    }

    .tour-btn {
        width: 100%;
    }
}

/* 动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 最终步骤的中心样式 */
.tour-tooltip.position-center {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.tour-tooltip.position-center.active {
    transform: translate(-50%, -50%) scale(1);
}

.tour-tooltip.position-center::before {
    display: none;
}

/* 高亮元素确保可见 */
.tour-highlighted {
    position: relative;
    z-index: 10000 !important;
}
