/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-name h1 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

/* 导航菜单 */
.menu {
    position: relative;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-icon {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-list {
    display: flex;
    list-style: none;
}

.menu-list li {
    margin-left: 2rem;
}

.menu-list a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.menu-list a:hover, .menu-list a.active {
    color: #007bff;
}

/* 主要内容 */
.main {
    padding: 2rem 0;
}

/* 站点地图样式 */
.sitemap {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 2rem;
}

.sitemap h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.sitemap p {
    margin-bottom: 1.5rem;
    color: #666;
}

.sitemap-list {
    list-style: none;
}

.sitemap-list li {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.sitemap-list li:hover {
    background-color: #f8f9fa;
}

.sitemap-list li:last-child {
    border-bottom: none;
}

.sitemap-list a {
    display: block;
    font-size: 1.1rem;
    font-weight: 500;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 0.5rem;
}

.sitemap-list a:hover {
    text-decoration: underline;
}

.sitemap-list p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

/* 首页英雄区 */
.hero {
    text-align: center;
    padding: 4rem 0;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #007bff;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #0069d9;
}

/* 功能特性 */
.features {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    padding: 3rem 0;
}

.features h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #333;
}

.feature-item p {
    color: #666;
}

/* 编辑器样式 */
.editor-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}

.editor-toolbar {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.toolbar-btn {
    padding: 0.5rem 1rem;
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.toolbar-btn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.editor-content {
    display: flex;
    height: 600px;
}

.editor-left, .editor-right {
    flex: 1;
    padding: 1rem;
    overflow: auto;
}

.editor-left {
    border-right: 1px solid #e9ecef;
}

#markdownEditor {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 1rem;
    line-height: 1.5;
    resize: none;
}

#markdownPreview {
    height: 100%;
    overflow: auto;
    padding: 1rem;
    border: none;
}

#markdownPreview h1, #markdownPreview h2, #markdownPreview h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

#markdownPreview p {
    margin-bottom: 1rem;
}

#markdownPreview strong {
    font-weight: 600;
}

#markdownPreview em {
    font-style: italic;
}

#markdownPreview ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

#markdownPreview li {
    margin-bottom: 0.5rem;
}

#markdownPreview a {
    color: #007bff;
    text-decoration: none;
}

#markdownPreview a:hover {
    text-decoration: underline;
}

#markdownPreview code {
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9rem;
}

#markdownPreview img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

/* 页脚样式 */
.footer {
    background-color: #333;
    color: #ffffff;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #007bff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .menu-list {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: #ffffff;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        flex-direction: column;
        width: 200px;
        padding: 1rem;
        border-radius: 0 0 8px 8px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .menu-list.active {
        opacity: 1;
        visibility: visible;
    }
    
    .menu-list li {
        margin-left: 0;
        margin-bottom: 1rem;
    }
    
    .menu-list li:last-child {
        margin-bottom: 0;
    }
    
    .hero h2 {
        font-size: 2rem;
    }
    
    .editor-content {
        flex-direction: column;
        height: auto;
    }
    
    .editor-left, .editor-right {
        height: 400px;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .editor-right {
        border-bottom: none;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .features h3 {
        font-size: 1.5rem;
    }
    
    .editor-left, .editor-right {
        height: 300px;
    }
}