/* ========== Overlay ========== */
.ft-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 9995;
    background: rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ft-guide-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ========== Root & Card ========== */
.ft-guide-root {
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
}

body.ft-guide-model-preview-open #lens-model-picker {
    z-index: 9997;
}

.ft-guide-card {
    position: fixed;
    width: min(340px, calc(100vw - 112px));
    max-width: calc(100vw - 32px);
    padding: 0;
    border-radius: 24px;
    background: rgba(13, 13, 24, 0.97);
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.32);
    color: #fff;
    pointer-events: auto;
    overflow: hidden;
}

/* ========== Header ========== */
.ft-guide-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 0;
}

.ft-guide-step-counter {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.04em;
}

.ft-guide-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.ft-guide-close:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

/* ========== Step Body ========== */
.ft-guide-step-body {
    padding: 12px 16px 8px;
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.ft-guide-step-body.ft-guide-step-enter {
    opacity: 0;
    transform: translateY(8px);
}

/* ========== Demo (step 1) ========== */
.ft-guide-demo {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    background: #171824;
    user-select: none;
    touch-action: none;
    margin-bottom: 4px;
}

.ft-guide-demo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
}

.ft-guide-demo-after {
    clip-path: inset(0 0 0 50%);
}

.ft-guide-divider {
    position: absolute;
    top: 6%;
    bottom: 6%;
    width: 4px;
    margin-left: -2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.ft-guide-handle {
    position: absolute;
    top: 50%;
    width: 26px;
    height: 26px;
    margin: -13px 0 0 -13px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.ft-guide-label {
    position: absolute;
    top: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.ft-guide-label-before {
    left: 14px;
    background: rgba(39, 39, 48, 0.9);
}

.ft-guide-label-after {
    right: 14px;
    background: linear-gradient(135deg, #5e47ff, #875cff);
}

.ft-guide-hint {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    min-width: 190px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(24, 24, 38, 0.76);
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

/* ========== Title & Subtitle ========== */
.ft-guide-title {
    margin: 12px 0 6px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.15;
}

.ft-guide-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.5;
}

/* ========== Navigation ========== */
.ft-guide-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 8px;
}

.ft-guide-dots {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ft-guide-dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.ft-guide-dot.active {
    background: #a78bfa;
    transform: scale(1.25);
}

.ft-guide-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
}

.ft-guide-btn {
    min-width: 64px;
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.ft-guide-btn:active {
    transform: scale(0.96);
}

.ft-guide-btn-prev {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.ft-guide-btn-prev:hover {
    background: rgba(255, 255, 255, 0.16);
}

.ft-guide-btn-next {
    background: linear-gradient(135deg, #5e47ff, #7c5cff);
    color: #fff;
}

.ft-guide-btn-next:hover {
    background: linear-gradient(135deg, #6e57ff, #8c6cff);
}

.ft-guide-btn-finish {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.ft-guide-btn-finish:hover {
    background: linear-gradient(135deg, #34d76f, #22b858);
}

/* ========== Footer (checkbox) ========== */
.ft-guide-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 14px;
    cursor: pointer;
    user-select: none;
}

.ft-guide-checkbox {
    width: 16px;
    height: 16px;
    accent-color: #7c5cff;
    cursor: pointer;
    flex-shrink: 0;
}

.ft-guide-check-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s;
}

.ft-guide-footer:hover .ft-guide-check-label {
    color: rgba(255, 255, 255, 0.7);
}

/* ========== Pointer Line ========== */
.ft-guide-line {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: visible;
    z-index: 9997;
    pointer-events: none;
}

.ft-guide-line path {
    fill: none;
    stroke: rgba(255, 210, 70, 0.96);
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    filter: drop-shadow(0 0 8px rgba(255, 210, 70, 0.2));
}

.ft-guide-line .ft-guide-line-glow {
    stroke: rgba(255, 239, 176, 0.92);
    stroke-width: 2.2;
    stroke-dasharray: 18 96;
    stroke-dashoffset: 0;
    filter: drop-shadow(0 0 10px rgba(255, 226, 132, 0.32));
    animation: ft-guide-line-flow 2.8s linear infinite;
}

/* ========== Target Ring ========== */
.ft-guide-target {
    position: fixed;
    border-radius: 18px;
    border: 2px solid rgba(255, 210, 70, 0.92);
    box-shadow: 0 0 0 5px rgba(255, 210, 70, 0.14);
    z-index: 9996;
    pointer-events: none;
    transition: left 0.35s ease, top 0.35s ease, width 0.35s ease, height 0.35s ease;
}

/* ========== Trigger Button ========== */
.ft-guide-trigger {
    position: fixed;
    right: 18px;
    bottom: 94px;
    z-index: 9996;
    min-width: 58px;
    height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: rgba(24, 28, 43, 0.92);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ft-guide-trigger:hover {
    transform: scale(1.06);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.24);
}

.ft-guide-trigger[hidden],
.ft-guide-root[hidden] {
    display: none !important;
}

/* ========== Animations ========== */
@keyframes ft-guide-line-flow {
    from { stroke-dashoffset: 124; }
    to { stroke-dashoffset: 0; }
}

/* ========== Mobile ========== */
@media (max-width: 767px) {
    .ft-guide-card {
        width: min(308px, calc(100vw - 86px));
        max-width: calc(100vw - 18px);
        border-radius: 22px;
    }

    .ft-guide-step-body {
        padding: 10px 14px 6px;
    }

    .ft-guide-demo {
        border-radius: 16px;
    }

    .ft-guide-label {
        top: 12px;
        padding: 7px 12px;
        font-size: 13px;
    }

    .ft-guide-hint {
        min-width: 164px;
        padding: 9px 14px;
        font-size: 13px;
    }

    .ft-guide-title {
        margin-top: 10px;
        font-size: 15px;
    }

    .ft-guide-subtitle {
        font-size: 12px;
    }

    .ft-guide-nav {
        padding: 10px 14px;
    }

    .ft-guide-trigger {
        right: 16px;
        bottom: 108px;
    }
}
