/* 注册页面样式 */

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.register-header {
    background: linear-gradient(135deg, #0052d9, #1677ff);
    color: #fff;
    padding: 30px 30px 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.register-header .logo-title-group {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.register-logo {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.register-title {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.register-subtitle {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.register-form {
    padding: 25px 30px 30px;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-control {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 2px solid #e7e7e7;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #0052d9;
    box-shadow: 0 0 0 3px rgba(0, 82, 217, 0.1);
}

.form-control::placeholder {
    color: #bbb;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #888;
    margin-top: 4px;
}

.password-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
}

.password-toggle:hover {
    color: #0052d9;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 13px;
    color: #666;
    line-height: 1.4;
    cursor: pointer;
}

.terms-link,
.privacy-link {
    color: #0052d9;
    text-decoration: none;
}

.terms-link:hover,
.privacy-link:hover {
    text-decoration: underline;
}

.register-button {
    width: 100%;
    height: 48px;
    background: linear-gradient(135deg, #0052d9, #1677ff);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.register-button:hover {
    background: linear-gradient(135deg, #003ba0, #0052d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 82, 217, 0.3);
}

.register-button:active {
    transform: translateY(0);
}

.register-button:disabled {
    background: #d9d9d9;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.register-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.register-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.login-link {
    color: #0052d9;
    text-decoration: none;
    font-weight: 500;
}

.login-link:hover {
    color: #003ba0;
    text-decoration: underline;
}

.error-message {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #cf1322;
    font-size: 14px;
    display: none;
}

.error-message.show {
    display: block;
}

.success-message {
    background: #f6ffed;
    border: 1px solid #d9f7be;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #389e0d;
    font-size: 14px;
    display: none;
}

.success-message.show {
    display: block;
}

/* 加载状态 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-overlay.show {
    display: flex;
}

.loading-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0052d9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 14px;
}

/* 表单验证状态 */
.form-control.error {
    border-color: #ff4d4f;
    box-shadow: 0 0 0 3px rgba(255, 77, 79, 0.1);
}

.form-control.success {
    border-color: #52c41a;
    box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.1);
}

/* 响应式设计 */
@media (max-width: 480px) {
    .register-container {
        margin: 10px;
        border-radius: 8px;
        max-height: 95vh;
    }
    
    .register-header {
        padding: 25px 20px 20px;
    }
    
    .register-title {
        font-size: 24px;
    }
    
    .register-form {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-control {
        height: 42px;
        font-size: 16px; /* 防止iOS缩放 */
    }
}

@media (max-width: 360px) {
    .register-container {
        margin: 5px;
    }
    
    .register-form {
        padding: 15px;
    }
}
