/* 登录页面基础样式 */
body.login-page {
    margin: 0;
    padding: 0;
    height: 100vh;
    overflow: hidden; /* 防止body出现滚动条 */
}

.login-page {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    padding: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden; /* 防止出现滚动条 */
}

/* 添加背景图案 */
.login-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    z-index: 0;
    background-attachment: fixed;
}

/* 顶部导航样式 */
.main-header {
    background: var(--nav-bg-solid);
    padding: 1rem 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 添加header-content样式 */
.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

/* 添加logo样式 */
.header-content .logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.header-content .logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* 登录容器 */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
    height: calc(100vh - 80px); /* 减去header高度，使用固定高度 */
    overflow: hidden; /* 防止内容溢出 */
}

/* 登录框 */
.login-box {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
    max-width: 340px;
    max-height: 90vh; /* 限制最大高度，防止溢出 */
    overflow-y: auto; /* 如果内容过多，允许内部滚动 */
    animation: fadeInUp 0.6s ease;
    border: none;
    transition: box-shadow 0.3s ease;
}

.login-box:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* 登录头部 */
.login-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Logo 样式 */
.login-header .logo {
    margin-bottom: 0.5rem;
}

.login-header .logo img {
    width: 120px;
    height: auto;
}

/* 标题样式 */
.login-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* 表单样式 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    position: relative;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 1rem;
    color: #999;
    transition: color 0.3s ease;
}

/* 输入框样式 */
.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.login-form input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.login-form input:focus + .input-icon {
    color: #1890ff;
}

/* 密码显示切换按钮 */
.toggle-password {
    position: absolute;
    right: 0.8rem;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
    z-index: 2;
}

.toggle-password:hover {
    color: #1890ff;
}

/* 记住我和忘记密码 */
.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -0.2rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #666;
    font-size: 0.85rem;
}

.forgot-password {
    color: #1890ff;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #096dd9;
    text-decoration: underline;
}

/* 登录按钮 */
.login-button {
    width: 100%;
    padding: 0.85rem;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.2);
}

.login-button:hover {
    background: #40a9ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.3);
}

.login-button:active {
    background: #096dd9;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.2);
}

.login-button i {
    transition: transform 0.3s ease;
}

.login-button:hover i {
    transform: translateX(3px);
}

/* 分割线 */
.login-divider {
    text-align: center;
    position: relative;
    margin: 1.5rem 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 50px);
    height: 1px;
    background: #e0e0e0;
}

.login-divider::before {
    left: 0;
}

.login-divider::after {
    right: 0;
}

.login-divider span {
    background: #fff;
    padding: 0 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* 社交登录按钮 */
.social-login {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-button {
    padding: 0.8rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.social-button.wechat:hover {
    background: #07c160;
    border-color: #07c160;
    color: #fff;
}

.social-button.sso:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

/* 注册链接 */
.register-link {
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    margin-top: 1.2rem;
    padding-top: 1rem;
    border-top: 1px solid #f0f0f0;
}

.register-link a {
    color: #1890ff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin-left: 0.3rem;
}

.register-link a:hover {
    color: #096dd9;
    text-decoration: underline;
}

/* 页脚样式 */
.login-footer {
    text-align: center;
    padding: 1.5rem 0;
    background: var(--nav-bg-solid);
    color: #fff;
    position: relative;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.footer-links a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.divider {
    color: rgba(255, 255, 255, 0.7);
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式调整 */
@media (max-width: 480px) {
    .login-box {
        padding: 1.5rem;
        max-width: 90%;
    }

    .login-header h2 {
        font-size: 1.5rem;
    }
    
    .login-header p {
        font-size: 0.9rem;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"] {
        padding: 0.75rem 1rem 0.75rem 2.3rem;
    }
    
    .login-button {
        padding: 0.75rem;
    }
    
    /* 添加移动端logo样式 */
    .header-content .logo img {
        height: 28px;
    }
    
    /* 调整移动端返回按钮样式 */
    .back-button {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
    }
    
    /* 小程序登录区域移动端样式 */
    .miniprogram-login {
        padding: 1rem;
        margin-bottom: 1.2rem;
    }
    
    .miniprogram-info i {
        font-size: 1.5rem;
    }
    
    .miniprogram-login-button {
        padding: 0.7rem;
    }
    
    /* 验证码移动端样式 */
    #captcha-img {
        height: 32px;
        width: 100px;
    }
    
    .captcha-group input {
        padding-right: 110px;
    }
}

/* 返回主页按钮样式 - 已移至header内 */
.back-button {
    color: #fff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-button i {
    font-size: 0.9rem;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 小程序登录区域样式 */
.miniprogram-login {
    margin-bottom: 1.5rem;
    padding: 1.2rem;
    border-radius: 6px;
    background: #07c160;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.2);
    animation: fadeInUp 0.5s ease;
}

.miniprogram-info {
    text-align: center;
    margin-bottom: 1rem;
    color: #fff;
}

.miniprogram-info i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    display: block;
}

.miniprogram-info p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.miniprogram-login-button {
    width: 100%;
    padding: 0.8rem;
    background: #fff;
    color: #07c160;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.miniprogram-login-button:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.miniprogram-login-button i {
    font-size: 1.1rem;
}

.miniprogram-login .divider {
    text-align: center;
    position: relative;
    margin: 1.2rem 0 0.8rem 0;
}

.miniprogram-login .divider::before,
.miniprogram-login .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.miniprogram-login .divider::before {
    left: 0;
}

.miniprogram-login .divider::after {
    right: 0;
}

.miniprogram-login .divider span {
    color: rgba(255, 255, 255, 0.9);
    background: transparent;
    padding: 0 0.8rem;
    font-size: 0.85rem;
}

/* 验证码样式 */
.captcha-group {
    position: relative;
}

.captcha-container {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    height: calc(100% - 12px);
    display: flex;
    align-items: center;
}

#captcha-img {
    height: 36px;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#captcha-img:hover {
    opacity: 0.8;
}

.captcha-group input {
    padding-right: 120px; /* 为验证码图片留出空间 */
}

@media (max-width: 480px) {
    #captcha-img {
        height: 32px;
        width: 100px;
    }
    
    .captcha-group input {
        padding-right: 110px;
    }
}

.account-login-button {
    width: 100%;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.account-login-button:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.account-login-button i {
    font-size: 1rem;
}

@media (max-width: 480px) {
    .account-login-button {
        padding: 0.7rem;
        font-size: 0.9rem;
    }
}

/* 移动端背景图片优化 */
@media (max-width: 768px) {
    .login-page {
        background-attachment: scroll; /* 移动端使用scroll避免性能问题 */
        height: 100vh;
        overflow: hidden;
    }
    
    .login-container {
        height: calc(100vh - 60px); /* 移动端header高度调整，使用固定高度 */
        padding: 1rem; /* 减少移动端内边距 */
    }
}

/* 微信登录样式 */
.wechat-login {
    margin-top: 1.5rem;
    text-align: center;
}

.wechat-login .divider {
    position: relative;
    margin: 1rem 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.wechat-login .divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.wechat-login .divider span {
    background: gray;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.wechat-login-button {
    width: 50px;
    height: 50px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
}

.wechat-login-button:hover {
    background: #06ad56;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(7, 193, 96, 0.4);
}

.wechat-login-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.3);
}

.wechat-login-button i {
    font-size: 1.5rem;
}

/* 移动端微信登录按钮优化 */
@media (max-width: 480px) {
    .wechat-login-button {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .wechat-login-button i {
        font-size: 1.3rem;
    }
}

/* 微信二维码弹窗样式 */
.wechat-qr-container {
    text-align: center;
    padding: 20px;
}

.qr-loading {
    padding: 40px 20px;
    color: #666;
}

.qr-loading i {
    font-size: 2rem;
    color: #07c160;
    margin-bottom: 10px;
    display: block;
}

.qr-loading p {
    margin: 0;
    font-size: 0.9rem;
}

.qr-content {
    padding: 10px;
}

.qr-title {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.qr-title i {
    font-size: 1.5rem;
    color: #07c160;
    margin-right: 8px;
}

.qr-image-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
    display: inline-block;
}

.qr-image-container img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.qr-tips {
    margin-top: 15px;
}

.qr-tips p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #666;
}

.qr-refresh {
    color: #07c160 !important;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem !important;
}

.qr-refresh:hover {
    color: #06ad56 !important;
}

/* 移动端二维码弹窗优化 */
@media (max-width: 480px) {
    .wechat-qr-container {
        padding: 15px;
    }
    
    .qr-image-container {
        padding: 10px;
    }
    
    .qr-image-container img {
        max-width: 150px;
        max-height: 150px;
    }
} 