:root {
    --primary-color: #1e88e5;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--primary-color);
    color: white;
    padding: 0 20px;
    z-index: 1000;
}

/* 添加 header-wrapper 样式 */
.header-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--primary-color);
}

.menu-btn {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
}

.menu-btn span {
    width: 100%;
    height: 2px;
    background-color: white;
}

.title {
    margin-left: 20px;
    flex-grow: 1;
}

.user-info {
    cursor: pointer;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.side-menu {
    position: fixed;
    left: 0;
    top: calc(var(--header-height) + 24px);  /* 增加了 24px 的顶部间距 */
    bottom: 0;
    width: 250px;
    background-color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    border-right: 1px solid #e0e0e0;
    border-top-right-radius: 8px;  /* 添加右上圆角 */
}

.side-menu.active {
    transform: translateX(0);
}

.side-menu ul {
    list-style: none;
    padding: 20px 0;
}

.side-menu li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.side-menu li a:hover {
    background-color: #f5f5f5;
    border-left-color: #e0e0e0;
}

.side-menu a.active {
    background-color: #f0f7ff;
    border-left-color: var(--primary-color);
    font-weight: 500;
    color: var(--primary-color);
}

main.menu-active {
    margin-left: 250px;
}

.user-menu {
    position: absolute;
    top: var(--header-height);
    right: 20px;
    width: 250px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: none;
    z-index: 1000;
}

.user-menu.active {
    display: block;
}

.user-menu ul {
    list-style: none;
    padding: 10px 0;
}

.user-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    text-decoration: none;
}

.user-menu li a:hover {
    background-color: var(--secondary-color);
}

/* 更新 page-container 的 padding-top */
.page-container {
    min-height: 100vh;
    padding-top: calc(var(--header-height)) + 50px; /* header + status height */
    background-color: var(--secondary-color);
}

main {
    min-height: calc(100vh - var(--header-height));
    padding: 5px;
    margin-left: 0;
    transition: margin-left 0.3s ease;
    background-color: var(--secondary-color);
}

main.menu-active {
    margin-left: 250px;
}

@media screen and (max-width: 768px) {
    main.menu-active {
        margin-left: 0;
    }
}

/* 添加图标占位样式 */
.menu-btn, .user-info {
    min-width: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
}

.user-icon {
    width: 40px;
    height: 40px;
    filter: invert(100%);
    padding: 2px;
}
  