/* 注册页样式 */
.register-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--bg-card);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border-color);
}

/* 表单元素组 */
.form-group {
    margin-bottom: 1.5rem;
}

/* 输入框样式 */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px var(--primary-shadow-md);
}

/* 提交按钮 */
.btn-register {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s;
}

.btn-register:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-register:active {
    transform: translateY(0);
}

.btn-register:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* 错误提示 */
.error-message {
    color: var(--primary-darker);
    padding: 12px;
    margin-bottom: 16px;
    background-color: var(--primary-bg-light);
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--primary-lighter);
    font-size: 14px;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 性别选择样式 */
.sex-radio {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.sex-radio label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.sex-radio input[type="radio"] {
    margin-right: 5px;
    accent-color: var(--primary);
}

.sex-radio label:hover {
    color: var(--primary);
}

/* 密码强度指示器 */
.strength-meter {
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.strength-bar {
    height: 100%;
    width: 0%;
    transition: width 0.5s ease, background 0.5s ease;
}

.strength-bar.weak {
    background: linear-gradient(to right, var(--primary-darker), var(--primary-dark));
    width: 30%;
}

.strength-bar.medium {
    background: linear-gradient(to right, #faad14, #ffd666);
    width: 60%;
}

.strength-bar.strong {
    background: linear-gradient(to right, #52c41a, #73d13d);
    width: 90%;
}

.strength-text {
    display: flex;
    align-items: center;
    margin-top: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    gap: 6px;
}

.strength-text::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: currentColor;
}

.strength-text.weak {
    color: var(--primary-darker);
}

.strength-text.medium {
    color: #faad14;
}

.strength-text.strong {
    color: #52c41a;
}

.btn-register.loading {
    position: relative;
    color: transparent;
}

.btn-register.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

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

/* 表单提示文字 */
.form-hint {
    font-size: 13px;
    color: var(--text-muted);
    border-radius: 4px;
    line-height: 1.4;
}

/* 标签样式 */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 15px;
}

.login-link {
    text-align: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
    padding: 10px;
    border-radius: 8px;
}

.login-link a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    margin-left: 5px;
}

.login-link a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}
