/* 基础重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* 设置整体背景底纹 */
    background-color: #f0f2f5;
    /* 添加纹理效果 */
    background-image: 
        linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.2) 75%, transparent 75%),
        linear-gradient(-45deg, rgba(255, 255, 255, 0.2) 75%, transparent 75%);
    background-size: 20px 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* 顶部Logo区域 - 占满整行 */
.top-logo {
    width: 100%;
    background-color: rgba(50, 129, 203, 1); /* 修正RGBA值 */
    padding: 15px 20px; /* 调整padding */
    text-align: center;
    border-bottom: 1px solid #eee;
    box-sizing: border-box;
}

.top-logo img {
    max-width: 100%;
    height: auto;
    max-height: 90px; /* 增加Logo最大高度 */
}

/* 主内容区域 - 水平排列 */
.main-content {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 190px); /* 调整高度计算 */
}

/* 背景图片容器 - 左侧区域（增大宽度） */
.background-container {
    width: 60%; /* 增大左侧区域宽度 */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px; /* 减小padding以显示更大图片 */
    position: relative;
    overflow: hidden;
}

/* 背景遮罩效果 */
.background-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(120deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.2) 100%);
    z-index: 1;
}

/* 背景图片 */
.background-image {
    width: 100%;
    height: 100%;
    background: 
        url('./backg.png') center/cover no-repeat,
        url('./image.png') center/cover no-repeat;
    border-radius: 15px;
    position: relative;
    z-index: 0;
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0);
}

/* 登录容器 - 右侧区域（减小宽度） */
.login-container {
    width: 40%; /* 减小右侧区域宽度 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 20px; /* 增加padding */
}

/* 登录卡片 */
.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    padding: 40px;
    width: 100%;
    max-width: 380px;
    margin-bottom: 30px;
}

/* Logo区域 */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* 表单样式 */
.login-form {
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 20px;
}

.input-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #444;
    font-size: 14px;
}

.input-field {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
}

/* 记住我和忘记密码 */
.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: #666;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 16px;
    width: 16px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 2px;
    margin-right: 8px;
    position: relative;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark::after {
    display: block;
}

.checkbox-container .checkmark::after {
    left: 5px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 12px;
    background: #409EFF;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background: #337ecc;
}

/* 分割线 */
.divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: #999;
    font-size: 12px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #e1e5e9;
}

.divider::before {
    margin-right: 15px;
}

.divider::after {
    margin-left: 15px;
}

/* 社交登录 */
.social-login {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.social-btn {
    flex: 1;
    padding: 10px;
    border: 1px solid #e1e5e9;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background: #f5f5f5;
}

.social-btn.wechat {
    color: #2aab60;
}

.social-btn.qq {
    color: #12b7f5;
}

/* 注册链接 */
.registration {
    text-align: center;
    font-size: 14px;
    color: #666;
}

.register-link {
    color: #667eea;
    text-decoration: none;
}

.register-link:hover {
    text-decoration: underline;
}

/* 底部信息 */
.footer {
    text-align: center;
    color: #666;
    padding: 20px;
    font-size: 12px;
    width: 100%;
    background-color: white;
    border-top: 1px solid #eee;
}

.support-text {
    margin-top: 5px;
    font-size: 12px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .main-content {
        flex-direction: column;
    }
    
    .background-container,
    .login-container {
        width: 100%;
    }
    
    .background-container {
        height: 500px;
        padding: 20px;
    }
    
    .login-container {
        padding: 30px 20px;
    }
    
    /* 在小屏幕上移除遮罩效果 */
    .background-container::before {
        display: none;
    }
}

@media (max-width: 576px) {
    .top-logo {
        padding: 12px 15px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .remember-forgot {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .forgot-password {
        margin-left: 26px;
    }
}