/* 注册页面样式 */

:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --border-color: #ddd;
    --shadow-color: rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #e7e7e7;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.register-container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.register-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px var(--shadow-color);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 25px 30px;
    text-align: center;
    color: white;
}

.card-header h1 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-header p {
    font-size: 14px;
    opacity: 0.9;
}

.card-header p a {
    color: white;
    text-decoration: underline;
    margin-left: 5px;
}

.card-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 22px;
    position: relative;
    height: 81px;
}

/* 标签和图标样式 */
.form-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-label .icon {
    margin-right: 6px;
    color: var(--primary-color);
    order: -1; /* 确保图标始终在最左侧 */
}

.label-text {
    flex-grow: 1;
    text-align: left;
    order: 0;
}

/* 提示信息样式 */
.form-tip {
    font-size: 13px;
    margin-left: auto;
    display: block !important;
    text-align: right;
    order: 1; /* 确保提示信息始终在最右侧 */
    min-height: 20px;
}

.form-tip.error {
    color: var(--error-color);
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
}

.form-tip.success {
    color: var(--success-color);
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
}

.ico-succ, .ico-warning {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 5px;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

.ico-succ {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%232ecc71' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
}

.ico-warning {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='16' height='16'%3E%3Cpath fill='%23e74c3c' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
}

/* 表单输入框样式 */
.form-control, .g-ipt, .g-ipt-err, .g-ipt-active {
    width: 100%;
    height: 50px;
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .g-ipt:focus, .g-ipt-active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
    outline: none;
}

.form-control.error, .g-ipt-err {
    border-color: var(--error-color);
}

.form-control.success {
    border-color: var(--success-color);
}

.error-message {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
}

.error-message .icon {
    margin-right: 5px;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control, .input-group .g-ipt, .input-group .g-ipt-err, .input-group .g-ipt-active {
    flex: 1;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52,152,219,0.3);
}

.btn:active {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 15px 25px;
    font-size: 18px;
    font-weight: 600;
}

.btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    position: fixed;
    top: 10px;
    right: 50%;
    transform: translateX(50%);
}

.alert-error {
    background-color: rgb(253, 185, 177);
    border: 1px solid rgba(231,76,60,0.3);
    color: var(--error-color);
}

.alert-success {
    background-color: rgb(172, 253, 206);
    border: 1px solid rgba(46,204,113,0.3);
    color: var(--success-color);
    text-align: center;
    padding: 40px 20px;
}

.agreement {
    text-align: center;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 20px;
}

.agreement a {
    color: var(--primary-color);
    text-decoration: none;
}

.agreement a:hover {
    text-decoration: underline;
}

/* 响应式 */
@media (max-width: 576px) {
    .register-container {
        padding: 0;
    }
    
    .register-card {
        border-radius: 0;
        box-shadow: none;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .input-group {
        flex-direction: column;
        gap: 15px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.register-card {
    animation: fadeIn 0.5s ease-out;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 密码强度样式 - 确保显示 */
.passwordStrength {
    display: inline-block !important;
    width: auto;
    height: 15px;
    line-height: 15px;
    margin-left: 8px;
    color: #666;
    font-size: 12px;
    text-align: right;
    vertical-align: middle;
    white-space: nowrap;
}
.passwordStrength b{
    font-weight: normal;
}
.passwordStrength span {
    display: inline-block !important;
    width: 25px;
    height: 15px;
    line-height: 15px;
    margin-left: 2px;
    background-color: #eee;
    color: #999;
    text-align: center;
    border-radius: 2px;
}
.passwordStrength .bgStrength1 {
    color: white !important;
    background-color: #FF4545 !important;
}
.passwordStrength .bgStrength2 {
    color: white !important;
    background-color: #FFD35E !important;
}
.passwordStrength .bgStrength3 {
    color: white !important;
    background-color: #71b83d !important;
}
i.fas {
    margin-right: 10px;
    color: #b6b6b6;
}