/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 头部导航栏样式（固定在顶部） */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #1a73e8;
    color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
}

.logo-area {
    display: flex;
    align-items: center;
}

.logo {
    width: 40px;
    height: 40px;
    background-image: url('logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-right: 10px;
    border-radius: 50%;
    background-color: transparent;
    color: transparent;
    justify-content: normal;
    font-weight: normal;
}

.app-title {
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: block;
}

/* 侧边折叠栏样式 */
.sidebar {
    position: fixed;
    top: 65px;
    right: -250px;
    width: 250px;
    height: calc(100vh - 65px);
    background-color: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease-in-out;
    z-index: 99;
    overflow-y: auto;
    opacity: 0;
    /* 新增：初始透明 */
}

.sidebar.show {
    right: 0;
    opacity: 1;
    animation: slideIn 0.3s ease-out forwards;
    /* 显示动画 */
}

.sidebar:not(.show) {
    animation: slideOut 0.3s ease-in forwards;
    /* 隐藏动画 */
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-title {
    font-size: 18px;
    font-weight: bold;
    color: #1a73e8;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #eee;
}

.sidebar-menu li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.2s, color 0.2s;
}

.sidebar-menu li a:hover {
    background-color: #f5f7fa;
    color: #1a73e8;
}

/* 主要内容区域样式 */
main {
    flex: 1;
    padding: 30px;
    margin-top: 65px;
    transition: margin-right 0.3s ease-in-out;
}

.announcement,
.version-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 30px;
    position: relative;
}

.announcement h2,
.version-section h1 {
    color: #333;
    margin-bottom: 20px;
    font-size: 22px;
    position: relative;
    padding-left: 10px;
    border-left: 4px solid #1a73e8;
}

/* 更新内容盒子样式 */
.update-box {
    margin-top: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    background-color: #f9f9f9;
}

.update-box p {
    margin: 8px 0;
    font-size: 15px;
    line-height: 1.5;
}

.update-box p:before {
    content: "·";
    color: #1a73e8;
    margin-right: 8px;
    font-weight: bold;
}

/* 页脚样式（固定在页面底部） */
footer {
    text-align: center;
    padding: 15px 20px;
    background-color: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 80;
    color: #666;
    font-size: 14px;
}

/* 响应式适配 - 平板设备（768px 以下） */
@media (max-width: 768px) {
    header {
        padding: 12px 20px;
    }

    .logo {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }

    .app-title {
        font-size: 20px;
    }

    .sidebar {
        width: 220px;
        right: -220px;
        top: 52px;
        height: calc(100vh - 52px);
    }

    main {
        padding: 20px;
        margin-top: 52px;
    }

    .announcement,
    .version-section {
        padding: 20px;
        margin-bottom: 20px;
    }

    .announcement h2,
    .version-section h1 {
        font-size: 19px;
    }
}

/* 响应式适配 - 手机设备（480px 以下） */
@media (max-width: 480px) {
    header {
        padding: 10px 15px;
    }

    .logo {
        width: 32px;
        height: 32px;
        margin-right: 6px;
        font-size: 14px;
    }

    .app-title {
        font-size: 18px;
    }

    .menu-toggle {
        font-size: 20px;
    }

    .sidebar {
        width: 180px;
        right: -180px;
        top: 42px;
        height: calc(100vh - 42px);
    }

    .sidebar-menu li a {
        padding: 12px 15px;
        font-size: 14px;
    }

    main {
        padding: 15px;
        margin-top: 42px;
    }

    .announcement,
    .version-section {
        padding: 15px;
    }

    .update-box {
        padding: 12px;
    }

    footer {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* 动画效果 - 侧边栏平滑过渡 */
@keyframes slideIn {
    from {
        right: -250px;
        opacity: 0;
    }

    to {
        right: 0;
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        right: 0;
        opacity: 1;
    }

    to {
        right: -250px;
        opacity: 0;
    }
}