/* 确保表格不会超出容器 */
table {
    max-width: 100%;
    width: 100% !important;
    height: auto !important;
    table-layout: fixed;
    border-collapse: collapse;
}

table td, table th {
    word-break: break-word;
    padding: 8px;
    border: 1px solid #ddd;
}

/* 使表格在小屏幕上可以滚动 */
@media screen and (max-width: 600px) {
    .table-container {
        width: 100%;
        overflow-x: auto;
    }
}

/* 使图片响应式 */
img {
    max-width: 100%;
    height: auto !important;
}

/* 确保所有内容都在容器内 */
#content {
    max-width: 100%;
    overflow-x: hidden;
}

.navbar {
    height: 45px;
    background-color: #1ba34e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    width: 100%;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
}

.navbar-left, .navbar-center, .navbar-right {
    display: flex;
    align-items: center;
    flex: 1;
}

.navbar-left {
    justify-content: flex-start;
}

.navbar-center {
    justify-content: center;
    /*padding-right: 20px;*/
}

.navbar-right {
    justify-content: flex-end;
}

.back-icon {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.back-icon-img {
    width: 20px;
    height: 20px;
}

.nav-button {
    background-color: transparent;
    border: 1px solid white;
    color: white;
    padding: 5px 10px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    display: flex;
    align-items: center;
}

.nav-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

body {
    margin-top: 45px;
    padding: 0;
}

.directory-icon {
    width: 16px;
    height: 16px;
    margin-right: 5px;
}

.nav-button.download-btn {
    margin-left: -10px;
    padding: 5px 15px; /* 增加左右内边距 */
    white-space: nowrap; /* 防止文字换行 */
}

.directory-overlay {
    position: fixed;
    top: 45px; /* 与导航栏高度一致 */
    right: -300px;
    width: 300px;
    height: calc(100% - 45px); /* 减去导航栏的高度 */
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    overflow-y: auto;
}

.directory-overlay.active {
    right: 0;
}

.directory-content {
    padding: 20px;
}

.directory-content h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

#directory-list {
    list-style-type: none;
    padding: 0;
}

#directory-list li {
    margin-bottom: 10px;
}

#directory-list a {
    text-decoration: none;
    color: #333;
    display: block;
    padding: 5px 0;
}

#directory-list a:hover {
    color: #1ba34e;
}

#directory-list .level-1 {
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 10px;
}

#directory-list .level-2 {
    font-weight: normal;
    padding-left: 20px;
    margin-bottom: 5px;
}

#directory-list .submenu {
    display: none;
    margin-top: 5px;
}

#directory-list .level-1.active + .submenu {
    display: block;
}

#directory-list .level-1::before {
    content: '▶';
    display: inline-block;
    margin-right: 5px;
    transition: transform 0.3s;
}

#directory-list .level-1.active::before {
    transform: rotate(90deg);
}
