/* 注册页面样式 */
.register-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.register-section h2 {
    text-align: center;
    color: #2e7d32;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* 表单样式 */
.register-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: bold;
    color: #2e7d32;
    font-size: 0.95rem;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafbfc;
}

.form-group input:focus {
    outline: none;
    border-color: #4caf50;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group input.error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

/* 错误和成功消息样式 */
.error-message,
.success-message {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: bold;
    display: none;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.field-error {
    color: #e74c3c;
    font-size: 0.85rem;
    min-height: 1.2rem;
}

/* 密码强度指示器 */
.password-strength {
    font-size: 0.85rem;
    padding: 5px 0;
    color: #666;
}

.password-strength.weak {
    color: #e74c3c;
    font-weight: bold;
}

.password-strength.medium {
    color: #f39c12;
    font-weight: bold;
}

.password-strength.strong {
    color: #2ecc71;
    font-weight: bold;
}

/* 表单操作按钮 */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.form-actions .btn {
    flex: 1;
    min-width: 150px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    font-size: 1rem;
}

.btn-primary {
    background-color: #4caf50;
    color: white;
}

.btn-primary:hover {
    background-color: #388e3c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-secondary {
    background-color: #81c784;
    color: white;
}

.btn-secondary:hover {
    background-color: #66bb6a;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 表单底部链接 */
.form-footer {
    text-align: center;
    margin-top: 1rem;
    color: #666;
}

.form-footer a {
    color: #4caf50;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #388e3c;
    text-decoration: underline;
}

/* 加载状态指示器 */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    min-width: 250px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4caf50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .register-section {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .register-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group input {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .register-section {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .register-section h2 {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .form-group input {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    
    .form-actions .btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }
    
    .form-footer {
        font-size: 0.9rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.register-section {
    animation: fadeIn 0.5s ease-out;
}

.form-group {
    animation: fadeIn 0.5s ease-out;
    animation-delay: 0.1s;
    animation-fill-mode: backwards;
}

.form-group:nth-child(2) {
    animation-delay: 0.2s;
}

.form-group:nth-child(3) {
    animation-delay: 0.3s;
}

.form-group:nth-child(4) {
    animation-delay: 0.4s;
}

.form-actions {
    animation: fadeIn 0.5s ease-out;
    animation-delay: 0.5s;
    animation-fill-mode: backwards;
}

.form-footer {
    animation: fadeIn 0.5s ease-out;
    animation-delay: 0.6s;
    animation-fill-mode: backwards;
}