/* ===== Slide Puzzle Captcha — matches .nx- theme ===== */
.nx-puzzle-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.nx-puzzle-refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #9ca3af;
    transition: all .2s;
}
.nx-puzzle-refresh:hover {
    background: rgba(255,255,255,0.12);
    color: #fff;
}

.nx-puzzle-stage {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 170px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: #0d0f1a;
    user-select: none;
}

.nx-puzzle-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    transition: opacity .15s ease;
}

.nx-puzzle-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13,15,26,0.85);
    color: #38bdf8;
    font-size: 20px;
    z-index: 3;
}

.nx-puzzle-hole {
    position: absolute;
    border: 2px dashed rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.35);
    border-radius: 6px;
    z-index: 2;
}

.nx-puzzle-piece {
    position: absolute;
    border: 2px solid #ffffff;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    z-index: 4;
    cursor: grab;
    transition: border-color .15s ease;
}
.nx-puzzle-piece:active {
    cursor: grabbing;
}

.nx-puzzle-check {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    display: none;
    align-items: center;
    justify-content: center;
    background: #22c55e;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    z-index: 5;
}

.nx-puzzle-track {
    position: relative;
    width: 100%;
    max-width: 320px;
    height: 42px;
    margin: 10px auto 0;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.05);
    transition: background .2s, border-color .2s;
}
.nx-puzzle-track.nx-puzzle-verified {
    background: rgba(34,197,94,0.1);
    border-color: #22c55e;
}
.nx-puzzle-track.nx-puzzle-failed {
    background: rgba(239,68,68,0.1);
    border-color: #ef4444;
}

.nx-puzzle-track-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #9ca3af;
    pointer-events: none;
}

.nx-puzzle-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0ea5e9;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    cursor: grab;
    user-select: none;
    touch-action: none;
}
.nx-puzzle-handle:active {
    cursor: grabbing;
}
.nx-puzzle-handle.nx-puzzle-verified {
    background: #22c55e;
}
.nx-puzzle-handle.nx-puzzle-failed {
    background: #ef4444;
}

.nx-puzzle-error {
    margin-top: 8px;
    font-size: 12px;
    color: #ef4444;
}
