/* 登录注册页面样式 */

.login-page, .register-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* 背景装饰 */
.login-page::before, .register-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(24, 144, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 200, 83, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 171, 0, 0.1) 0%, transparent 50%);
    animation: float 20s infinite linear;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-10px, 10px); }
    50% { transform: translate(0, 20px); }
    75% { transform: translate(10px, 10px); }
}

/* 登录容器 */
.login-container, .register-container {
    width: 100%;
    max-width: 400px;
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 100px rgba(24, 144, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container::before, .register-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        #1890ff 0%, 
        #00b0ff 25%, 
        #00c853 50%, 
        #00b0ff 75%, 
        #1890ff 100%);
    background-size: 200% 100%;
    animation: gradientMove 3s linear infinite;
}

@keyframes gradientMove {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* 登录头部 */
.login-header, .register-header {
    padding: 40px 30px 20px;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.logo i {
    font-size: 32px;
    color: #1890ff;
    filter: drop-shadow(0 0 10px rgba(24, 144, 255, 0.5));
}

.logo h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #1890ff 0%, #00b0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: #b0bec5;
    font-size: 14px;
    margin: 0;
    letter-spacing: 1px;
}

/* 注册头部 */
.register-header {
    display: flex;
    align-items: center;
    padding: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.back-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #b0bec5;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    cursor: pointer;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.register-header h2 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    color: white;
}

/* 表单区域 */
.login-form, .register-form {
    padding: 30px;
}

.form-group {
    position: relative;
    margin-bottom: 24px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 16px;
    z-index: 1;
}

.form-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #1890ff;
    box-shadow: 
        inset 0 0 0 1px rgba(24, 144, 255, 0.5),
        0 0 20px rgba(24, 144, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: #64748b;
}

/* 密码显示切换按钮 */
.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #b0bec5;
}

/* 登录按钮 */
.login-btn, .register-btn {
    width: 100%;
    margin-top: 30px;
}

/* 登录页脚 */
.login-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-footer a {
    color: #b0bec5;
    font-size: 13px;
    text-decoration: none;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: #1890ff;
}

/* 密码强度指示器 */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 4px;
    background: #475569;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
    transition: all 0.3s;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    background: #ff4d4f;
    transition: all 0.3s;
}

.strength-text {
    font-size: 12px;
    color: #64748b;
    text-align: right;
}

/* 响应式调整 */
@media (max-width: 480px) {
    .login-container, .register-container {
        margin: 20px;
        padding: 0;
    }
    
    .login-header, .register-header {
        padding: 30px 20px 20px;
    }
    
    .login-form, .register-form {
        padding: 20px;
    }
    
    .logo h1 {
        font-size: 24px;
    }
    
    .logo i {
        font-size: 28px;
    }
}

/* 错误状态 */
.form-group.error .form-input {
    border-color: #ff4d4f;
    box-shadow: 
        inset 0 0 0 1px rgba(255, 77, 79, 0.5),
        0 0 10px rgba(255, 77, 79, 0.2);
}

.form-group.error .input-icon {
    color: #ff4d4f;
}

.error-message {
    color: #ff4d4f;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* 成功状态 */
.form-group.success .form-input {
    border-color: #00c853;
}

.form-group.success .input-icon {
    color: #00c853;
}

/* 加载状态 */
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}