/* 滑动拼图验证模块基础样式 - 保留用户微调的值 */

.captcha-container {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    backdrop-filter: none;
}

.captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.captcha-title {
    color: #0EA5E9;
    font-size: 1.0rem;
    font-weight: 400;
    margin-left: 2.0rem;
    font-family: var(--font-family-tech);
}

.captcha-actions {
    display: flex;
    gap: 0.5rem;
}

.captcha-refresh,
.captcha-close {
    background: transparent;
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: #9CA3AF;
    width: 32px;
    height: 32px;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.captcha-refresh:hover,
.captcha-close:hover {
    background: rgba(14, 165, 233, 0.2);
    border-color: rgba(14, 165, 233, 0.6);
    color: #0EA5E9;
}

.captcha-box {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 300px;
    margin: 0 auto;
    position: relative;
}

.captcha-puzzle {
    position: relative;
    height: 150px;
    width: 300px;
    background: rgba(15, 23, 42, 0.8);
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.puzzle-piece {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0EA5E9, #22D3EE);
    border-radius: 0.25rem;
    cursor: grab;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.puzzle-piece:active {
    cursor: grabbing;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

.puzzle-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(14, 165, 233, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(14, 165, 233, 0.3);
    font-size: 0.875rem;
    background-size: cover;
    background-position: center;
}

.puzzle-gap {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px dashed rgba(255, 255, 255, 0.8);
    border-radius: 0.25rem;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.captcha-slider {
    position: relative;
    height: 50px;
    width: 300px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 50px;
    background: transparent;
    transform: translateY(-50%);
    border-radius: 2.2rem;
    border: 0px;
}

.slider-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #0EA5E9, #22D3EE);
    border-radius: 50%;
    transform: translateY(-50%);
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.4);
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-handle:active {
    cursor: grabbing;
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.6);
}

.slider-handle.success {
    background: linear-gradient(135deg, #10B981, #34D399);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.slider-handle.error {
    background: linear-gradient(135deg, #EF4444, #F87171);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.slider-text {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    text-align: center;
    color: #9CA3AF;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
}

/* 滑动拼图验证遮罩层 */
.captcha-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    backdrop-filter: blur(10px);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.captcha-modal {
    position: relative;
    border-radius: 0.3rem;
    padding: 1.0rem;
    animation: modalSlideIn 0.4s ease-out;
    max-width: 90vw;
    width: 350px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.captcha-close {
    position: absolute;
    top: 1rem;
    right: 1.6rem;
    background: transparent;
    border: none;
    color: #9CA3AF;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.captcha-close:hover {
    color: #EF4444;
    transform: rotate(90deg);
}

.captcha-refresh {
    position: absolute;
    top: 1rem;
    right: 4.5rem;
    background: transparent;
    border: none;
    color: #9CA3AF;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.captcha-refresh:hover {
    color: #0EA5E9;
    transform: rotate(180deg);
}

.captcha-message {
    position: absolute;
    top: -47px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgb(240, 52, 52);
    color: #ffffff;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 0 0 0.375rem 0.375rem;
    text-align: center;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 30;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    width: 300px;
}

.captcha-message.show {
    opacity: 1;
}
