/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #dbeafe;

    /* 辅助色 */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;

    /* 中性色 */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --bg-color: #f3f4f6;
    --white: #ffffff;

    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* 圆角 */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* 过渡 */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== 注册容器 ==================== */
.register-container {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* 左侧装饰区域 */
.register-left {
    flex: 1;
    display: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.register-left::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.register-left .left-content {
    position: relative;
    z-index: 1;
    max-width: 500px;
}

.register-left .brand-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.register-left .brand-subtitle {
    font-size: 1.5rem;
    margin-bottom: 4rem;
    opacity: 0.9;
}

.register-left .feature-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.register-left .feature-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.register-left .feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.register-left .feature-icon {
    font-size: 3rem;
    line-height: 1;
}

.register-left .feature-text {
    font-size: 1.1rem;
    line-height: 1.5;
}

.register-left .feature-text strong {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

/* 右侧注册表单 */
.register-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: var(--white);
    overflow-y: auto;
}

.register-header {
    text-align: center;
    margin-bottom: 3rem;
}

.register-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.register-header .subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* 步骤指示器 */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    width: 100%;
    max-width: 400px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--border-color);
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.25rem;
    transition: all var(--transition-normal);
}

.step.active .step-number {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.step-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}

.step.active .step-label {
    color: var(--primary-color);
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    min-width: 60px;
}

/* ==================== 注册表单 ==================== */
.register-form {
    width: 100%;
    max-width: 450px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group.has-error {
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: var(--error-color);
    margin-right: 0.25rem;
}

.form-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    padding-right: 3rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.input-icon {
    position: absolute;
    right: 1rem;
    font-size: 1.25rem;
    opacity: 0.5;
    pointer-events: none;
}

.form-group.has-error .form-input {
    border-color: var(--error-color);
}

.form-group.has-error .form-input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* 切换密码显示按钮 */
.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity var(--transition-fast);
    padding: 0;
    display: flex;
    align-items: center;
}

.toggle-password:hover {
    opacity: 1;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 0.75rem;
}

.strength-bar {
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-fill {
    height: 100%;
    transition: all var(--transition-normal);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.strength-fill.weak {
    width: 33.33%;
    background: var(--error-color);
}

.strength-fill.medium {
    width: 66.67%;
    background: var(--warning-color);
}

.strength-fill.strong {
    width: 100%;
    background: var(--success-color);
}

.strength-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.strength-tips span {
    transition: color var(--transition-fast);
}

.strength-tips span.met {
    color: var(--success-color);
}

/* 验证码 */
.captcha-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.captcha-wrapper .form-input-wrapper {
    flex: 1;
}

.captcha-wrapper .form-input {
    padding-right: 1rem;
}

.captcha-image {
    width: 130px;
    height: 48px;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    border: 1.5px solid var(--border-color);
    transition: all var(--transition-fast);
}

.captcha-image:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.captcha-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 用户类型选择器 */
.user-type-selector {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.type-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.type-option:hover {
    border-color: var(--primary-light);
    background: var(--primary-light);
}

.type-option.active {
    border-color: var(--primary-color);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.type-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.type-info {
    flex: 1;
}

.type-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.type-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.type-check {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

/* 用户协议 */
.agreement {
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-input {
    margin-top: 0.25rem;
    width: 1.125rem;
    height: 1.125rem;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* 提交按钮 */
.submit-button {
    width: 100%;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
}

.submit-button:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.submit-button.loading {
    opacity: 0.8;
    cursor: wait;
}

/* 登录链接 */
.login-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* 准备材料提示 */
.prepare-tips {
    padding: 1.5rem;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.prepare-tips h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.prepare-tips ul {
    list-style: none;
    padding: 0;
}

.prepare-tips li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.prepare-tips li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

.prepare-tips a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.prepare-tips a:hover {
    text-decoration: underline;
}

/* 错误和成功提示 */
.error-message {
    font-size: 0.75rem;
    color: var(--error-color);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-message {
    font-size: 0.75rem;
    color: var(--success-color);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ==================== 弹窗 ==================== */
.modal-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: 1000;
    padding: 1rem;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--border-color);
    border-radius: var(--radius-full);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--error-color);
    color: var(--white);
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

.modal-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--white);
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-button:hover {
    background: var(--primary-hover);
}

/* 协议内容 */
.protocol-content {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.protocol-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.protocol-content h4:first-child {
    margin-top: 0;
}

.protocol-content p {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

/* ==================== 响应式设计 ==================== */
@media (min-width: 1024px) {
    .register-left {
        display: flex;
    }
}

@media (max-width: 768px) {
    .register-right {
        padding: 1rem;
    }

    .register-header h2 {
        font-size: 2rem;
    }

    .register-header .subtitle {
        font-size: 1rem;
    }

    .steps {
        margin-bottom: 2rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-line {
        min-width: 40px;
    }

    .register-form {
        max-width: 100%;
    }

    .captcha-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .captcha-image {
        width: 100%;
    }

    .prepare-tips {
        padding: 1rem;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* ==================== 滚动条样式 ==================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}
