/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f5ff;
    color: #333;
    line-height: 1.6;
    font-size: 16px;
}

/* 登录页面容器 */
.login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* 顶部导航 */
.header {
    padding: 1.5rem 0;
    background-color: transparent;
    color: #ffffff;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.header:before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    top: -5rem;
    right: 0;
    height: 12rem;
    background: url("https://vpn.hnist.cn/https/57524476706e69737468656265737421380f42dfb2e93588062c3fd381b0298e/portal/images/new/header-bg.png") center repeat-x;
    background-size: auto 99%;
    z-index: -1;
    pointer-events: none;
    transition: .5s
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width:100%;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {    display: flex;    align-items: center;}

.logo-img {    height: 52px;    margin-right: 10px;    object-fit: contain;}

.logo-separator {
    color: #ddd;
    margin: 0 10px;
    font-size: 20px;
}

.logo-desc {
    font-size: 20px;
    color: #ffffff;
}

.language-dropdown {
    position: relative;
}

.language-trigger {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.language-trigger:hover {
    /* color: #007bff; */
}

.language-trigger i {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.language-dropdown:hover .language-trigger i {
    transform: rotate(180deg);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    margin-top: 5px;
    display: none;
    min-width: 120px;
    z-index: 200;
}

.language-dropdown:hover .language-options {
    display: block;
}

.language-option {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 16px;
    text-align: left;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: #f5f5f5;
    color: #671482;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 80px 20px;
    position: relative;
}

/* 内容容器 */
.content-container {
    width: 1280px;
    margin: 0 auto;
    position: relative;
    display: flex;
    justify-content: flex-end;
    height: 100%;
    align-items: center;
}

/* 背景轮播样式 - Swiper组件 */
.carousel-container, .swiper-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.swiper-wrapper {
    width: 100%;
    height: 100%;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
}



.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
    }
}

/* 登录容器 */
.login-container {
    position: relative;
    z-index: 10;
}

.login-box {
    background-color: white;
    border-radius: 8px;
    padding:30px 30px 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    width: 420px;
    max-width: 100%;
    min-height: 480px;
    display: flex;
    flex-direction: column;
}

.welcome-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    text-align: center;
}

/* 登录方式切换 */
.login-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 10px 0;
    background: none;
    border: none;
    font-size: 16px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-btn.active {
    color: #671482;
    font-weight: 500;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #671482;
}

/* 登录表单 */
.login-form {
    display: none;
    flex-direction: column;
    /* flex: 1; */
}

.login-form.active {
    display: flex;
}

/* 确保扫码登录表单的二维码居中显示 */
#scanLogin {
    align-items: center;
    justify-content: center;
    flex: 1;
}

/* 确保温馨提示区域在固定高度中正确显示 */
.tips {
    margin-top: 10px;
    padding: 12px;
    background-color: #f0f4f8;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    border-top: 1px solid #e6ebf1;
    line-height: 1.4;
}

.tips h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
    font-weight: 600;
    color: #671482;
}

.tips ul {
    margin: 0;
    padding-left: 16px;
}

.tips li {
    margin-bottom: 3px;
    line-height: 1.4;
}

.tips li:last-child {
    margin-bottom: 0;
}
.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-input:focus {
    outline: none;
    border-color: #671482;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-input::placeholder {
    color: #999;
}
#codeInput {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}
#codeInput .form-input {
    width: calc(100% - 110px);
}

#code {
    width: 100px;
    height: 44px;
    color: #000000;
    background-color: #eeeeee;
    font-size: 22px;
    line-height: 44px;
    text-align: center;
    cursor: pointer;
}

/* 密码显示/隐藏按钮 */
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #671482;
}

/* 验证码输入组 */
.code-group {
    display: flex;
    gap: 10px;
}

.code-group .form-input {
    flex: 1;
}

.get-code-btn {
    padding: 0 12px;
    background-color: #671482;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.get-code-btn:hover {
    background-color: #671482;
}

.get-code-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* 登录按钮 */
.login-btn {
    width: 100%;
    padding: 12px;
    background-color: #671482;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.login-btn:hover {
    background-color: #671482;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(122, 51, 158, 0.3);
}

/* 忘记密码 */
.forgot-password {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.forgot-password a {
    color: #671482;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #671482;
    text-decoration: underline;
}

/* 扫码登录 */
.qr-code-container {
    display: flex;
    justify-content: center;
    align-items: center;
    /* margin-bottom: 20px; */
}
.qr-code-container iframe {
    height:330px;
}
.qr-code-image {
    width: 180px;
    height: 220px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 底部版权信息 */
.footer {
    text-align: center;
    padding: 20px;
    background-color: transparent;
    color: #ffffff;
    font-size: 16px;
    z-index: 100;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
}

/* 响应式设计 */
@media (max-width: 1300px) {
    .header-container {
        width: 100%;
        padding: 0 1.5rem;
    }

    .content-container {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo-img {
        height: 42px;
        margin-right: 0;
    }

    .logo-separator {
        margin: 0 8px;
        font-size: 18px;
    }

    .logo-desc {
        font-size: 18px;
    }

    .shape {
        width: 150px;
        height: 150px;
    }

    .login-box {
        padding: 25px 15px 15px;
        margin: 0 10px;
        width: calc(100% - 20px);
        max-width: 350px;
        height: auto;
        min-height: 480px;
    }

    .welcome-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .login-tabs {
        margin-bottom: 15px;
    }

    .tab-btn {
        padding: 10px;
        font-size: 15px;
    }

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

    .form-input {
        padding: 12px;
        font-size: 15px;
    }

    .login-btn {
        padding: 12px;
        font-size: 15px;
        margin-bottom: 8px;
    }

    .forgot-password {
        margin-bottom: 8px;
    }

    .tips {
        margin-top: 10px;
        padding: 8px;
        font-size: 12px;
    }

    .tips h3 {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .tips li {
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .qr-code-container {
        margin-bottom: 10px;
    }

    .qr-code-image {
        width: 180px;
        height: 200px;
    }

    .login-form {
        height: auto;
        /* min-height: 280px; */
    }
}

@media (max-width: 640px) {
    .header-container {
        padding: 0 1rem;
    }

    .logo-img {
        height: 38px;
        margin-right: 0;
    }

    .logo-separator {
        margin: 0 8px;
        font-size: 17px;
    }

    .logo-desc {
        font-size: 17px;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
        padding: 0 0.5rem;
    }

    .logo-img {
        height: 28px;
        margin-right: 0;
    }

    .logo-separator {
        margin: 0 6px;
        font-size: 14px;
    }

    .logo-desc {
        font-size: 14px;
    }

    .user-menu {
        align-self: flex-end;
    }

    .language-trigger {
        padding: 8px;
        font-size: 13px;
    }

    .login-tabs {
        margin-bottom: 12px;
    }

    .tab-btn {
        padding: 8px 0;
        font-size: 13px;
    }

    .login-box {
        padding: 20px 12px 12px;
        margin: 0 5px;
        width: calc(100% - 10px);
        min-height: 450px;
    }

    .welcome-title {
        font-size: 17px;
        margin-bottom: 10px;
    }

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

    .form-input {
        padding: 9px;
        font-size: 13px;
    }

    .login-btn {
        padding: 9px;
        font-size: 13px;
        margin-bottom: 6px;
    }

    .toggle-password {
        padding: 0 10px;
    }

    .code-group {
        flex-direction: column;
        gap: 8px;
    }

    .get-code-btn {
        padding: 9px;
        font-size: 13px;
    }

    .tips {
        margin-top: 8px;
        padding: 6px;
        font-size: 9px;
    }

    .tips h3 {
        font-size: 10px;
        margin-bottom: 4px;
    }

    .tips li {
        margin-bottom: 2px;
        line-height: 1.1;
    }

    .qr-code-image {
        width: 150px;
        height: 170px;
    }

    /* .login-form {
        min-height: 250px;
    } */
}

/* 加载动画样式 */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #671482;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #666;
    font-size: 14px;
}

/* 消息提示样式 */
#message-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    word-wrap: break-word;
}

.message.active {
    transform: translateX(0);
}

.message.success {
    background-color: #28a745;
}

.message.error {
    background-color: #dc3545;
}

/* 表单输入错误状态 */
.form-input.error {
    border-color: #dc3545;
}

.form-input.error:focus {
    outline-color: #dc3545;
}


.advbox {
    position: fixed;
    bottom: 20px;
    left: 10px;
    z-index: 1000;
    display: block;  /* 默认显示，如需默认隐藏可改为none，通过JS控制 */
    max-width: 360px;
    min-width: 280px;
}

.advbox .advpic {
    position: relative;
    background: #ffffff;
    border-radius: .8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding: 16px 20px 20px 20px;
    border-left: 4px solid #1a73e8;
    overflow: hidden;
}



.advbox .advpic .notice-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a73e8;
    margin-bottom: 8px;
}

.advbox .advpic .notice-body {
    font-size: 13px;
    color: #333333;
    line-height: 1.6;
}

.advbox .advpic .notice-body p {
    margin: 4px 0;
}

.advbox .advpic .notice-body a {
    color: #1a73e8;
    text-decoration: underline;
    cursor: pointer;
}

.advbox .advpic .notice-body strong {
    color: #d93025;
}

.advbox .advpic .closebtn {
    width: 44px;
    text-align: center;
    line-height: 26px;
    font-size: 12px;
    color: #999999;
    position: absolute;
    right: 8px;
    top: 8px;
    z-index: 99;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}

.advbox .advpic .closebtn:hover {
    background: #f0f0f0;
    color: #333;
}