* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background-color: antiquewhite;
    color: chocolate;
}

body {
    margin: auto;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    gap: 10px;
}

.top-panel {
    flex-shrink: 0;
    background-color: #34495e;
    color: white;
    padding: 10px 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.top-panel a {
    color: #3498db;
    text-decoration: none;
}

.top-panel a:hover {
    text-decoration: underline;
}

.container {
    display: flex;
    flex: 1;
    width: 100%;
    gap: 10px;
    min-height: 0;
}

.left-panel {
    flex: 1;
    background-color: #2c3e50;
    color: white;
    padding: 15px;
    border-radius: 15px;
    overflow-y: auto;
    min-height: 0;
}

.menu-item {
    width: 100%;
}

.menu-header {
    padding: 10px 12px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    border-radius: 8px;
}

.menu-header::before {
    content: "▶";
    font-size: 10px;
    margin-right: 8px;
    transition: transform 0.3s;
}

.menu-item.active > .menu-header::before {
    transform: rotate(90deg);
}

.menu-header:hover {
    background-color: #3d566e;
}

.menu-item.active > .menu-header {
    background-color: #3d566e;
}

.menu-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 15px;
}

.menu-item.active > .menu-content {
    max-height: 1000px;
}

.menu-content > p {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    border-radius: 6px;
    margin: 2px 0;
}

.menu-content > p:hover {
    background-color: #4a6278;
}

/* 选中状态的样式 */
.menu-content > p.active {
    background-color: #3498db;
    color: white;
}

.right-panel {
    flex: 7;
    background-color: #ecf0f1;
    padding: 20px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.welcome-msg {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
}

#pdf-viewer {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    background-color: white;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
}
