/* checkin-flow.css — 王者打卡全流程：步骤条 / 可见滚动条 / 下滑提示 */

/* ══════════ 强制可见滚动条（手机端一眼能看出可滑） ══════════ */
.checkin-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: rgba(240, 192, 64, 0.85) rgba(255, 255, 255, 0.14);
}

.checkin-scroll::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.checkin-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    margin: 4px 0;
}

.checkin-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #f0c040, #d4a017);
    border-radius: 999px;
    border: 2px solid rgba(10, 14, 23, 0.35);
    min-height: 36px;
}

.checkin-scroll::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffd666, #f0c040);
}

/* ══════════ 流程步骤条 ══════════ */
.checkin-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex-wrap: wrap;
    padding: 10px 12px;
    margin: 0 0 12px;
    background: rgba(240, 192, 64, 0.08);
    border: 1px solid rgba(240, 192, 64, 0.28);
    border-radius: 12px;
    box-sizing: border-box;
}

.checkin-stepper__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.checkin-stepper__num {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    flex-shrink: 0;
}

.checkin-stepper__item--done {
    color: #3ecf8e;
}

.checkin-stepper__item--done .checkin-stepper__num {
    background: rgba(62, 207, 142, 0.2);
    color: #3ecf8e;
}

.checkin-stepper__item--active {
    color: #f0c040;
}

.checkin-stepper__item--active .checkin-stepper__num {
    background: rgba(240, 192, 64, 0.25);
    color: #f0c040;
    box-shadow: 0 0 0 2px rgba(240, 192, 64, 0.25);
}

.checkin-stepper__arrow {
    color: rgba(255, 255, 255, 0.25);
    font-size: 12px;
    padding: 0 2px;
    user-select: none;
}

/* ══════════ 礼遇说明卡 ══════════ */
.checkin-rewards {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(240, 192, 64, 0.12), rgba(255, 107, 138, 0.08));
    border: 1px solid rgba(240, 192, 64, 0.3);
    color: #e8ecf4;
    font-size: 12px;
    line-height: 1.65;
    text-align: left;
    box-sizing: border-box;
}

.checkin-rewards__title {
    font-size: 13px;
    font-weight: 800;
    color: #f0c040;
    margin-bottom: 6px;
}

.checkin-rewards p {
    margin: 0 0 4px;
}

.checkin-rewards p:last-child {
    margin-bottom: 0;
}

.checkin-rewards strong {
    color: #fff;
}

/* 礼遇框内合并的城市探索入口（紧凑一行） */
.checkin-rewards__explore {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255, 255, 255, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.checkin-rewards__explore-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: left;
}

.checkin-rewards__explore-text strong {
    font-size: 12px;
    color: #f0c040;
}

.checkin-rewards__explore-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.checkin-rewards__explore--ready .checkin-rewards__explore-text span {
    color: rgba(255, 255, 255, 0.78);
}

.checkin-rewards__explore-btn {
    flex-shrink: 0;
    min-width: 120px;
    padding: 7px 12px !important;
    font-size: 12px !important;
    font-weight: 800;
}

.checkin-rewards__explore-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(0.3);
}

/* ══════════ 下滑提示（贴底，可滚动时显示） ══════════ */
.checkin-scroll-wrap {
    position: relative;
    min-height: 0;
}

.checkin-scroll-hint {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 5;
    pointer-events: none;
    display: flex;
    justify-content: center;
    padding: 28px 8px 8px;
    margin-top: -28px;
    background: linear-gradient(180deg, transparent, rgba(10, 14, 23, 0.92) 45%);
    color: #f0c040;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    animation: checkin-hint-bob 1.4s ease-in-out infinite;
}

.checkin-scroll-hint[hidden] {
    display: none !important;
}

@keyframes checkin-hint-bob {
    0%, 100% { transform: translateY(0); opacity: 0.85; }
    50% { transform: translateY(3px); opacity: 1; }
}

@media (max-width: 640px) {
    .checkin-stepper__item { font-size: 11px; }
    .checkin-rewards { font-size: 11px; }
}

/* ══════════ 无障碍引导：七彩循环光芒 + 缩放呼吸 ══════════
   阅读障碍 / 不识字用户：全程只点带此样式的控件即可走完打卡流程 */
.checkin-guide-pulse {
    position: relative;
    z-index: 40 !important;
    animation:
        checkin-guide-scale 1.05s ease-in-out infinite,
        checkin-guide-rainbow 2.4s linear infinite !important;
    outline: 3px solid #ff0040;
    outline-offset: 4px;
    border-radius: inherit;
    filter: saturate(1.15);
}

/* 避免原组件 hover transform / transition 打断呼吸动画 */
.explore-node.checkin-guide-pulse--anchored,
.explore-node.checkin-guide-pulse--anchored:hover {
    transition: border-color 0.2s ease, filter 0.2s ease !important;
}

.title-menu__checkin.checkin-guide-pulse:hover {
    transform: none;
}

/* 地图节点：保留 translate(-50%,-50%) 居中 */
.checkin-guide-pulse--anchored {
    animation:
        checkin-guide-scale-anchored 1.05s ease-in-out infinite,
        checkin-guide-rainbow 2.4s linear infinite !important;
}

/* SVG 战队光点：不用 CSS scale，避免覆盖 transform 属性定位 */
.checkin-guide-pulse--svg {
    animation: checkin-guide-rainbow-svg 2.4s linear infinite !important;
    outline: none;
}

.checkin-guide-pulse--svg .marker-dot {
    animation: checkin-guide-svg-dot 1.05s ease-in-out infinite;
}

@keyframes checkin-guide-scale {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

@keyframes checkin-guide-scale-anchored {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.18); }
}

@keyframes checkin-guide-rainbow {
    0% {
        outline-color: #ff0040;
        box-shadow:
            0 0 0 4px rgba(255, 0, 64, 0.45),
            0 0 22px 8px rgba(255, 0, 64, 0.55),
            0 0 48px 14px rgba(255, 0, 64, 0.28);
    }
    16% {
        outline-color: #ff8c00;
        box-shadow:
            0 0 0 4px rgba(255, 140, 0, 0.45),
            0 0 22px 8px rgba(255, 140, 0, 0.55),
            0 0 48px 14px rgba(255, 140, 0, 0.28);
    }
    33% {
        outline-color: #ffe600;
        box-shadow:
            0 0 0 4px rgba(255, 230, 0, 0.5),
            0 0 22px 8px rgba(255, 230, 0, 0.55),
            0 0 48px 14px rgba(255, 230, 0, 0.28);
    }
    50% {
        outline-color: #00e676;
        box-shadow:
            0 0 0 4px rgba(0, 230, 118, 0.45),
            0 0 22px 8px rgba(0, 230, 118, 0.55),
            0 0 48px 14px rgba(0, 230, 118, 0.28);
    }
    66% {
        outline-color: #00b0ff;
        box-shadow:
            0 0 0 4px rgba(0, 176, 255, 0.45),
            0 0 22px 8px rgba(0, 176, 255, 0.55),
            0 0 48px 14px rgba(0, 176, 255, 0.28);
    }
    83% {
        outline-color: #a855f7;
        box-shadow:
            0 0 0 4px rgba(168, 85, 247, 0.45),
            0 0 22px 8px rgba(168, 85, 247, 0.55),
            0 0 48px 14px rgba(168, 85, 247, 0.28);
    }
    100% {
        outline-color: #ff0040;
        box-shadow:
            0 0 0 4px rgba(255, 0, 64, 0.45),
            0 0 22px 8px rgba(255, 0, 64, 0.55),
            0 0 48px 14px rgba(255, 0, 64, 0.28);
    }
}

@keyframes checkin-guide-rainbow-svg {
    0%   { filter: brightness(1.15) drop-shadow(0 0 10px #ff0040) drop-shadow(0 0 22px rgba(255, 0, 64, 0.7)); }
    16%  { filter: brightness(1.15) drop-shadow(0 0 10px #ff8c00) drop-shadow(0 0 22px rgba(255, 140, 0, 0.7)); }
    33%  { filter: brightness(1.2) drop-shadow(0 0 10px #ffe600) drop-shadow(0 0 22px rgba(255, 230, 0, 0.7)); }
    50%  { filter: brightness(1.15) drop-shadow(0 0 10px #00e676) drop-shadow(0 0 22px rgba(0, 230, 118, 0.7)); }
    66%  { filter: brightness(1.15) drop-shadow(0 0 10px #00b0ff) drop-shadow(0 0 22px rgba(0, 176, 255, 0.7)); }
    83%  { filter: brightness(1.15) drop-shadow(0 0 10px #a855f7) drop-shadow(0 0 22px rgba(168, 85, 247, 0.7)); }
    100% { filter: brightness(1.15) drop-shadow(0 0 10px #ff0040) drop-shadow(0 0 22px rgba(255, 0, 64, 0.7)); }
}

@keyframes checkin-guide-svg-dot {
    0%, 100% { stroke-width: 2.5; }
    50% { stroke-width: 5; }
}

@media (prefers-reduced-motion: reduce) {
    .checkin-guide-pulse,
    .checkin-guide-pulse--anchored,
    .checkin-guide-pulse--svg,
    .checkin-guide-pulse--svg .marker-dot,
    .checkin-guide-arrow,
    .checkin-guide-arrow--up {
        animation: none !important;
    }
    .checkin-guide-pulse {
        outline: 4px solid #00e676;
        box-shadow: 0 0 0 6px rgba(0, 230, 118, 0.35), 0 0 24px 8px rgba(0, 230, 118, 0.45);
    }
    .checkin-guide-pulse--svg {
        filter: brightness(1.2) drop-shadow(0 0 14px #00e676);
    }
    .checkin-guide-arrow {
        background: #00e676;
    }
}

/* ══════════ 引导目标不在视野时的浮动箭头 ══════════ */
.checkin-guide-arrow {
    position: fixed;
    left: 50%;
    bottom: max(20px, env(safe-area-inset-bottom, 0px));
    z-index: 100000;
    width: 58px;
    height: 58px;
    margin: 0;
    padding: 0;
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff0040, #ff8c00, #ffe600, #00e676, #00b0ff, #a855f7);
    background-size: 220% 220%;
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.45),
        0 0 0 4px rgba(255, 0, 64, 0.25);
    animation:
        checkin-guide-arrow-bob 1s ease-in-out infinite,
        checkin-guide-arrow-hue 2.4s linear infinite;
    -webkit-tap-highlight-color: transparent;
}

.checkin-guide-arrow[hidden] {
    display: none !important;
}

.checkin-guide-arrow--up {
    bottom: auto;
    top: max(20px, env(safe-area-inset-top, 0px));
    animation:
        checkin-guide-arrow-bob-up 1s ease-in-out infinite,
        checkin-guide-arrow-hue 2.4s linear infinite;
}

.checkin-guide-arrow__icon {
    display: block;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
    transform: translateY(-1px);
}

@keyframes checkin-guide-arrow-bob {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

@keyframes checkin-guide-arrow-bob-up {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

@keyframes checkin-guide-arrow-hue {
    0% { background-position: 0% 50%; box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 4px rgba(255,0,64,0.35); }
    20% { background-position: 40% 50%; box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 4px rgba(255,140,0,0.35); }
    40% { background-position: 70% 50%; box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 4px rgba(255,230,0,0.35); }
    60% { background-position: 100% 50%; box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 4px rgba(0,230,118,0.35); }
    80% { background-position: 50% 50%; box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 4px rgba(0,176,255,0.35); }
    100% { background-position: 0% 50%; box-shadow: 0 10px 28px rgba(0,0,0,0.45), 0 0 0 4px rgba(255,0,64,0.35); }
}
