* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* 轮播背景 */
.slideshow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.slideshow-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 轮播动画 */
@keyframes fade {
    0% { opacity: 0; }
    20% { opacity: 1; }
    33.33% { opacity: 1; }
    53.33% { opacity: 0; }
    100% { opacity: 0; }
}

.slideshow-slide:nth-child(1) { animation: fade 18s infinite 0s; }
.slideshow-slide:nth-child(2) { animation: fade 18s infinite 5s; }
.slideshow-slide:nth-child(3) { animation: fade 18s infinite 10s; }
.slideshow-slide:nth-child(4) { animation: fade 18s infinite 15s; }
.slideshow-slide:nth-child(5) { animation: fade 18s infinite 20s; }
.slideshow-slide:nth-child(6) { animation: fade 18s infinite 25s; }

/* Logo 样式 */
.logo {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    cursor: pointer;
    transition: transform 0.3s;
    filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

.logo:hover {
    transform: scale(1.1);
}

.logo img {
    width: 100px;
    height: auto;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background-color: #000000;
    z-index: 1000;
    transition: left 0.3s ease-in-out;
    color: white;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar.active {
    left: 0;
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 30px;
    cursor: pointer;
}

.sidebar nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar ul {
    list-style: none;
    margin-top: 50px;
}

.sidebar ul li {
    margin-bottom: 20px;
}

.sidebar ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s;
    display: block;
}

.sidebar ul li a:hover {
    color: #00a8ff;
}

/* 箭头指示器样式 */
.has-submenu > a:after {
    content: "▶";
    float: right;
    margin-right: 10px;
    font-size: 12px;
    transition: transform 0.3s;
}

.has-submenu.active > a:after {
    transform: rotate(90deg);
}

/* 子菜单样式 */
.submenu {
    display: none;
    margin-left: 20px;
    margin-top: 10px;
}

.has-submenu.active > .submenu {
    display: block;
}

/* 侧边栏登录按钮 */
.sidebar .login-button {
    margin-top: 20px;
    padding: 10px 40px;
    background-color: #00a8ff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: center;
    margin-bottom: 20px;
}

.sidebar .login-button:hover {
    background-color: #0084c8;
}

/* 登录按钮 */
.login-container {
    position: fixed;
    bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.login-btn {
    padding: 10px 40px;
    background-color: #00a8ff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #0084c8;
}


/* 用户信息样式 */
.user-info {
    padding: 15px;
    margin-bottom: 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    text-align: center;
}

.username {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    margin-bottom: 5px;
}

.user-department {
    font-size: 14px;
    color: #ccc;
}

/* 按钮容器样式 */
.button-container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 8px;
    margin: 10px;
    width: calc(100% - 20px);
}

/* 按钮基础样式 - 优化文字显示 */
.login-button {
    flex: 1;
    min-height: 32px;
    padding: 6px 8px;
    font-size: 12px;
    text-align: center;
    color: white;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;

    /* 确保内容居中和横向显示 */
    display: flex;
    align-items: center;
    justify-content: center;

    /* 防止文字换行 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.login-button:hover {
    background-color: #0056b3;
}

/* 单独的登录按钮样式 */
.sidebar > .login-button {
    margin: 10px auto !important;
    width: 80px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 13px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #007bff !important;
    color: white !important;
    border: none !important;
    border-radius: 16px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    overflow: visible !important;
    max-width: none !important;
    min-height: 0 !important;
    white-space: nowrap !important;
}

.sidebar > .login-button:hover {
    background-color: #0056b3 !important;
    box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* 添加响应式布局全局样式 */
@media (max-width: 1200px) {
    /* 平板设备 */
    .logo img {
        max-width: 120px;
    }
    
    /* 调整任何全局元素大小 */
    button, .btn {
        padding: 8px 16px;
    }
}

@media (max-width: 768px) {
    /* 移动设备 */
    .logo img {
        max-width: 100px;
    }
    
    /* 提高小屏幕上元素的可读性 */
    body {
        font-size: 14px;
    }
    
    h1, h2, h3 {
        margin-bottom: 0.5rem;
    }
    
    /* 确保弹窗在小屏幕上居中且大小合适 */
    .modal-content {
        max-width: 90%;
    }
    
    /* 增加触摸目标大小 */
    button, .btn, [type="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 减少内边距以节省空间 */
    .container, section, .panel {
        padding: 10px;
    }
}
