/* AI工具管理页面样式 */
/* 参照 workflow.css 样式设计，保持完全一致 */

.ai-tools-container, .ai-tools-container-fluid {
    display: flex;
    flex-direction: row; /* 左右布局 */
    min-height: 100vh;
    height: auto;
    width: 100%;
}

/* 基本样式 */
.ai-tools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
}

.ai-tools-header {
    text-align: center;
    margin-bottom: 60px;
}

.ai-tools-title {
    color: var(--primary-color, #4a8cff);
    font-size: 2.5em;
    margin-bottom: 20px;
}

.ai-tools-description {
    color: var(--text-color, #fff);
    font-size: 1.1em;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

/* 返回链接样式 */
.back-link {
    position: fixed; /* 改为固定定位，确保始终可见 */
    top: 20px;
    right: 20px;
    color: var(--primary-color, #4a8cff);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    background-color: rgba(30, 30, 30, 0.7);
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000; /* 确保链接在最上层 */
}

.back-link:hover {
    color: var(--hover-color, #3a7ae0);
    background-color: rgba(40, 40, 40, 0.9);
}

.back-link i {
    margin-right: 8px;
}

/* 主要内容区域 */
.ai-tools-content {
    display: flex;
    gap: 30px;
    min-height: 600px;
}

/* 侧边栏样式 */
.sidebar {
    width: 300px;
    background-color: #1e1e1e;
    padding: 20px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar h3 {
    color: #4a9eff;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
}

#tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

#tools-list li {
    padding: 6px 15px;
    margin-bottom: 1px;
    background-color: #2d2d2d;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

#tools-list li:hover {
    background-color: #3a3a3a;
}

#tools-list li.active {
    background-color: #4a9eff;
    color: #fff;
}

.tool-item {
    padding: 12px 15px;
    margin-bottom: 2px;
    background-color: #2d2d2d;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.tool-item:hover {
    background-color: #3a3a3a;
    border-left-color: #4a9eff;
}

.tool-item.active {
    background-color: #4a9eff;
    color: #fff;
    border-left-color: #fff;
}

.tool-name {
    font-weight: 500;
    font-size: 14px;
}

/* 内容区域样式 */
.content-area {
    flex: 1;
    padding: 30px;
    background-color: #121212;
    overflow-y: auto;
    height: 100vh;
}

#tool-info {
    max-width: 800px;
    margin: 0 auto;
}

#tool-info h2 {
    color: #4a9eff;
    margin-bottom: 20px;
    font-size: 28px;
}

#tool-description {
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.8;
    color: #ddd;
}

#tool-description p {
    margin-bottom: 15px;
    text-align: justify;
}

/* 默认状态样式 */
.default-state {
    text-align: center;
    padding: 40px 20px;
}

.default-state h2 {
    color: #4a9eff;
    margin-bottom: 30px;
    font-size: 32px;
}

.default-state p {
    color: #ddd;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #ddd;
}

.loading i {
    font-size: 2em;
    color: #4a9eff;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态样式 */
.error-state {
    text-align: center;
    padding: 60px 20px;
    color: #ff6b6b;
}

.error-state i {
    font-size: 3em;
    margin-bottom: 20px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .ai-tools-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
    
    .content-area {
        height: auto;
    }
}

@media (max-width: 768px) {
    .ai-tools-container, .ai-tools-container-fluid {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 15px;
    }
    
    .content-area {
        padding: 20px;
        height: auto;
    }
    
    .ai-tools-title {
        font-size: 2em;
    }
    
    .back-link {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .ai-tools-title {
        font-size: 1.8em;
    }
    
    .ai-tools-description {
        font-size: 1em;
    }
    
    .sidebar h3 {
        font-size: 1.3em;
    }
    
    #tool-info h2 {
        font-size: 24px;
    }
} 

.markdown-body h2 {
    font-size: 1.2em;
}
.markdown-body h3 {
    font-size: 1em;
}
.markdown-body h4 {
    font-size: 0.95em;
}
.markdown-body h5 {
    font-size: 0.9em;
}
.markdown-body h6 {
    font-size: 0.85em;
} 
.markdown-body table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1em;
    background: #222;
    color: #fff;
}
.markdown-body th, .markdown-body td {
    border: 1px solid #4a8cff;
    padding: 8px 14px;
}
.markdown-body th {
    background: #2a2a2a;
    font-weight: bold;
}
.markdown-body tr:nth-child(even) {
    background: #232b36;
}
.markdown-body tr:nth-child(odd) {
    background: #1a1a1a;
}