/* 暴风AI助手 - 注册页面样式 */

:root {
    --primary: #FF2442;
    --primary-light: #FF4D63;
    --primary-dark: #D91A36;
    --primary-bg: #FFF0F2;
    --bg: #FAFAFA;
    --bg-card: #FFFFFF;
    --text: #262626;
    --text-secondary: #666666;
    --text-light: #999999;
    --border: #F0F0F0;
    --border-light: #F5F5F5;
    --success: #00C853;
    --warning: #FF9800;
    --danger: #FF3D00;
    --radius: 10px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.register-container {
    width: 100%;
    max-width: 440px;
}

/* 头部 */
.register-header {
    text-align: center;
    margin-bottom: 32px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary);
}

.logo-area {
    margin-bottom: 16px;
}

.logo {
    width: auto;
    max-width: 180px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: var(--shadow);
}

.register-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 14px;
    color: var(--text-light);
}

/* 步骤指示器 */
.steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    background: var(--border);
    color: var(--text-light);
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
}

.step.completed .step-number {
    background: var(--success);
    color: white;
}

.step-label {
    font-size: 12px;
    color: var(--text-light);
}

.step.active .step-label {
    color: var(--primary);
    font-weight: 600;
}

.step.completed .step-label {
    color: var(--success);
    font-weight: 500;
}

.step-connector {
    width: 60px;
    height: 2px;
    background: var(--border);
    margin: 0 8px;
    margin-top: -20px;
}

.step-connector.completed {
    background: var(--success);
}

/* 表单容器 */
.form-container {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* 表单组 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group .required {
    color: var(--primary);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-bg);
    background: white;
}

.form-group input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(255, 61, 0, 0.1);
}

.form-error {
    display: block;
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
    min-height: 18px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* 短信验证码输入组 */
.sms-input-group {
    display: flex;
    gap: 12px;
}

.sms-input-group input {
    flex: 1;
}

.sms-btn {
    padding: 12px 20px;
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.sms-btn:hover:not(:disabled) {
    background: var(--primary);
    color: white;
}

.sms-btn:disabled {
    background: var(--border);
    color: var(--text-light);
    border-color: var(--border);
    cursor: not-allowed;
}

/* 按钮 */
.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 4px;
}

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

.btn-primary:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.btn-secondary {
    padding: 12px 24px;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--primary-bg);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline {
    padding: 12px 24px;
    background: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline:hover {
    background: var(--primary-bg);
}

/* 结果卡片 */
.result-card {
    text-align: center;
    padding: 16px 0;
}

.result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 16px;
}

.result-icon.pending {
    background: #FFF3E0;
    color: var(--warning);
}

.result-icon.success {
    background: #E8F5E9;
    color: var(--success);
}

.result-icon.rejected {
    background: #FFEBEE;
    color: var(--danger);
}

.result-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-card p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.result-info {
    background: var(--bg);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    text-align: left;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: var(--text-light);
}

.info-value {
    font-size: 14px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #FFF3E0;
    color: #E65100;
}

.status-active {
    background: #E8F5E9;
    color: #1B5E20;
}

.status-rejected {
    background: #FFEBEE;
    color: #B71C1C;
}

.result-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

/* 底部 */
.register-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-light);
}

.register-footer .link {
    color: var(--primary);
    text-decoration: none;
}

.register-footer .link:hover {
    text-decoration: underline;
}

.copyright {
    margin-top: 8px;
    font-size: 12px;
}

/* 协议弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-box {
    background: var(--bg-card);
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.agreement-modal {
    max-width: 600px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    background: var(--bg);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 20px;
    color: var(--text-secondary);
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.agreement-content {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.agreement-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 16px 0 8px;
}

.agreement-content p {
    margin-bottom: 8px;
    text-indent: 2em;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.modal-footer .btn-primary {
    width: auto;
    padding: 12px 40px;
}

/* 加载状态 */
.loading-dots {
    display: inline-flex;
    gap: 4px;
}

.loading-dots::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text);
    color: white;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    z-index: 2000;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 360px;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

/* 响应式 */
@media (max-width: 480px) {
    body {
        padding: 20px 16px;
    }

    .form-container {
        padding: 24px 20px;
    }

    .register-header h1 {
        font-size: 20px;
    }

    .sms-btn {
        padding: 12px 14px;
        font-size: 13px;
    }
}

.sms-hint {
    margin-top: 8px;
    padding: 8px 12px;
    background: #FFF3CD;
    border: 1px solid #FFC107;
    border-radius: 6px;
    font-size: 13px;
    color: #856404;
    text-align: center;
}
.sms-hint strong {
    font-size: 18px;
    letter-spacing: 3px;
    color: #E65100;
}
