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

body {
    font-family: 'Roboto', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    font-size: 32px;
    color: #e94560;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* 搜索框样式 */
.search-container {
    position: relative;
    width: 400px;
}

.search-container input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s;
    padding-right: 50px;
}

.search-container input:focus {
    outline: none;
    border-color: #e94560;
    box-shadow: 0 0 10px rgba(233, 69, 96, 0.2);
}

.search-container button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #e94560;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-container button:hover {
    background: #d43a55;
}

/* 主要内容区域 */
.main-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* 文章列表样式 */
.articles-list {
    display: grid;
    gap: 20px;
}

.article-item {
    padding: 20px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left-color: #e94560;
}

.article-item h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.article-item h2 a:hover {
    color: #e94560;
}

.meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #777;
}

.meta i {
    margin-right: 5px;
    color: #e94560;
}

/* 文章详情页样式 */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
}

.article-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #333;
    line-height: 1.3;
}

.article-content {
    margin-top: 30px;
    line-height: 1.8;
}

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

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-content table, 
.article-content th, 
.article-content td {
    border: 1px solid #ddd;
}

.article-content th, 
.article-content td {
    padding: 12px 15px;
    text-align: left;
}

.article-content th {
    background-color: #f5f7fa;
}

.back-to-list {
    margin-top: 40px;
    text-align: center;
}

.back-to-list a {
    display: inline-block;
    padding: 10px 20px;
    background: #e94560;
    color: white;
    border-radius: 5px;
    transition: all 0.3s;
}

.back-to-list a:hover {
    background: #d43a55;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    display: inline-block;
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f5f5f5;
    color: #e94560;
    border-color: #e94560;
}

/* 搜索页面样式 */
.search-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-results-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: #333;
}

.search-term {
    color: #e94560;
    font-weight: bold;
}

.results-count {
    color: #777;
    font-size: 14px;
}

.no-results {
    text-align: center;
    padding: 50px 20px;
}

.no-results i {
    font-size: 50px;
    color: #e94560;
    margin-bottom: 20px;
}

.no-results p {
    font-size: 18px;
    margin-bottom: 20px;
}

.no-results .btn {
    display: inline-block;
    padding: 10px 20px;
    background: #e94560;
    color: white;
    border-radius: 5px;
    transition: all 0.3s;
}

.no-results .btn:hover {
    background: #d43a55;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.3);
}

/* 公告模态框样式 */
.announcement-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.announcement-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    padding: 30px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    color: #777;
    cursor: pointer;
    transition: all 0.3s;
}

.close-btn:hover {
    color: #e94560;
    transform: rotate(90deg);
}

.announcement-text {
    font-size: 16px;
    line-height: 1.8;
    max-height: 60vh;
    overflow-y: auto;
    padding: 10px;
}

/* 右下角公告按钮 */
.announcement-toggle {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 50px;
    height: 50px;
    background: #e94560;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4);
    transition: all 0.3s;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.announcement-toggle:hover {
    background: #d43a55;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(233, 69, 96, 0.6);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 20px;
    }
    
    .search-container {
        width: 100%;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    .meta {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .article-title {
        font-size: 22px;
    }
}