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

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

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: #fff;
    padding: 60px 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.slogan {
    font-size: 2.5rem;
    font-weight: 300;
    color: #2c3e50;
}

main {
    padding: 40px 0;
}

h2 {
    margin-bottom: 30px;
    color: #2c3e50;
}

/* 搜索功能样式 */
.search-section {
    margin-bottom: 40px;
}

.search-container {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-button, .clear-button {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-button {
    background-color: #3498db;
    color: white;
}

.search-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.clear-button {
    background-color: #95a5a6;
    color: white;
}

.clear-button:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

.no-results {
    text-align: center;
    color: #7f8c8d;
    font-size: 1.2rem;
    margin: 40px 0;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #e0e0e0;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.article-item {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.article-title {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 10px;
    text-decoration: none;
    display: block;
}

.article-date {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.article-summary {
    color: #555;
    line-height: 1.8;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* 文章页面样式 */
.article-page {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.article-content h1,
.article-content h2,
.article-content h3 {
    margin: 30px 0 15px;
    color: #2c3e50;
}

.article-content p {
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #3498db;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #3498db;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-link:hover {
    background-color: #3498db;
    color: #fff;
}

@media (max-width: 768px) {
    .slogan {
        font-size: 2rem;
    }
    
    header {
        padding: 40px 0;
    }
    
    .article-page {
        padding: 20px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        min-width: unset;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .search-button, .clear-button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .search-button:last-child, .clear-button:last-child {
        margin-bottom: 0;
    }
}