/* SizeX - 登录/注册页面样式（与首页一致的设计系统） */

:root {
    /* 主色调 - 蓝紫渐变 */
    --primary-start: #6366f1;
    --primary-end: #8b5cf6;
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    
    /* 中性色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    /* 阴影 */
    --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);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.15);
}

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

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-secondary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
body::before {
    content: '';
    position: absolute;
    top: -200px;
    right: -200px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.auth-container {
    background: var(--bg-primary);
    border-radius: 24px;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 48px;
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 24px;
}

.auth-logo {
    width: 72px;
    height: 72px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    font-size: 36px;
    box-shadow: 0 12px 28px rgba(99, 102, 241, 0.3), 0 0 0 1px rgba(99, 102, 241, 0.1);
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 8px 24px rgba(99, 102, 241, 0.25));
}

/* Logo 光晕效果 */
.auth-logo-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0.15;
    filter: blur(40px);
    z-index: 1;
}

.auth-header h1 {
    font-size: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.8px;
    line-height: 1.2;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
    letter-spacing: -0.2px;
}

.form-group {
    margin-bottom: 24px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.form-group input:focus {
    border-color: var(--primary-start);
    background: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1), var(--shadow-sm);
}

.form-group input::placeholder {
    color: var(--text-tertiary);
}

.auth-btn {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.3px;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 按钮光泽效果 */
.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.auth-btn:hover::before {
    left: 100%;
}

.auth-btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35), 0 0 0 1px rgba(99, 102, 241, 0.1);
    margin-top: 8px;
}

.auth-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.45), 0 0 0 1px rgba(99, 102, 241, 0.15);
}

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

.alert {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: -0.1px;
}

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

.alert-error {
    background: #fef2f2;
    border: 1.5px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    color: #16a34a;
}

.auth-footer {
    margin-top: 32px;
    text-align: center;
}

.auth-link {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    letter-spacing: -0.1px;
}

.auth-link a {
    color: var(--primary-start);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.auth-copyright {
    font-size: 13px;
    color: var(--text-tertiary);
    letter-spacing: -0.1px;
}

.captcha-group {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-group input {
    flex: 1;
}

.captcha-img {
    width: 120px;
    height: 48px;
    border: 1.5px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: var(--bg-secondary);
}

.captcha-img:hover {
    border-color: var(--primary-start);
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
}

/* 响应式设计 */
@media (max-width: 640px) {
    .auth-container {
        padding: 36px 28px;
    }
    
    .auth-header h1 {
        font-size: 24px;
    }
    
    .auth-logo {
        width: 64px;
        height: 64px;
        font-size: 32px;
    }
    
    .form-group input {
        padding: 13px 14px;
        font-size: 14px;
    }
    
    .auth-btn {
        padding: 14px;
        font-size: 15px;
    }
}
