/* 注册弹窗样式 */
.register-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.register-modal-overlay.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.register-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.register-modal-overlay.show .register-modal {
    transform: translateY(0);
    opacity: 1;
}

.register-modal-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e8ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.register-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.register-modal-title i {
    font-size: 24px;
}

.register-modal-body {
    padding: 24px;
}

.register-modal-subtitle {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.register-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-weight: 500;
    color: #2d3748;
    font-size: 14px;
}

.form-label .required {
    color: #e53e3e;
}

.form-input {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.form-hint {
    font-size: 12px;
    color: #718096;
    margin-top: 4px;
}

.error-message {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
    animation: shake 0.5s ease;
}

.phone-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.phone-prefix {
    background: #f7fafc;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-weight: 500;
    color: #4a5568;
    min-width: 60px;
    text-align: center;
}

.phone-separator {
    color: #a0aec0;
    font-weight: 500;
}

.phone-input {
    flex: 1;
    min-width: 60px;
    text-align: center;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.phone-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.phone-input.error {
    border-color: #e53e3e;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

.register-modal-footer {
    padding: 20px 24px 24px;
    border-top: 1px solid #e8ecef;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.modal-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.modal-btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.modal-btn-secondary:hover:not(:disabled) {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .register-modal {
        width: 95%;
        margin: 20px;
    }
    
    .register-modal-header,
    .register-modal-body,
    .register-modal-footer {
        padding: 20px;
    }
    
    .phone-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .phone-prefix {
        order: -1;
        width: 100%;
    }
    
    .phone-separator {
        display: none;
    }
    
    .phone-input {
        flex: none;
        width: 100%;
    }
    
    .register-modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .register-modal-title {
        font-size: 18px;
    }
    
    .form-input,
    .phone-input {
        font-size: 14px;
        padding: 10px 12px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 成功状态 */
.form-input.success {
    border-color: #48bb78;
    box-shadow: 0 0 0 3px rgba(72, 187, 120, 0.1);
}

/* 加载状态 */
.form-input.loading {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' stroke='%23667eea' stroke-width='2' fill='none' stroke-dasharray='15.7 15.7'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}


/* 现有信息显示样式 */
.existing-mobile-info {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.existing-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0369a1;
}

.existing-info .fa-check-circle {
    color: #10b981;
}

.info-label {
    font-weight: 500;
    font-size: 14px;
}

.info-value {
    font-weight: 600;
    font-size: 14px;
}

/* 隐藏字段的过渡效果 */
.form-group {
    transition: all 0.3s ease;
}

.form-group[style*="display: none"] {
    display: block !important;
    height: 0;
    opacity: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
}