html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    margin: 0; /* 移除默认边距 */
    padding: 0; /* 移除默认内边距 */
    width: 100%;
    overflow-y: auto;
    background-image: url('yh.jpeg'); /* 更新背景图片链接 */
    background-size: cover; /* 背景图像覆盖整个元素 */
    background-position: center; /* 背景图像居中 */
    background-repeat: no-repeat; /* 不重复背景图像 */
    background-attachment: fixed; /* 背景固定，不随滚动条滚动 */
    align-items: center;
    justify-content: center;
    
    
}

.container {
    /* 确保容器不会限制内容高度 */
    overflow-y: auto; /* 允许容器内的内容滚动 */
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.logo-container img {
    max-width: 280px; /* 更新Logo最大宽度 */
    height: auto;
    margin-bottom: 1.5em; /* 增加与链接的距离 */
}

.link-container {
    max-width: 80%;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap; /* 允许内容换行 */
}

.link-box {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px 40px; /* 增加链接框的大小 */
    border-radius: 10px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: clamp(12px, 2vw, 20px);  /* 增加字体大小 */
    color: #282828;
    text-decoration: none;
    font-weight: bold;
    min-width: 200px; /* 确保链接框大小一致 */
    box-sizing: border-box; /* 确保padding不会影响框的总体大小 */
}

.link-box:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.login-container {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
}

.login-text {
    margin-bottom: 20px;
    color: #333;
    font-weight: bold; /* 加粗字体 */
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

.login-form button {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background-color: #ea7072; /* 更新按钮颜色 */
    color: white;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
}

.login-form button:hover {
    background-color: #d95a5c; /* 悬停时的颜色稍微深一些 */
}

.welcome-text {
    margin-bottom: 0.8em;
    /*color: #EDEDED;*/
     color: #ff451c;
    font-size: 2em;
    font-weight: bold; /* 加粗字体 */
}

.logout-container {
    backdrop-filter: blur(1px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    margin-top: 5em; /* 与上方链接保持3em的距离 */
}

.logout-link {
    background-color: #ff6666; /* 不同的背景色表示不同的功能 */
    color: white; /* 字体颜色 */
    margin-bottom: 30px;
    /* 其他样式可以保持与.link-box类似，或进行适当调整 */
}

.logout-link:hover {
    transform: scale(1.05); /* 鼠标悬停时放大 */
}

.modal {
    display: none; /* 默认隐藏 */
    
    position: fixed; /* 固定位置 */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2;
   
     justify-content: center; /* 水平居中 */
    align-items: center; /* 垂直居中 */
}

.modal-content {
    border-radius: 10px;
    max-width: 400px;
    background: white;
    margin: 15% auto;
    padding: 20px;
    width: 30%;
    text-align: center;
}

/* 关闭按钮样式 */
#closeModal {
    padding: 10px 20px;
    background-color: #ea7072;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 25px;
    margin-left: auto;
    margin-right: auto;
    max-width: 200px;
}

#closeModal:hover {
    background-color: #d95a5c;
}
/* 加载动画的样式 */

.loader {
    border: 5px solid #f3f3f3; /* 浅色边框 */
    border-top: 5px solid #3498db; /* 蓝色边框 */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
    margin: auto; /* 自动边距，实现居中 */
}

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



.site-header {
    padding: 1em 0;
    margin-bottom: 2em;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center; /* 居中header内容 */
}

.site-header-content {
    color: white;
    display: flex;
    align-items: center; /* 垂直居中所有子项 */
    justify-content: space-between; /* 子项之间的间距均匀分布 */
    width: 80%; /* header内容占屏幕宽度的80% */

    margin: 0 auto; /* 如果需要，确保.site-header-content居中 */
}



.logo {
    height: 50px; /* 设置logo的高度，宽度将自动调整 */
}

.welcome-message {
    /* 根据需要添加样式，例如字体大小或颜色 */
}

.user-name {
    /* 可以在这里添加员工姓名的样式 */
}

.logout-button {
    background-color: #fc676e;
    color: white;
    border: none;
    padding: 0.5em 1em; /* 提供足够的内边距 */
    cursor: pointer;
    white-space: nowrap; /* 防止文字换行 */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px; /* 添加圆角 */
    margin-left: 0.5em;
}

.logout-button:hover {
    background-color: #fa5a62; /* 鼠标悬停时的背景色 */
}

.right-section {
    display: flex;
    align-items: center;
}

.site-footer {
    
    text-align: center;
    color: white; /* 根据需要更改文本颜色 */
    margin-top: 0.5em;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.site-footer a {
    color: white; /* Change the link color as needed */
    /*text-decoration: none;  Removes the underline from the hyperlink */
}

.logo-container {
    position: relative;
    display: inline-block; /* 或其他适合您布局的显示方式 */
}

.tooltip {
    position: absolute;
    bottom: 120%; /* 将提示框放置在Logo上方 */
    left: 50%; /* 将提示框水平居中相对于Logo */
    transform: translateX(-50%);
    background-color: rgba(0,0,0, 0.5);
    color: white;
    padding: 5px 10px;
    width: auto;
    border-radius: 5px;
    visibility: hidden; /* 默认不显示 */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.logo-container:hover .tooltip {
    visibility: visible; /* 鼠标悬停时显示 */
    opacity: 1;
}

.logo,
.right-section {
    display: block; /* 确保在桌面上是可见的 */
}

/* 移动设备样式 */

@media (max-width: 768px) {
    .container {
        width: 100%; /* 全宽度，提供更多空间 */
        
        box-sizing: border-box; /* 确保内边距不会影响宽度计算 */
        justify-content: center;
    }

    .logo-container img {
        max-width: 200px; /* 减小Logo尺寸 */
        margin-bottom: 1em;
    }
    
    #dashboard{
        display: none;
    }

    .link-container {
        flex-direction: column;
        gap: 10px; /* 减小链接框之间的间距 */
    }

    .link-box {
        padding: 15px 30px; /* 减小链接框的大小 */
        font-size: 18px; /* 减小链接框内字体大小 */
    }

    .container {
        width: 100%; /* 在小屏幕上，容器可以尽可能宽 */
         margin: 1em auto; /* 根据.site-header的实际高度调整 */
    }

    .site-footer {
        font-size: 3vw;
        width: 100%; /* 确保页脚占据整个宽度 */
    }

    .welcome-text {
        font-size: 1.5em; /* 减小欢迎文字的字体大小 */
    }

    .logout-container {
        margin-top: 3em; /* 增加与链接容器的距离 */
    }
    
    .login-container {
    
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 70%;
    }

    /* 隐藏Logo和用户信息 */
    .logo,
    .right-section {
        display: none;
    }
    .site-header{
        height: 30px;
    }
    /* 让欢迎语居中显示 */
    .site-header-content {
        justify-content: center;
    }
}

