* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

header h1 {
    color: #1a1a1a;
    font-size: 24px;
    margin-bottom: 16px;
}

.tabs {
    display: flex;
    gap: 8px;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #e0e0e0;
}

.tab-btn.active {
    background: #2563eb;
    color: white;
}

main {
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 搜索模块样式 */
.search-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

#search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
}

#search-input:focus {
    outline: none;
    border-color: #2563eb;
}

.search-options {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.search-options label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    cursor: pointer;
}

.filter-bar {
    margin-bottom: 16px;
}

.filter-bar select {
    padding: 10px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.results-list {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 200px;
}

.result-item {
    padding: 16px;
    border-left: 4px solid #2563eb;
    margin-bottom: 12px;
    background: #fafafa;
    border-radius: 0 8px 8px 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.result-item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.result-item.exact-match {
    border-left-color: #dc2626;
}

.result-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.result-meta {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.result-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* 博客模块样式 */
.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.blog-header h2 {
    font-size: 20px;
    color: #1a1a1a;
}

.blog-filters select {
    padding: 8px 14px;
    border: 2px solid #e5e5e5;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

.blog-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    flex: 1;
}

.blog-card-category {
    padding: 4px 10px;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 20px;
    font-size: 12px;
    margin-left: 12px;
}

.blog-card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #999;
}

.blog-card-tags {
    display: flex;
    gap: 8px;
}

.tag {
    padding: 2px 8px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
}

/* 博客文章详情模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    padding: 32px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e0e0e0;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 16px;
    padding-right: 40px;
}

.modal-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.modal-body {
    font-size: 15px;
    line-height: 1.8;
    color: #333;
}

.modal-body p {
    margin-bottom: 16px;
}

.modal-body h2 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 20px;
}

.modal-body code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.modal-body pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 16px 0;
}

/* Footer */
footer {
    text-align: center;
    padding: 32px 20px;
    margin-top: 20px;
}

.footer-quote {
    font-style: italic;
    color: #666;
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 13px;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .container {
        padding: 12px;
    }

    header {
        padding: 16px;
    }

    header h1 {
        font-size: 20px;
    }

    .tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        flex: 1;
        min-width: 120px;
    }

    .blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-title {
        font-size: 20px;
    }
}
