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

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

/* 主容器 - 三栏布局 */
.container {
    display: grid;
    grid-template-columns: 20% 50% 30%;
    min-height: 100vh;
    gap: 0;
}

/* 左侧导航栏 */
.sidebar {
    background-color: #f8f9fa;
    padding: 20px;
    border-right: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.nav-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.nav-header h3 {
    color: #007bff;
    font-size: 1.2rem;
    font-weight: 600;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 10px;
}

.nav-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #007bff;
    color: white;
    transform: translateX(5px);
}

.nav-link.active {
    background-color: #007bff;
    color: white;
}

/* 中间内容区域 */
.main-content {
    background-color: white;
    padding: 40px;
    overflow-y: auto;
    max-height: 100vh;
}

.content-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid #007bff;
}

.content-header h1 {
    color: #007bff;
    font-size: 2.2rem;
    margin-bottom: 15px;
    line-height: 1.3;
}

.article-meta {
    display: flex;
    gap: 20px;
    color: #6c757d;
    font-size: 0.9rem;
}

.section {
    margin-bottom: 40px;
}

.section h2 {
    color: #007bff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.section p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #495057;
}

.solution-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.solution-item {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.solution-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.solution-item h3 {
    color: #007bff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.solution-item p {
    color: #6c757d;
    margin: 0;
    font-size: 1rem;
}

.tech-list {
    list-style: none;
    padding-left: 0;
}

.tech-list li {
    padding: 12px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.1rem;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.tech-list li:before {
    content: "▶";
    color: #007bff;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* 右侧嵌入区域 */
.embed-section {
    background-color: white;
    border-left: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.embed-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.embed-header h3 {
    color: #007bff;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.embed-content {
    flex: 1;
    padding: 20px;
    overflow: hidden;
}

.embed-content iframe {
    width: 100%;
    height: 100%;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 25% 45% 30%;
    }
}

@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .sidebar {
        position: relative;
        height: auto;
        order: 1;
    }
    
    .main-content {
        order: 2;
        max-height: none;
    }
    
    .embed-section {
        order: 3;
        height: 500px;
    }
    
    .nav-menu {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .nav-item {
        flex: 1;
        min-width: 120px;
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 20px;
    }
    
    .content-header h1 {
        font-size: 1.8rem;
    }
    
    .section h2 {
        font-size: 1.3rem;
    }
    
    .embed-section {
        height: 400px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 15px;
    }
    
    .content-header h1 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .solution-item {
        padding: 15px;
    }
    
    .embed-section {
        height: 350px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    animation: fadeInUp 0.6s ease-out;
}

.section:nth-child(2) {
    animation-delay: 0.1s;
}

.section:nth-child(3) {
    animation-delay: 0.2s;
}

.section:nth-child(4) {
    animation-delay: 0.3s;
}

.section:nth-child(5) {
    animation-delay: 0.4s;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}