/* 通用样式 */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    margin: 0;
    padding: 0;
}

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

/* 头部样式 */
.site-header {
    background-color: #337ab7;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#logo {
    text-align: center;
}

#logo img {
    max-width: 200px;
}

/* 主内容样式 */
.main-content {
    padding: 20px 0;
}

/* 卡片样式 */
.card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

/* 标题样式 */
.section-title {
    text-align: center;
    font-size: 22px;
    color: #333;
    margin-top: 20px;
    margin-bottom: 25px;
    font-weight: 500;
    padding-bottom: 15px;
    border-bottom: 2px solid #1E9FFF;
}

/* 网格布局 */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* 按钮样式 */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #1E9FFF;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0088cc;
}

/* 链接样式 */
a {
    color: #337ab7;
    text-decoration: none;
}

a:hover {
    color: #23527c;
    text-decoration: underline;
}

/* 列表样式 */
ul {
    list-style: none;
    padding: 0;
}

li {
    margin-bottom: 10px;
}

/* 页脚样式 */
.site-footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    margin-top: 40px;
}

.footer-copyright {
    text-align: center;
}

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

.footer-item a {
    color: #1E9FFF;
}

/* 日期查询工具样式 */
.date-query-tool {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 20px auto;
    max-width: 800px;
    width: calc(100% - 40px);
}

.date-query-tool h3 {
    text-align: center;
    font-size: 18px;
    color: #333;
    margin-bottom: 20px;
}

.query-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.query-select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.query-btn {
    padding: 8px 16px;
    background-color: #1E9FFF;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.query-btn:hover {
    background-color: #0088cc;
}

/* 查询历史样式 */
.query-history {
    margin-top: 20px;
    padding: 0 20px;
}

.query-history h4 {
    text-align: center;
    margin-bottom: 15px;
    color: #333;
    font-size: 16px;
}

.query-history ul {
    max-height: 200px;
    overflow-y: auto;
    max-width: 600px;
    margin: 0 auto;
}

.query-history li {
    margin: 8px 0;
    padding: 10px 15px;
    background-color: #f9f9f9;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.query-history li:hover {
    background-color: #f0f0f0;
}

/* 精选文章样式 */
.article-card {
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
}

.article-card h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 500;
}

.article-card p {
    color: #666;
    line-height: 1.6;
    margin: 0 0 8px 0;
    font-size: 13px;
}

.article-card .article-date {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* 友情链接样式 */
.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: flex-start;
}

.link-item {
    padding: 8px 16px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
    color: #333;
    text-decoration: none;
    font-size: 14px;
}

.link-item:hover {
    background: #f0f0f0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .query-form {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }
    
    .query-select {
        width: auto;
        min-width: 80px;
    }
    
    .query-btn {
        width: auto;
    }
    
    .date-query-tool {
        margin: 20px auto;
        max-width: calc(100% - 40px);
    }
    
    .container {
        padding: 0 20px;
    }
    
    /* 移动端文章列表布局改为垂直 */
@media (max-width: 768px) {
    .article-item-flex {
        flex-direction: column;
        gap: 10px;
    }
    
    .article-item-flex .article-item-pic {
        flex: none;
        width: 100%;
    }
    
    .article-item-flex .article-item-pic img {
        height: 180px !important;
    }
}

/* 吉日小卡片悬浮效果 */
.day-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(30, 159, 255, 0.15) !important;
}

/* 解梦小卡片悬浮效果 */
.dream-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.15) !important;
}

/* 分页样式 */
.pagination {
    text-align: center;
    padding: 20px 0;
}

.pagination b,
.pagination a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.pagination b {
    background: linear-gradient(135deg, #1E9FFF 0%, #009688 100%);
    color: #fff;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(30, 159, 255, 0.3);
}

.pagination a {
    background-color: #f5f7fa;
    color: #333;
    border: 1px solid #e8e8e8;
}

.pagination a:hover {
    background-color: #1E9FFF;
    color: #fff;
    border-color: #1E9FFF;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 159, 255, 0.2);
}

.pagination .nextpage {
    padding: 8px 12px;
}

/* 解梦分类紫色分页 */
.pagination-purple b {
    background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%) !important;
    box-shadow: 0 2px 8px rgba(147, 51, 234, 0.3) !important;
}

.pagination-purple a:hover {
    background-color: #9333ea !important;
    border-color: #9333ea !important;
    box-shadow: 0 4px 12px rgba(147, 51, 234, 0.2) !important;
}