/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
    background-color: #F5F7F9;
}

a {
    text-decoration: none;
    color: #2D8CF0;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    padding-left: 20px;
}

img {
    max-width: 100%;
    height: auto;
}

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

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

/* 按钮样式 */
.btn-primary {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2D8CF0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}

.btn-primary:hover {
    background-color: #1a7de5;
    text-decoration: none;
}

.btn-secondary {
    display: inline-block;
    padding: 8px 16px;
    background-color: white;
    color: #2D8CF0;
    border: 1px solid #2D8CF0;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
}

.btn-secondary:hover {
    background-color: #f0f8ff;
    text-decoration: none;
}

.btn-block {
    display: block;
    width: 100%;
}

/* 顶部导航栏 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
}

.navbar-brand a {
    font-size: 20px;
    font-weight: bold;
    color: #2D8CF0;
}

.navbar-nav {
    display: flex;
    list-style: none;
}

.navbar-nav li {
    margin: 0 10px;
}

.navbar-nav a {
    color: #333333;
    font-size: 14px;
}

.navbar-nav a:hover {
    color: #2D8CF0;
    text-decoration: none;
}

.navbar-search {
    display: flex;
}

.navbar-search input {
    padding: 6px 12px;
    border: 1px solid #DDDDDD;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.navbar-search button {
    padding: 6px 12px;
    background-color: #2D8CF0;
    color: white;
    border: 1px solid #2D8CF0;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* 面包屑导航 */
.breadcrumb {
    background-color: #F0F8FF;
    padding: 10px 0;
    font-size: 12px;
}

.breadcrumb a {
    color: #2D8CF0;
}

/* 主要容器 */
.main-container {
    margin-top: 20px;
}

/* 侧边栏 */
.sidebar {
    flex: 0 0 250px;
    padding: 0 15px;
}

.sidebar-section {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #DDDDDD;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 10px;
}

.category-list a {
    color: #666666;
    display: block;
    padding: 5px 0;
}

.category-list a:hover, .category-list a.active {
    color: #2D8CF0;
    text-decoration: none;
}

.filter-group {
    margin-bottom: 15px;
}

.filter-group h4 {
    font-size: 14px;
    margin-bottom: 8px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    color: #666666;
}

.filter-group input {
    margin-right: 5px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 0 15px;
}

.article-content h1 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #DDDDDD;
}

.article-content h2 {
    font-size: 20px;
    margin: 30px 0 15px 0;
}

.article-content h3 {
    font-size: 18px;
    margin: 20px 0 10px 0;
}

.article-content p {
    margin-bottom: 15px;
    line-height: 1.8;
}

.article-content ul, .article-content ol {
    margin-bottom: 15px;
}

.article-content li {
    margin-bottom: 8px;
}

/* 右侧边栏 */
.sidebar-right {
    flex: 0 0 250px;
    padding: 0 15px;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 5px 0;
    border-bottom: 1px solid #EEEEEE;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list strong {
    display: inline-block;
    width: 80px;
}

.related-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #EEEEEE;
}

.related-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-item h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.related-item p {
    font-size: 12px;
    color: #666666;
    margin: 0;
}

/* 首页样式 */
.hero {
    background: linear-gradient(135deg, #2D8CF0, #19BE6B);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.hero h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    padding: 12px 24px;
    background-color: #19BE6B;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
}

/* 分类卡片 */
.categories-section {
    padding: 60px 0;
    background-color: white;
}

.categories-section h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: #F8F8F8;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #2D8CF0;
}

.category-card p {
    color: #666666;
    margin-bottom: 20px;
    min-height: 60px;
}

/* 工作流卡片 */
.featured-workflows {
    padding: 60px 0;
    background-color: #F5F7F9;
}

.featured-workflows h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.workflow-card {
    background-color: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.workflow-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.workflow-card p {
    color: #666666;
    margin-bottom: 15px;
    min-height: 60px;
}

.workflow-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 12px;
}

.category {
    background-color: #E8F4FD;
    color: #2D8CF0;
    padding: 3px 8px;
    border-radius: 4px;
}

.rating {
    color: #FF9900;
}

.latest-workflows {
    padding: 60px 0;
    background-color: white;
}

.latest-workflows h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 40px;
}

.workflow-list {
    max-width: 800px;
    margin: 0 auto;
}

.workflow-item {
    padding: 20px;
    border-bottom: 1px solid #EEEEEE;
}

.workflow-item:last-child {
    border-bottom: none;
}

.workflow-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.workflow-item p {
    color: #666666;
    margin-bottom: 15px;
}

.workflow-item .workflow-meta {
    display: flex;
    font-size: 12px;
    color: #999999;
}

.workflow-item .category {
    background-color: #E8F4FD;
    color: #2D8CF0;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 10px;
}

.workflow-item .date {
    margin-left: auto;
}

/* 工作流列表页 */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.page-header p {
    color: #666666;
}

.workflow-item .workflow-tags {
    margin-top: 10px;
}

.tag {
    display: inline-block;
    background-color: #F0F8FF;
    color: #2D8CF0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    color: #333333;
}

.pagination a.active, .pagination a:hover {
    background-color: #2D8CF0;
    color: white;
    text-decoration: none;
    border-color: #2D8CF0;
}

/* 工作流详情页 */
.code-preview {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin: 20px 0;
    overflow: hidden;
    max-height: 600px; /* 设置最大高度 */
    display: flex;
    flex-direction: column;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #F8F8F8;
    border-bottom: 1px solid #EEEEEE;
    flex-shrink: 0; /* 防止头部被压缩 */
}

.preview-header h3 {
    margin: 0;
    font-size: 16px;
}

.preview-actions {
    display: flex;
    gap: 10px;
}

.code-block {
    padding: 20px;
    margin: 0;
    background-color: #F8F8F8;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    overflow-y: auto; /* 添加垂直滚动条 */
    flex: 1; /* 让代码区域占据剩余空间 */
    max-height: 450px; /* 代码区域的最大高度 */
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.feature-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 10px;
    background-color: #F0F8FF;
    border-radius: 4px;
    text-align: center;
}

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

.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #DDDDDD;
}

.data-table th {
    background-color: #F5F7F9;
    font-weight: bold;
}

.complexity-meter {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.complexity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.complexity-item .rating {
    color: #FF9900;
    letter-spacing: 2px;
}

.faq-item {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #EEEEEE;
}

.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.faq-item h4 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #2D8CF0;
}

/* 团队成员 */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.team-member {
    text-align: center;
    background-color: white;
    border-radius: 8px;
    padding: 30px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.team-member img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.team-member h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.team-member p {
    color: #666666;
    margin-bottom: 10px;
}

/* 时间线 */
.timeline {
    position: relative;
    padding-left: 30px;
    margin: 30px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #2D8CF0;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #2D8CF0;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #2D8CF0;
}

.timeline-date {
    font-weight: bold;
    color: #2D8CF0;
    margin-bottom: 5px;
}

.timeline-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

/* 合作伙伴 */
.partners {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 30px 0;
}

.partner-logo img {
    max-height: 60px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-logo img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* 联系方式 */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.contact-item {
    text-align: center;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2D8CF0;
}

.office-address {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-container {
    text-align: center;
    margin: 30px 0;
}

.map-image {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* 联系表单 */
.contact-form {
    max-width: 600px;
    margin: 30px auto;
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #DDDDDD;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #2D8CF0;
}

/* 社交链接 */
.social-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin: 30px 0;
}

.social-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    color: #333333;
}

.social-link:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.social-link img {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

/* 页脚 */
.footer {
    background-color: #333333;
    color: white;
    padding: 50px 0 20px 0;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3, .footer-section h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-section p {
    color: #CCCCCC;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #CCCCCC;
}

.footer-section a:hover {
    color: #2D8CF0;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #555555;
    color: #999999;
    font-size: 12px;
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 10px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar .container {
        flex-wrap: wrap;
    }
    
    .navbar-nav {
        order: 3;
        width: 100%;
        margin-top: 10px;
        justify-content: center;
    }
    
    .sidebar, .sidebar-right {
        flex: 0 0 100%;
        order: 2;
        margin-top: 20px;
    }
    
    .main-content {
        order: 1;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .search-box input, .search-box button {
        width: 100%;
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    .category-grid, .workflow-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    #back-to-top {
        bottom: 15px;
        right: 15px;
    }
}

/* 工作流详情页面布局修复 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px; /* 匹配导航栏的水平padding */
    display: flex;
    gap: 2rem;
}

.row {
    display: flex;
    width: 100%; /* 确保row占满整个容器宽度 */
    margin: 0;
}

.sidebar {
    width: 280px;
    flex-shrink: 0;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
    height: fit-content;
}

.main-content {
    flex: 1; /* 让主内容区域填充所有剩余空间 */
    min-width: 0; /* 防止内容溢出 */
}

.article-content {
    background-color: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    width: 100%; /* 确保占满主内容区域 */
    box-sizing: border-box;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
        gap: 1rem;
        padding: 15px;
    }
    
    .sidebar {
        width: 100%;
        position: static;
    }
    
    .main-content {
        width: 100%;
        min-width: 0;
    }
}