/* style.css */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    color: #333;
    margin: 0;
    display: flex; /* 启用 Flexbox 布局 */
}

/* 侧边栏样式 */
.sidebar {
    width: 20%;
    background-color: #34495e; /* 深蓝色背景 */
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    flex-shrink: 0;
    
    /* === 固定侧边栏的关键设置 === */
    height: 96vh; /* 占满整个视口高度 */
    position: sticky; /* 粘性定位 */
    top: 0; /* 固定在顶部 */
    /* ========================== */
    
    overflow-y: auto; /* 允许侧边栏内容滚动 */
}

.sidebar h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #ecf0f1;
    font-size: 1.2em;
}

.category-list a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #ecf0f1;
    border-left: 5px solid transparent;
    transition: background-color 0.2s, border-left-color 0.2s;
}

.category-list a:hover {
    background-color: #4e6b87;
}

.category-list a.active {
    background-color: #2c3e50;
    border-left-color: #e74c3c; /* 强调当前选中的分类 */
    font-weight: bold;
}

/* 主内容区域样式 */
.main-content {
    flex-grow: 1;
    padding: 20px 40px;
    overflow-x: hidden;
}

.main-content h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

/* 表格样式 */
.icon-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background-color: #fff;
}

.icon-table th, .icon-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: left;
}

.icon-table th {
    background-color: #3498db;
    color: white;
    font-weight: bold;
}

.icon-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.icon-table tr:hover {
    background-color: #f1f1f1;
}

.icon-preview i {
    font-size: 1.5em;
    color: #2c3e50;
    display: block;
    text-align: center;
}

.icon-class {
    font-family: 'Consolas', monospace;
    color: #c0392b;
    word-break: break-all;
    display: block;
}
