/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏样式 */
.nav {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 100%;
    background-color: #1a202c;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 100;
    transition: width 0.3s;
}

.nav:hover {
    width: 180px;
}

.nav-item {
    width: 100%;
    padding: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #cbd5e0;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.nav-item:hover,
.nav-item.active {
    background-color: #2d3748;
    color: #fff;
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.nav-text {
    font-size: 12px;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s;
    white-space: nowrap;
    overflow: hidden;
}

.nav:hover .nav-text {
    opacity: 1;
    transform: translateY(0);
}

/* 幻灯片容器样式 */
.slides-container {
    margin-left: 80px;
    padding: 20px;
    min-height: 100vh; /* Use min-height instead of height */
    /* Remove overflow and scroll behavior as each page is separate */
}

/* 幻灯片样式 (applied to each page's main content area) */
.slide {
    min-height: calc(100vh - 40px); /* Adjust based on container padding */
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px; /* Keep some space if needed */
}

.slide-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #2b6cb0;
    border-bottom: 2px solid #ebf4ff;
    padding-bottom: 15px;
}

.slide-content {
    font-size: 1.2rem;
    max-width: 900px;
}

/* 特定幻灯片样式 */
.cover-slide {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    text-align: center;
}

.cover-slide .slide-title {
    font-size: 3rem;
    color: white;
    border-bottom: none;
}

.cover-slide .slide-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* 流程图样式 */
.flow-chart {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: space-around;
    align-items: center;
    margin: 40px 0;
    gap: 20px; /* Add gap for better spacing */
}

.flow-item {
    background-color: #ebf8ff;
    border-radius: 8px;
    padding: 15px;
    width: 180px;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.flow-item::after {
    content: "→";
    position: absolute;
    /* Adjust arrow positioning for multi-line flow */
    right: -25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #4299e1;
}

.flow-item:last-child::after {
    display: none;
}

/* Adjust arrow for wrapped items - might need JS or more complex CSS */
@media (max-width: 768px) {
    .flow-item::after {
        display: none; /* Hide arrows on small screens or handle differently */
    }
    .flow-chart {
        flex-direction: column; /* Stack items vertically */
        align-items: stretch;
    }
    .flow-item {
        width: auto; /* Allow full width */
        margin-bottom: 25px; /* Space between stacked items */
    }
    .flow-item::before { /* Use ::before for downward arrows */
        content: "↓";
        display: block;
        margin-top: 10px;
        font-size: 24px;
        color: #4299e1;
    }
    .flow-item:first-child::before {
        display: none;
    }
}

/* 代码样式 */
.code-block {
    background-color: #2d3748;
    color: #e2e8f0;
    padding: 20px;
    border-radius: 8px;
    font-family: monospace;
    overflow-x: auto;
    margin: 20px 0;
    font-size: 0.9em; /* Slightly smaller font for code */
}

.code-comment {
    color: #718096;
}

/* 特殊格式展示 */
.format-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.format-item {
    flex: 1;
    min-width: 280px;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.format-item-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #1a202c;
}

.format-icon {
    font-size: 1.5rem;
    margin-right: 10px;
    color: #4a5568;
}

.format-content {
    font-size: 0.95rem;
    color: #4a5568;
}

/* 信息卡片样式 */
.info-card {
    background-color: #e6fffa;
    border-left: 5px solid #38b2ac;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

.info-card-icon {
    font-size: 24px;
    margin-right: 15px;
    color: #38b2ac;
}

.info-card-content {
    flex-grow: 1;
}

/* 交互演示区域样式 */
.demo-area {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 30px;
    background-color: #f7fafc;
    display: flex;
    flex-direction: column;
    height: 500px; /* Fixed height for the demo area */
}

.demo-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: white;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 75%;
    word-wrap: break-word;
}

.user-message {
    background-color: #3182ce;
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background-color: #e2e8f0;
    color: #2d3748;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.demo-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    background-color: #f7fafc;
}

#demo-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #cbd5e0;
    border-radius: 5px;
    margin-right: 10px;
}

#demo-send {
    padding: 10px 20px;
    background-color: #3182ce;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#demo-send:hover {
    background-color: #2b6cb0;
}

#demo-send:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

/* 上一页/下一页按钮 (If needed globally, otherwise move to specific pages) */
.pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.pagination-button {
    padding: 10px 20px;
    background-color: #e2e8f0;
    color: #2d3748;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none; /* If using <a> tags */
}

.pagination-button:hover {
    background-color: #cbd5e0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav {
        width: 60px;
    }
    .nav:hover {
        width: 60px; /* Keep it collapsed on smaller screens */
    }
    .nav-text {
        display: none; /* Hide text on smaller screens */
    }
    .slides-container {
        margin-left: 60px;
        padding: 10px;
    }
    .slide {
        padding: 20px;
    }
    .slide-title {
        font-size: 1.8rem;
    }
    .slide-content {
        font-size: 1rem;
    }
    .cover-slide .slide-title {
        font-size: 2rem;
    }
    .cover-slide .slide-subtitle {
        font-size: 1.2rem;
    }
    .demo-area {
        height: 400px;
    }
}

/* Add other general styles previously in index.html here */
/* ... (e.g., .tooltip, specific list styles, etc. if they were general) */

