html body {
    overflow: visible;
    overflow-x: clip;
}

/* Keyframe Scroll Animation Styles */
.ksa-scroll-sequence {
    position: relative;
    width: 100%;
}

/* Canvas Styles */
.ksa-sequence-canvas {
    position: sticky;
    top: 0;
    margin: 0 auto;
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
    display: block;
    transition: none;
}

/* Hotspot Container */
.ksa-hotspot-container {
    position: fixed;
    pointer-events: none;
    z-index: 10;
}

/* Hotspot Base Styles */
.ksa-hotspot {
    position: absolute;
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: auto;
}

.ksa-hotspot.active {
    opacity: 1;
}

/* Hotspot Dot */
.ksa-hotspot-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    animation: ksa-pulse 2s infinite;
}

@keyframes ksa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.ksa-hotspot:hover .ksa-hotspot-dot {
    /*width: 16px;
    height: 16px;*/
    background: #fff;
}

/* Hotspot Line */
.ksa-hotspot-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    transform-origin: 0 50%;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ksa-hotspot-line.top,
.ksa-hotspot-line.bottom {
    width: 2px;
    left: 50%;
    transform: translateX(-50%) scaleY(0);
}

.ksa-hotspot-line.left,
.ksa-hotspot-line.right {
    height: 2px;
    top: 50%;
    transform: translateY(-50%) scaleX(0);
}

.ksa-hotspot.active .ksa-hotspot-line.top {
    transform: translateX(-50%) scaleY(1);
}

.ksa-hotspot.active .ksa-hotspot-line.bottom {
    transform: translateX(-50%) scaleY(1);
}

.ksa-hotspot.active .ksa-hotspot-line.left {
    transform: translateY(-50%) scaleX(1);
}

.ksa-hotspot.active .ksa-hotspot-line.right {
    transform: translateY(-50%) scaleX(1);
}

/* Text Container */
.ksa-hotspot-text {
    position: absolute;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: 0.02em;
    width: 380px;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transition-delay: 0.3s;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.ksa-hotspot.active .ksa-hotspot-text {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Direction-specific positioning */
.ksa-hotspot.ksa-direction-top .ksa-hotspot-line {
    height: 60px;
    bottom: 100%;
}

.ksa-hotspot.ksa-direction-top .ksa-hotspot-text {
    bottom: calc(100% + 60px);
    left: 50%;
    transform-origin: bottom center;
    transform: translateX(-50%) scale(0.9) translateY(10px);
}

.ksa-hotspot.active.ksa-direction-top .ksa-hotspot-text {
    transform: translateX(-50%) scale(1) translateY(0);
}

.ksa-hotspot.ksa-direction-bottom .ksa-hotspot-line {
    height: 60px;
    top: 100%;
}

.ksa-hotspot.ksa-direction-bottom .ksa-hotspot-text {
    top: calc(100% + 60px);
    left: 50%;
    transform-origin: top center;
    transform: translateX(-50%) scale(0.9) translateY(-10px);
}

.ksa-hotspot.active.ksa-direction-bottom .ksa-hotspot-text {
    transform: translateX(-50%) scale(1) translateY(0);
}

.ksa-hotspot.ksa-direction-left .ksa-hotspot-line {
    width: 80px;
    right: 100%;
}

.ksa-hotspot.ksa-direction-left .ksa-hotspot-text {
    right: calc(100% + 80px);
    top: 50%;
    transform-origin: right center;
    transform: translateY(-50%) scale(0.9) translateX(10px);
}

.ksa-hotspot.active.ksa-direction-left .ksa-hotspot-text {
    transform: translateY(-50%) scale(1) translateX(0);
}

.ksa-hotspot.ksa-direction-right .ksa-hotspot-line {
    width: 80px;
    left: 100%;
}

.ksa-hotspot.ksa-direction-right .ksa-hotspot-text {
    left: calc(100% + 80px);
    top: 50%;
    transform-origin: left center;
    transform: translateY(-50%) scale(0.9) translateX(-10px);
}

.ksa-hotspot.active.ksa-direction-right .ksa-hotspot-text {
    transform: translateY(-50%) scale(1) translateX(0);
}

/* Debug Window */
.ksa-debug-window {
    position: fixed;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #0f0;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 14px;
    border-radius: 4px;
    z-index: 9999;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 0, 0.2);
}

/* Scroll pause indicator */
.ksa-scroll-paused {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 100;
}

.ksa-scroll-paused.active {
    opacity: 1;
}

/* Mobile Hotspot Styles */
@media (max-width: 768px) {
    /* Hide desktop hotspot elements on mobile */
    .ksa-hotspot-line,
    .ksa-hotspot-text {
        display: none !important;
    }

    /* Mobile hotspot number indicator */
    .ksa-hotspot-dot {
        width: 24px;
        height: 24px;
        background: rgba(0, 0, 0, 0.8);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 2px solid rgba(255, 255, 255, 0.18);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 600;
        color: #fff;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
        animation: none;
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    .ksa-hotspot-dot::before {
        content: attr(data-number);
        position: relative;
        z-index: 1;
    }

    @keyframes ksa-mobile-pulse {
        0%, 100% {
            transform: translate(-50%, -50%) scale(1);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2),
            0 1px 0 rgba(255, 255, 255, 0.06) inset,
            0 0 0 0 rgba(255, 255, 255, 0.3);
        }
        50% {
            transform: translate(-50%, -50%) scale(1.05);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
            0 1px 0 rgba(255, 255, 255, 0.06) inset,
            0 0 0 12px rgba(255, 255, 255, 0);
        }
    }

    .ksa-hotspot.active .ksa-hotspot-dot {
        background: #fff;
        color: #000;
        animation: ksa-mobile-pulse 2s ease-in-out infinite;
    }

    .ksa-hotspot:not(.active) .ksa-hotspot-dot {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(0.9);
    }

    /* Mobile bottom sheet container */
    .ksa-mobile-info-container {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        pointer-events: none;
    }

    /* Individual mobile info card */
    .ksa-mobile-info-card {
        position: absolute;
        left: 16px;
        right: 16px;
        bottom: 24px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border-radius: 20px;
        padding: 24px;
        opacity: 0;
        transform: translateY(100px) scale(0.95);
        transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.04);
        pointer-events: auto;
    }

    .ksa-mobile-info-card.active {
        opacity: 1;
        transform: translateY(0) scale(1);
        z-index: 1;
    }

    /* Stacking effect for multiple cards */
    .ksa-mobile-info-card.stacked {
        transform: translateY(-8px) scale(0.98);
        opacity: 0.4;
    }

    .ksa-mobile-info-card.stacked-2 {
        transform: translateY(-16px) scale(0.96);
        opacity: 0.2;
    }

    /* Card number indicator */
    .ksa-mobile-info-number {
        position: absolute;
        top: 24px;
        right: 24px;
        width: 32px;
        height: 32px;
        background: #000;
        color: #fff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        font-weight: 700;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
    }

    /* Card content */
    .ksa-mobile-info-title {
        font-size: 18px;
        font-weight: 600;
        color: #000;
        margin: 0 0 8px 0;
        padding-right: 48px;
        line-height: 1.3;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
        letter-spacing: -0.02em;
    }

    /* Swipe indicator */
    .ksa-mobile-swipe-indicator {
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 36px;
        height: 4px;
        background: rgba(0, 0, 0, 0.2);
        border-radius: 2px;
        opacity: 0;
        transition: opacity 0.3s ease;
        display: none;
    }

    .ksa-mobile-info-card.active .ksa-mobile-swipe-indicator {
        opacity: 1;
    }

    /* Progress dots */
    .ksa-mobile-progress {
        position: absolute;
        bottom: -2px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 6px;
        padding: 8px;
    }

    .ksa-mobile-progress-dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.2);
        transition: all 0.3s ease;
    }

    .ksa-mobile-progress-dot.active {
        background: #000;
        /*width: 18px;*/
        border-radius: 3px;
    }

    .ksa-hotspot.highlighted .ksa-hotspot-dot {
        background: #007AFF;
        color: white;
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.2),
        0 8px 32px rgba(0, 122, 255, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.06) inset;
    }

    .ksa-scroll-paused {
        display: none;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .ksa-hotspot-text {
        width: 320px;
        font-size: 15px;
    }
}