/* --- 1. 新的合并布局样式 --- */
body.login-page-merged {
    /* 重要:
      请确保 'load.jpg' 文件在 /static/picture/ 目录下.
      路径是 ../picture/ 因为 CSS 在 /static/css/ 目录中.
    */
    background-image: url('../picture/load.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    height: 100vh;
    width: 100vw;
    margin: 0;
    display: flex;
    justify-content: space-between; /* 左右布局 */
    align-items: center;
    overflow: hidden; /* 避免滚动条 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 左侧文字内容 */
.left-content {
    flex-basis: 50%;
    padding-left: 100px; /* 距离左侧边缘的距离 */
    text-align: left;
    color: white;
}
.left-content .header {
    font-size: 36px;
    font-weight: bold;
}
.left-content .footer {
    font-size: 16px;
    margin-top: 20px;
}

/* 右侧登录表单容器 */
.login-container {
    flex-basis: 50%;
    display: flex;
    justify-content: center; /* 将登录框在右半侧居中 */
    align-items: center;
    height: 100%;
}

/* --- 2. 原始的登录/注册表单样式 (稍作调整) --- */
.login-box {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    text-align: center;
}
.login-box h1 {
    margin-bottom: 2rem;
    font-size: 24px;
}
.input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}
.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}
.login-tip {
    font-size: 12px;
    color: #777;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-align: left;
    line-height: 1.5;
}
.login-box .btn-primary {
    width: 100%;
    /* 引用 base.css 中的样式 (如果需要) */
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    text-align: center;
    transition: background-color 0.3s;
    background-color: #3498db;
}
.login-box .btn-primary:hover {
    background-color: #2980b9;
}

.register-link {
    margin-top: 1.5rem;
    font-size: 14px;
}
.register-link a {
    color: #3498db;
    text-decoration: none;
}
.register-link a:hover {
    text-decoration: underline;
}

.login-footer {
    margin-top: 2rem;
    font-size: 12px;
    color: #999;
}
/* 提示消息样式 */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    text-align: left;
}
.alert-danger {
    color: #a94442;
    background-color: #f2dede;
    border-color: #ebccd1;
}
.alert-success {
    color: #3c763d;
    background-color: #dff0d8;
    border-color: #d6e9c6;
}

/* 公告栏样式 */
.announcement-banner {
    width: 100%;
    height: 40px; /* 公告栏高度 */
    background-color: #eaf5ff;
    border: 1px solid #b3d7ff;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    overflow: hidden; /* 隐藏超出部分 */
    position: relative;
}

.announcement-banner .announcement-content {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    line-height: 40px;
    text-align: center;
}

.announcement-banner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    /* 动画: 名称 时长 速度曲线 无限循环 */
    animation: scroll-up 15s linear infinite;
}

.announcement-banner li {
    color: #0056b3;
    font-size: 14px;
    height: 40px; /* 确保每个item和容器一样高 */
}

/* 定义滚动动画 */
@keyframes scroll-up {
    from {
        transform: translateY(0);
    }
    to {
        /* 向上滚动50%的高度，因为我们复制了一份列表来实现无缝效果 */
        transform: translateY(-50%);
    }
}


/* --- 3. 响应式设计 (手机端) --- */
@media (max-width: 768px) {
    body.login-page-merged {
        flex-direction: column; /* 垂直堆叠 */
        justify-content: flex-start;
        padding: 20px;
        height: auto;
        min-height: 100vh;
        box-sizing: border-box;
    }
    .left-content {
        flex-basis: auto;
        padding-left: 0;
        text-align: center; /* 居中文本 */
        margin-top: 5vh;
        order: 1; /* 1. 文字在上方 */
    }
    .login-container {
        flex-basis: auto;
        width: 100%;
        order: 2; /* 2. 登录框在下方 */
        margin-top: 5vh;
    }
    .login-box {
        width: 100%; /* 登录框占满宽度 */
        padding: 20px;
    }
    .left-content .header { font-size: 24px; }
    .left-content .footer { font-size: 14px; }

    /* 【已添加】响应式底部说明栏 */
    .overlay-desc {
        order: 3; /* 3. 脚注在最下方 */
        position: relative; /* 覆盖 absolute */
        width: 100%;
        padding: 8px;
        background: rgba(0, 0, 0, 0.5);
        color: #f1f1f1;
        text-align: center;
        box-sizing: border-box;
        margin-top: auto; /* 推动到底部 */
        border-radius: 4px; /* 在移动端添加圆角 */
    }
    .overlay-desc p {
        font-size: 12px;
        margin: 0;
    }
}


/* --- 4. 【已添加】桌面端底部说明栏 --- */
.overlay-desc {
    position: absolute;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #f1f1f1;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    text-align: center;
    z-index: 10;
}
.overlay-desc p {
    margin: 0 0 1px 0;
    font-size: 14px;
}