/* 验证码系统样式 */

/* 验证码容器 */
.captcha-container {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 验证码标题 */
.captcha-title {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 15px;
    text-align: center;
}

/* 验证码显示区域 */
.captcha-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* 验证码文本 */
.captcha-text {
    font-family: 'Courier New', monospace;
    font-size: 24px;
    font-weight: bold;
    color: white;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    user-select: none;
}

/* 验证码干扰线 */
.captcha-noise {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.captcha-noise::before,
.captcha-noise::after {
    content: '';
    position: absolute;
    background: rgba(255,255,255,0.1);
}

.captcha-noise::before {
    width: 2px;
    height: 100%;
    left: 25%;
    transform: rotate(15deg);
}

.captcha-noise::after {
    width: 2px;
    height: 100%;
    right: 25%;
    transform: rotate(-15deg);
}

/* 验证码输入框 */
.captcha-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 2px;
    transition: border-color 0.3s ease;
}

.captcha-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.captcha-input.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.captcha-input.success {
    border-color: #28a745;
    background-color: #f8fff9;
}

/* 验证码操作区域 */
.captcha-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

/* 刷新按钮 */
.captcha-refresh {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.captcha-refresh:hover {
    background: #5a6268;
}

.captcha-refresh:active {
    transform: translateY(1px);
}

/* 音频验证码按钮 */
.captcha-audio {
    background: #17a2b8;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.captcha-audio:hover {
    background: #138496;
}

.captcha-audio:active {
    transform: translateY(1px);
}

/* 验证码状态信息 */
.captcha-status {
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
}

.captcha-status.error {
    color: #dc3545;
}

.captcha-status.success {
    color: #28a745;
}

/* 验证码加载动画 */
.captcha-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .captcha-container {
        padding: 15px;
        margin: 10px 0;
    }
    
    .captcha-text {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .captcha-input {
        font-size: 14px;
        padding: 10px;
    }
    
    .captcha-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .captcha-refresh,
    .captcha-audio {
        width: 100%;
    }
}

/* 无障碍访问支持 */
.captcha-container:focus-within {
    box-shadow: 0 0 0 3px rgba(0,123,255,0.3);
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .captcha-display {
        background: #000;
        border: 2px solid #fff;
    }
    
    .captcha-text {
        color: #fff;
        text-shadow: none;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .captcha-loading {
        animation: none;
    }
    
    .captcha-refresh:active,
    .captcha-audio:active {
        transform: none;
    }
}