/* 图片识别验证样式 */
.image-captcha-container {
    margin: 10px 0;
    padding: 10px;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
}

.captcha-title {
    color: #e0e0e0;
    font-size: 13px;
    margin-bottom: 8px;
    text-align: center;
    font-weight: 500;
}

.captcha-instruction {
    color: #4CAF50;
    font-size: 12px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
    padding: 6px;
    background: rgba(76, 175, 80, 0.1);
    border-radius: 4px;
}

.captcha-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 10px;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.captcha-image {
    position: relative;
    aspect-ratio: 1;
    background: #2a2a2a;
    border: 2px solid #3a3a3a;
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    user-select: none;
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.captcha-image img[loading] {
    opacity: 0;
}

.captcha-image img.loaded {
    opacity: 1;
}

/* 加载动画 */
.captcha-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #4CAF50;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    z-index: 1;
}

.captcha-image.image-loaded::before {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.captcha-image:hover {
    border-color: #4CAF50;
    transform: scale(0.95);
}

.captcha-image.selected {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
}

.captcha-image.selected::after {
    content: '✓';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    background: #4CAF50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.captcha-actions {
    display: flex;
    gap: 8px;
}

.captcha-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.captcha-btn-verify {
    background: #4CAF50;
    color: white;
}

.captcha-btn-verify:hover {
    background: #45a049;
}

.captcha-btn-verify:disabled {
    background: #666;
    cursor: not-allowed;
}

.captcha-btn-refresh {
    background: #2196F3;
    color: white;
}

.captcha-btn-refresh:hover {
    background: #1976D2;
}

.captcha-message {
    margin-top: 8px;
    padding: 6px;
    border-radius: 4px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
}

.captcha-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
}

.captcha-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
}

.captcha-message.hidden {
    display: none;
}

/* 验证中状态 */
.captcha-container.verifying .captcha-grid {
    pointer-events: none;
    opacity: 0.6;
}

/* 响应式 */
@media (max-width: 600px) {
    .captcha-title {
        font-size: 12px;
    }
    
    .captcha-instruction {
        font-size: 11px;
    }
    
    .captcha-btn {
        font-size: 11px;
        padding: 7px;
    }
    
    .captcha-grid {
        max-width: 240px;
    }
}

