/* Records页面样式 */

.records-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 头部导航 */
.header-nav {
    display: flex;
    gap: 5px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 12px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #666;
}

.nav-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-item span {
    font-size: 1.2em;
    margin-right: 5px;
}

/* 主内容区 */
.main-content {
    display: flex;
    flex: 1;
    padding: 20px;
    gap: 20px;
}

/* 侧边栏 */
.sidebar {
    width: 200px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3em;
    font-weight: 600;
}

.agent-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agent-item {
    padding: 12px;
    background: #f8f9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.agent-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.agent-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.agent-item.empty {
    opacity: 0.5;
    cursor: not-allowed;
}

.agent-name {
    font-weight: 600;
}

.agent-count {
    font-size: 0.9em;
    opacity: 0.8;
}

/* 内容区域 */
.content-area {
    flex: 1;
    display: flex;
    gap: 20px;
}

/* 文件面板 */
.file-panel {
    width: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.file-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.file-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.file-item {
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.file-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.file-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.file-item.directory {
    background: #f0f4ff;
}

.file-item.directory:hover {
    background: #e3e9ff;
}

.file-icon {
    font-size: 1.1em;
}

.file-name {
    flex: 1;
    font-weight: 500;
    word-break: break-all;
}

.file-path {
    width: 100%;
    font-size: 0.85em;
    color: #888;
    margin-top: 2px;
}

/* Markdown面板 */
.markdown-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.markdown-panel h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.markdown-content {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 200px);
    line-height: 1.8;
}

/* Markdown内容样式 */
.markdown-content h1 {
    color: #667eea;
    margin: 20px 0 10px;
    font-size: 2em;
}

.markdown-content h2 {
    color: #764ba2;
    margin: 18px 0 8px;
    font-size: 1.5em;
}

.markdown-content h3 {
    color: #8e44ad;
    margin: 15px 0 6px;
    font-size: 1.3em;
}

.markdown-content h4 {
    color: #9b59b6;
    margin: 12px 0 5px;
    font-size: 1.1em;
}

.markdown-content p {
    margin: 10px 0;
    color: #333;
}

.markdown-content ul, .markdown-content ol {
    margin: 10px 0;
    padding-left: 20px;
}

.markdown-content li {
    margin: 5px 0;
    color: #555;
}

.markdown-content code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.markdown-content pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 15px 0;
}

.markdown-content pre code {
    background: none;
    color: #ecf0f1;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 4px solid #667eea;
    padding-left: 15px;
    margin: 15px 0;
    color: #666;
    font-style: italic;
}

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

.markdown-content th, .markdown-content td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: left;
}

.markdown-content: th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.markdown-content tr:nth-child(even) {
    background: #f8f9fa;
}

.markdown-content a {
    color: #667eea;
    text-decoration: none;
}

.markdown-content a:hover {
    text-decoration: underline;
}

/* 状态提示 */
.loading {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.error {
    text-align: center;
    color: #e74c3c;
    font-weight: 600;
    padding: 20px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-area {
        flex-direction: column;
    }

    .file-panel {
        width: 100%;
        max-height: 200px;
    }

    .markdown-panel {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .content-area {
        flex-direction: column;
    }

    .file-panel {
        width: 100%;
        max-height: 200px;
    }

    .markdown-panel {
        min-height: 300px;
    }
}
