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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* 左侧导航栏 */
.sidebar {
    width: 25%;
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    border-bottom: 2px solid #34495e;
    padding-bottom: 10px;
}

/* 导航菜单样式 */
.nav-btn {
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    margin: 5px 0;
    border: none;
    background-color: transparent;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-btn:hover {
    background-color: #34495e;
}

.nav-btn.active {
    background-color: #3498db;
}

/* 导航层级样式 */
.nav-level-2,
.nav-level-3,
.nav-level-4 {
    display: none;
    margin-left: 20px;
    margin-top: 5px;
    margin-bottom: 5px;
}

.nav-level-2.show,
.nav-level-3.show,
.nav-level-4.show {
    display: block;
}

.nav-level-4 .nav-btn {
    padding-left: 30px;
    font-size: 0.9rem;
}

/* 右侧内容区 */
.content {
    width: 75%;
    padding: 30px;
    overflow-y: auto;
    background-color: white;
}

.content-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #e7e7e7;
    padding-bottom: 15px;
}

#current-title {
    color: #2c3e50;
    margin-bottom: 10px;
}

#breadcrumb {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.content-body {
    min-height: 400px;
}

#knowledge-content {
    line-height: 1.8;
}

#knowledge-content h3 {
    color: #2980b9;
    margin: 20px 0 15px 0;
    font-size: 1.3rem;
}

#knowledge-content p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 公式样式 */
.formula {
    background-color: #f8f9fa;
    padding: 15px;
    margin: 20px 0;
    border-left: 4px solid #3498db;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.symbol-table {
    margin: 15px 0 25px 0;
    border-collapse: collapse;
    width: 100%;
}

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

.symbol-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

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

/* 底部按钮 */
.content-footer {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e7e7e7;
}

#experiment-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#experiment-btn:hover {
    background-color: #2980b9;
}

#experiment-btn:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .content {
        width: 100%;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}