body {
    background-color: #121212; /* 深色背景 */
    color: #f3c0c0; /* 浅色文字 */
    font-family: Arial, sans-serif;
    margin: 0 40px; /* 增加左右外边距 */
    border: 1px solid #333; /* 添加主体两边的边框 */
}

h1, h2, h3, h4, h5, h6 {
    color: #ca90c3; /* 修改为金属色 */
}

a {
    color: #bb86fc; /* 按钮或链接颜色 */
    text-decoration: none;
}

a:hover {
    color: #3700b3; /* 鼠标悬停时的颜色 */
}

.container {
    background-color: #1f1f1f; /* 容器背景颜色 */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 80%; /* 调整宽度 */
    margin: 0 auto; /* 居中显示 */
}

button {
    background-color: #bb86fc; /* 按钮背景颜色 */
    color: #ffffff; /* 按钮文字颜色 */
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #3700b3; /* 按钮悬停时的背景颜色 */
}

main {
    display: flex; /* 添加flex布局 */
    flex-direction: column; /* 设置主轴方向为垂直 */
    align-items: center; /* 水平居中对齐 */
    padding: 20px; /* 添加内边距 */
}

section:first-of-type {
    max-width: 80%; /* 设置最大宽度为80%，留出10%的空间 */
    width: 100%; /* 确保宽度占满父容器 */
    text-align: center; /* 文本居中对齐 */
    margin-bottom: 20px; /* 添加底部外边距 */
}

.ai-chat, .ai-office, .ai-music, .ai-voice, .hot-tools, .tencent-hot-tools, .ai-translation { /* 添加新的分类样式 */
    background-color: #1f1f1f; /* 分类背景颜色 */
    color: #3a8119; /* 分类文字颜色 */
    padding: 100px 100px; /* 增加左右内边距 */
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #53595a; /* 添加边框突出显示 */
    position: relative;
    max-width: 80%; /* 设置最大宽度为80%，留出10%的空间 */
    margin: 0 auto; /* 居中显示 */
}

.ai-chat::before, .ai-office::before, .ai-music::before, .ai-voice::before, .hot-tools::before, .tencent-hot-tools::before, .ai-translation::before { /* 添加新的分类样式 */
    content: attr(data-title);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #bb86fc;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.ai-chat h2, .ai-office h2, .ai-music h2, .ai-voice h2, .hot-tools h2, .tencent-hot-tools h2, .ai-translation h2 { /* 添加新的分类样式 */
    color: #a86f6f; /* 分类标题颜色 */
    margin-bottom: 10px;
}

.ai-chat a, .ai-office a, .ai-music a, .ai-voice a, .hot-tools a, .tencent-hot-tools a, .ai-translation a { /* 添加新的分类样式 */
    color: #bb86fc; /* 分类链接颜色 */
    text-decoration: none;
}

.ai-chat a:hover, .ai-office a:hover, .ai-music a:hover, .ai-voice a:hover, .hot-tools a:hover, .tencent-hot-tools a:hover, .ai-translation a:hover { /* 添加新的分类样式 */
    color: #3700b3; /* 分类链接悬停颜色 */
}

.tool-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* 增加每个小div之间的距离 */
}

.tool-item {
    /*flex: 1 1 calc(15% - 40px);  修改为每行显示5个工具，每个工具项变得更窄 */
    background-color: #0d1815;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 2px solid #333; /* 添加边框 */
    /*width: calc(10% - 10px);  调整宽度 */
    /*height: calc(10% - 10px);  调整高度，使其变成正方形 */
    width: 150px;
    height: 140px
}

.tool-item:hover {
    box-shadow: 0 16px 16px rgba(2, 226, 241, 0.3); /* 添加鼠标悬停时的阴影效果 */
}

.tool-item img {
    width: 50px; /* 设置固定宽度 */
    height: 50px; /* 设置固定高度 */
    border-radius: 4px;
    margin-bottom: 10px;
}

.tool-item h3 {
    margin: 10px 0 5px;
    font-size: 12px;
    color: #97a3db;
}

.tool-item p {
    font-size: 10px;
    color: #ceb2b2;
    white-space: nowrap; /* 确保文字不换行 */
    overflow: hidden; /* 隐藏溢出的文字 */
    text-overflow: ellipsis; /* 使用省略号表示溢出的文字 */
    max-width: 90px; /* 设置最大宽度以确保文字少于10个字符 */
    position: relative; /* 设置相对定位 */
    word-break: break-all; /* 确保文字在达到最大宽度时断开 */
}

.tool-item p:hover {
    white-space: normal; /* 恢复文字换行 */
    overflow: visible; /* 显示溢出的文字 */
    position: absolute; /* 设置绝对定位 */
    background-color: #1f1f1f; /* 设置背景颜色 */
    padding: 10px; /* 设置内边距 */
    border-radius: 8px; /* 设置圆角 */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 设置阴影 */
    z-index: 1000; /* 设置层级 */
    width: 200px; /* 设置宽度 */
    max-width: 200px; /* 设置最大宽度 */
    font-size: 14px; /* 设置字体大小 */;
}

.sidebar {
    position: fixed;
    top: 50px;
    left: 50px;
    width: 200px;
    background-color: rgba(31, 31, 31, 0.8);
    border-radius: 8px;
    box-shadow: 0 8px 8px rgba(142, 245, 7, 0.1);
    padding: 10px;
    z-index: 1000;
}
.sidebar2 {
    position: fixed;
    top: 50px;
    right: 20px;
    width: 200px;
    background-color: rgba(31, 31, 31, 0.8);
    border-radius: 8px;
    box-shadow: 0 8px 8px rgba(142, 245, 7, 0.1);
    padding: 10px;
    z-index: 1000;
}

.sidebar  ul {
    list-style-type: none;
    padding: 1px;
}

.sidebar ul li {
    margin-bottom: 10px; /* 将行间距从10px减少到5px */
}

.sidebar ul li a {
    color: #9251db;
    text-decoration: none;
    font-family:Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    display: block;
    padding: 5px 10px;
    border-radius: 10px;
}

.sidebar ul li a:hover {
    background-color: #2c3f08;
    color: #ffffff;
    transform: translateX(10px)
}