/* 验证码验证样式 - 仅移动端 */
#captchaModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    transition: opacity 0.3s ease;
}

.captcha-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.captcha-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.captcha-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 30px 20px;
    text-align: center;
}

.captcha-header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.captcha-header p {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

.captcha-body {
    padding: 30px 20px;
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

#captchaCanvas {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.captcha-refresh {
    background: #667eea;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.captcha-refresh:hover {
    background: #5568d3;
    transform: rotate(180deg);
}

.captcha-refresh:active {
    transform: rotate(180deg) scale(0.95);
}

.captcha-input-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.captcha-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 4px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.captcha-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.captcha-submit {
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    width: 100%;
    min-height: 50px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.captcha-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.captcha-submit:active {
    transform: translateY(0);
}

.captcha-error {
    color: #e74c3c;
    font-size: 14px;
    text-align: center;
    min-height: 20px;
    display: none;
    margin-top: 10px;
}

.captcha-error.show {
    display: block;
}

/* 移动端优化 */
@media (max-width: 480px) {
    .captcha-overlay {
        padding: 15px;
        align-items: flex-start;
        padding-top: 10vh;
    }
    
    .captcha-container {
        border-radius: 15px;
        margin: 0;
        max-width: 100%;
        width: 100%;
    }
    
    .captcha-header {
        padding: 20px 15px;
    }
    
    .captcha-header h2 {
        font-size: 20px;
    }
    
    .captcha-body {
        padding: 20px 15px;
    }
    
    .captcha-display {
        padding: 12px;
        flex-wrap: wrap;
    }
    
    #captchaCanvas {
        width: 100%;
        max-width: 150px;
        height: auto;
        flex: 1;
        min-width: 120px;
    }
    
    .captcha-refresh {
        width: 36px;
        height: 36px;
    }
    
    .captcha-input {
        font-size: 18px;
        padding: 15px;
        width: 100%;
        min-height: 50px;
        box-sizing: border-box;
    }
    
    .captcha-submit {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 50px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .captcha-input-group {
        width: 100%;
    }
}

/* 防止在验证码显示时滚动 */
body.captcha-active {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
}

