/* 基础设定与暗色主题 */
body {
    background-color: #1a1a1a;
    color: #c5c5c5;
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    margin: 0;
    transition: none;
}

/* 临时禁用动画的类 */
body.no-transition * {
    transition: none !important;
    animation: none !important;
}

/* 容器布局 */
.container {
    display: flex;
}

/* 呼吸发光动画 */
@keyframes breathe-glow {
    0% {
        border-right-color: rgba(0, 170, 255, 0.2);
        box-shadow: 2px 0 8px -2px rgba(0, 170, 255, 0.2);
    }
    50% {
        border-right-color: rgba(0, 170, 255, 0.7);
        box-shadow: 2px 0 18px -2px rgba(0, 170, 255, 0.7);
    }
    100% {
        border-right-color: rgba(0, 170, 255, 0.2);
        box-shadow: 2px 0 8px -2px rgba(0, 170, 255, 0.2);
    }
}

/* 侧边栏基础样式 - 现代标准交互 */
#sidebar {
    width: 200px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: -240px; /* 默认收起，只露出30px的切换按钮区域 */
    background-color: #222;
    padding: 20px;
    z-index: 1000;
    border-right: 2px solid transparent;
    transition: left 0.3s ease-in-out, 
                border-color 0.3s ease-in-out, 
                box-shadow 0.3s ease-in-out;
    animation: breathe-glow 2s ease-in-out infinite;
}

/* 侧边栏展开状态 */
#sidebar.open {
    left: 0;
    animation: none;
    border-right-color: #00aaff;
    box-shadow: 3px 0 20px -3px rgba(0, 170, 255, 0.8);
}

/* 切换按钮容器 - 科幻梯形突出 */
#sidebar-toggle {
    font-family: 'Arial', sans-serif;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #333 0%, #2a2a2a 50%, #222 100%);
    border: none;
    cursor: pointer;
    padding: 12px 8px;
    position: absolute;
    top: 10px;
    right: -45px; /* 向外突出 */
    width: 45px;
    height: 50px;
    clip-path: polygon(0 0, 100% 15%, 100% 85%, 0 100%); /* 梯形斜切 */
    border-right: 2px solid rgba(0, 170, 255, 0.3);
    border-top: 1px solid rgba(0, 170, 255, 0.2);
    border-bottom: 1px solid rgba(0, 170, 255, 0.2);
    box-shadow: 2px 0 10px rgba(0, 170, 255, 0.1);
    transition: all 0.3s ease-in-out;
}

#sidebar-toggle:hover {
    color: rgba(255, 255, 255, 0.9);
    background: linear-gradient(135deg, #444 0%, #3a3a3a 50%, #333 100%);
    border-right-color: rgba(0, 170, 255, 0.6);
    box-shadow: 3px 0 15px rgba(0, 170, 255, 0.3);
    transform: translateX(2px);
}

#sidebar.open #sidebar-toggle {
    color: rgba(255, 255, 255, 1);
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 50%, #006699 100%);
    border-right-color: rgba(0, 170, 255, 0.8);
    box-shadow: 3px 0 20px rgba(0, 170, 255, 0.5);
}

/* 主内容区 */
#content {
    margin-left: 35px; /* 只为收起状态的侧边栏切换按钮留出空间 */
    padding: 20px;
    max-width: 900px;
}

/* 移除侧边栏展开时主内容区的样式变化 */

/* 导航栏内容 */
#sidebar h3 {
    color: #e0e0e0;
    margin-bottom: 20px;
    white-space: nowrap;
}

#sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sidebar li {
    margin: 0;
}

#sidebar a {
    color: #c5c5c5;
    text-decoration: none;
    display: block;
    padding: 8px 0;
    transition: color 0.2s ease-in-out;
    white-space: nowrap;
}

#sidebar a:hover {
    color: #00aaff;
}

#sidebar a.active {
    color: #00ffff;
    font-weight: bold;
    border-left: 3px solid #00ffff;
    padding-left: 10px;
}

/* 内容样式 */
h1, h2, h3 {
    color: #e0e0e0;
    border-bottom: 1px solid #444;
    padding-bottom: 5px;
}

h2 {
    color: #00aaff;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

table, th, td {
    border: 1px solid white;
}

th, td {
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #2c2c2c;
    color: #00aaff;
}

/* 搜索框样式 */
#searchInput {
    width: 100%;
    padding: 8px;
    background: #333;
    border: 1px solid #555;
    color: #c5c5c5;
    margin-bottom: 20px;
}