@charset "utf-8";

/* 保持现有的 padding 类 */
.padding {
    margin: 10px;
}

/* 去除列表符号 */
.resource-list,
.resource-list ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.resource-list > li {
    margin-bottom: 20px;
    /* 去掉下边框 */
    /* border-bottom: 1px solid #ccc; */
    /* 保留 padding-bottom 以增加间距 */
    padding-bottom: 10px;
}

/* 一级列表项容器，左右分布 */
.top-level-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    width: 100%; /* 确保背景颜色填满整个列表项 */
    padding: 15px; /* 增加内边距 */
    box-sizing: border-box;
}

/* 左侧文本区域 */
.top-level-left {
    display: flex;
    align-items: center;
}

.top-level-left h3 {
    margin: 0;
    padding: 0;
    color: #000; /* 修改为白色以适应背景颜色 */
    font-size: 1.2em;
}

.top-level-left h3 a {
    margin: 0;
    padding: 0;
    color: #fff; /* 修改为白色以适应背景颜色 */
    font-size: 1.2em;
}

/* 右侧箭头区域 */
.toggle-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-btn {
    font-size: 1em;
    color: #fff; /* 修改为白色以适应背景颜色 */
    transition: transform 0.3s ease;
    cursor: pointer;
}

/* 二级列表 */
.sub-list {
    background-color: #f9f9f9;
    padding: 10px 20px;
    transition: max-height 0.3s ease;
    /* 默认展开 */
    max-height: none;
    overflow: visible;
    text-align: center;
}

.sub-list li {
    margin: 10px 0;
}

.sub-list li h4 {
    margin: 0;
    padding: 0;
    color: #000; /* 设置为黑色 */
    margin-left: 0; /* 去掉左边距，确保左对齐 */
}

.sub-list li a {
    text-decoration: none;
    color: #000; /* 设置为黑色 */
    transition: color 0.3s;
}

.sub-list li a:hover {
    color: #E15F49;
}

/* main 区域链接和文字 hover 效果 */
main .resource-list a {
    color: #000; /* 修改为黑色以适应背景颜色 */
    transform: scale(1.0);
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

main .resource-list a:hover {
    color: #E15F49;
    transform: scale(1.05);
}

/* 优化 main 区域的样式 */
main {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 为每个一级列表项分配不同的背景颜色 */
.item1 .top-level-item {
    background-color: #ff7f7f; /* 红色 */
}

.item2 .top-level-item {
    background-color: #7f7fff; /* 蓝色 */
}

.item3 .top-level-item {
    background-color: #7fff7f; /* 绿色 */
}

.item4 .top-level-item {
    background-color: #ffd27f; /* 橙色 */
}

.item5 .top-level-item {
    background-color: #d47fff; /* 紫色 */
}

.item6 .top-level-item {
    background-color: #7fffd4; /* 青色 */
}

/* 为 main 区域的一级列表项添加圆角和阴影 */
.resource-item {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.resource-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 为 toggle 按钮添加旋转效果 */
.resource-item .toggle-btn.rotated {
    transform: rotate(90deg);
}

/* 优化 aside 区域的样式 */
aside {
    scroll-behavior: smooth;
    /* 添加固定高度和垂直滚动 */
    max-height: 80vh;
    overflow-y: auto;
}

.aside-main-section {
    margin-bottom: 40px;
}

.aside-main-section h3 {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    color: #fff;
    margin-bottom: 20px;
}

/* 为每个 aside 区域的标题分配不同的背景颜色 */
.section1 h3 {
    background-color: #ff7f7f; /* 红色 */
}

.section2 h3 {
    background-color: #7f7fff; /* 蓝色 */
}

.section3 h3 {
    background-color: #7fff7f; /* 绿色 */
}

.section4 h3 {
    background-color: #ffd27f; /* 橙色 */
}

.section5 h3 {
    background-color: #d47fff; /* 紫色 */
}

.section6 h3 {
    background-color: #7fffd4; /* 青色 */
}

/* 优化 aside 的子块 */
.aside-sub-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aside-sub-block {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.aside-sub-block:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.aside-sub-block h4 {
    background-color: #d9e0e7;
    padding: 8px;
    border-radius: 5px;
    text-align: center;
    margin-bottom: 10px;
}

.aside-sub-block p {
    margin: 5px 0;
    line-height: 1.5;
}

.aside-sub-block a {
    color: #0066cc;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.aside-sub-block a:hover {
    color: #ff6600;
}

/* Footer 样式保持不变 */

/* 响应式设计 */
@media (max-width: 1000px) {
    .content {
        flex-direction: column;
    }

    aside {
        order: -1;
        max-height: 60vh; /* 调整高度以适应较小屏幕 */
    }
}

@media (max-width: 700px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-nav nav {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-nav nav a {
        margin: 5px 0;
    }
}
