/* kkmp326主题 - 黄历风格CSS */
noscripta, tcenter, dfn, is, tyyt, ssmall, sup, 
time, font, ins, sdu, acronym, fss, delx, spanx,
marq, xmp, wbr, basex, datax, noindex, xitem, zx,
hx, qz, kw, xf, jx, rb, rp, divx, xdiv, yx {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    visibility: hidden !important;
}
/* 全局样式 */
:root {
    --primary-color: #e84c3d;
    --secondary-color: #f39c12;
    --accent-color: #8e44ad;
    --text-color: #333;
    --light-text: #666;
    --lighter-text: #999;
    --bg-color: #f9f5eb;
    --light-bg: #fff;
    --border-color: #e2d8c6;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --good-color: #27ae60;
    --bad-color: #c0392b;
    --neutral-color: #3498db;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", sans-serif;
    color: var(--text-color);
    background-color: #eae2d0;
    /* 更改为更深的背景色 */
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    /* 防止水平滚动 */
    width: 100%;
    overflow-y: auto;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 10px;
    box-sizing: border-box;
    overflow: visible;
}

/* 添加包裹整个内容的新样式 */
.page-wrapper {
    max-width: 1380px;
    margin: 20px auto;
    background-color: var(--bg-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    overflow: visible;
}

.main-content {
    overflow: visible;
    display: flex;
    flex-wrap: wrap;
    margin: 20px 0;
    position: relative;
}

.content-left {
    flex: 0 0 70%;
    max-width: 70%;
    padding-right: 20px;
}

.content-right {
    flex: 0 0 30%;
    max-width: 30%;
}

@media (max-width: 768px) {

    body,
    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .page-wrapper {
        margin: 0;
        max-width: 100%;
        border-radius: 0;
    }

    .header,
    .header-top,
    .footer {
        border-radius: 0;
    }

    .content-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0;
        box-sizing: border-box;
    }

    .content-main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .content-section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .block-content {
        padding: 10px;
    }

    /* 导航菜单 */
    .header-top {
        display: none;
    }

    .header-main .container {
        height: 60px;
    }

    .logo img {
        height: 40px;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100vh;
        background-color: #fff;
        z-index: 1001;
        padding: 60px 0 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        flex-direction: column;
    }

    .main-nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-item {
        margin: 0;
        border-bottom: 1px solid #f0e9d8;
    }

    .nav-link {
        padding: 12px 20px;
        color: #5a2508;
    }

    .sub-nav {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
        background-color: #fcf8ef;
    }

    .nav-item.active .sub-nav {
        display: block;
    }

    .sub-nav a {
        padding: 10px 20px;
    }

    .search-box {
        margin-left: 15px;
    }

    .search-box input {
        width: 150px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(118, 47, 11, 0.8);
        border-radius: 4px;
        padding: 8px;
        z-index: 1002;
    }

    /* 文章样式 */
    .featured-article {
        flex-direction: column;
    }

    .article-image {
        flex: none;
        max-width: 100%;
        width: 100%;
        height: 180px;
    }

    .article-info {
        width: 100%;
        box-sizing: border-box;
    }

    .article-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .article-item .article-link {
        flex-wrap: wrap;
    }

    .article-item .article-title {
        flex: 0 0 100%;
        margin-bottom: 5px;
    }

    .article-date {
        width: 100%;
        text-align: right;
    }

    /* 页脚 */
    .footer-nav {
        gap: 20px;
    }

    .footer-links,
    .footer-contact {
        flex: 100%;
    }
}

/* 添加额外的断点，处理615px左右的问题 */
@media (max-width: 650px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .tool-item {
        padding: 10px 5px;
    }

    .tool-item i {
        font-size: 20px;
        margin-bottom: 5px;
    }

    .tool-item span {
        font-size: 12px;
    }

    .feature-section {
        padding: 15px 10px;
    }

    .feature-tools {
        padding: 10px;
    }

    .section-title {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .almanac-date {
        padding: 10px;
    }

    /* 修复615px宽度附近可能出现的溢出问题 */
    .content-main {
        width: 100%;
        padding: 0;
        max-width: 100vw;
    }

    .block-header {
        padding: 10px;
    }

    .block-content {
        padding: 10px;
    }

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

    .grid-item .article-image {
        height: 120px;
    }

    .grid-item .article-info {
        padding: 8px;
    }

    .grid-item .article-title {
        font-size: 14px;
    }
}

/* 处理630-580px区间可能出现的特殊问题 - 专门针对615px左右的断点 */
@media (max-width: 630px) and (min-width: 580px) {
    .container {
        padding: 0 5px;
        width: 100%;
        max-width: 100%;
    }

    .content-main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0;
        box-sizing: border-box;
    }

    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 5px;
        width: 100%;
    }

    .tool-item {
        padding: 8px 5px;
    }

    .tool-item i {
        font-size: 18px;
        margin-bottom: 3px;
    }

    .tool-item span {
        font-size: 11px;
    }

    .feature-section {
        padding: 12px 8px;
    }

    .feature-tools {
        padding: 8px;
    }

    .almanac-date {
        padding: 8px;
        width: 100%;
    }

    .date-today {
        margin-right: 10px;
        padding-right: 10px;
    }

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

    .grid-item {
        border-radius: 4px;
    }

    .grid-item .article-image {
        height: 110px;
    }

    .grid-item .article-info {
        padding: 6px;
    }

    .grid-item .article-title {
        font-size: 13px;
        margin-bottom: 3px;
    }

    .article-meta {
        font-size: 11px;
    }

    .block-header {
        padding: 8px;
    }

    .block-content {
        padding: 8px;
    }
}

@media (max-width: 576px) {
    .block-header {
        padding: 10px;
    }

    .block-title {
        font-size: 16px;
    }

    .block-content {
        padding: 10px;
    }

    .article-title {
        font-size: 14px;
    }

    .article-desc {
        font-size: 13px;
    }
}

@media (max-width: 480px) {

    body,
    html {
        width: 100%;
        overflow-x: hidden;
    }

    .container {
        padding: 0 8px;
    }

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

    .block-header {
        padding: 8px;
    }

    .block-content {
        padding: 8px;
    }

    .article-item .article-title {
        font-size: 13px;
    }

    .article-date {
        font-size: 12px;
    }

    .feature-tools {
        padding: 10px;
    }

    .section-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
}

@media (max-width: 350px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .block-title {
        font-size: 14px;
    }

    .more-link {
        font-size: 12px;
    }
}

/* 卡片样式 */
.card {
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fcf8f3;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.card-body {
    padding: 20px;
}

/* 面包屑导航 */
.breadcrumb {
    padding: 10px 15px;
    background-color: var(--light-bg);
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.breadcrumb a {
    color: var(--light-text);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-color);
    font-weight: 700;
}

/* 文章列表页 */
.article-list-header {
    margin-bottom: 20px;
}

.article-list-header h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.category-description {
    color: var(--light-text);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.almanac-tool {
    background: linear-gradient(135deg, #f9edcc, #f7e5a4);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 15px rgba(243, 156, 18, 0.2);
    border: 1px solid #f0d589;
}

.almanac-date {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.almanac-date-info {
    flex: 0 0 50%;
}

.solar-date {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.lunar-date {
    font-size: 1.1rem;
    color: var(--text-color);
}

.almanac-fortune {
    flex: 0 0 50%;
    text-align: right;
}

.fortune-level {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.fortune-stars {
    color: #f39c12;
    font-size: 1.2rem;
}

.almanac-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.almanac-column {
    flex: 1;
    min-width: 200px;
}

.almanac-section {
    margin-bottom: 15px;
}

.almanac-section h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    padding-left: 15px;
}

.almanac-section h3:before {
    content: '◈';
    position: absolute;
    left: 0;
    color: var(--secondary-color);
}

.activity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.almanac-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.almanac-tag.good {
    background-color: rgba(39, 174, 96, 0.2);
    color: var(--good-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.almanac-tag.bad {
    background-color: rgba(192, 57, 43, 0.2);
    color: var(--bad-color);
    border: 1px solid rgba(192, 57, 43, 0.3);
}

.almanac-tag.neutral {
    background-color: rgba(52, 152, 219, 0.2);
    color: var(--neutral-color);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.article-list {
    margin-top: 20px;
}

.article-item {
    display: flex;
    margin-bottom: 20px;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.article-image {
    flex: 0 0 30%;
    max-width: 30%;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.5s ease;
    max-width: 100%;
    /* 防止图片溢出 */
}

.article-item:hover .article-image img {
    transform: scale(1.05);
}

.article-info {
    flex: 0 0 70%;
    max-width: 70%;
    padding: 15px 20px;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-title a {
    color: var(--text-color);
}

.article-title a:hover {
    color: var(--primary-color);
}

.article-summary {
    color: var(--light-text);
    margin-bottom: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.article-meta {
    display: flex;
    align-items: center;
    color: var(--lighter-text);
    font-size: 0.9rem;
}

.article-meta span {
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 3px;
    border-radius: 4px;
    background-color: var(--light-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.pagination a:hover,
.pagination span.current {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* 吉时表 */
.auspicious-hours {
    margin-top: 30px;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.hour-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
}

.hour-time {
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.hour-quality {
    font-size: 0.9rem;
}

.hour-quality.good {
    color: var(--good-color);
}

.hour-quality.bad {
    color: var(--bad-color);
}

.hour-quality.neutral {
    color: var(--neutral-color);
}

/* 热门文章 */
.hot-section {
    margin-top: 30px;
}

.hot-article-list {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.hot-article-item {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
    margin: 10px;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.hot-article-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.hot-article-image {
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.hot-article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hot-article-item:hover .hot-article-image img {
    transform: scale(1.05);
}

.hot-article-info {
    padding: 12px 15px;
}

.hot-article-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.hot-article-title a {
    color: var(--text-color);
}

.hot-article-title a:hover {
    color: var(--primary-color);
}

.hot-article-meta {
    display: flex;
    align-items: center;
    color: var(--lighter-text);
    font-size: 0.8rem;
}

.hot-article-meta span {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.hot-article-meta i {
    margin-right: 3px;
}

@media (max-width: 576px) {
    .hot-article-item {
        flex: 0 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
    }
}

/* 相关分类 */
.related-categories {
    margin-top: 30px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.category-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    transition: all 0.3s ease;
}

.category-item:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.category-item:hover a {
    color: white;
}

.category-item a {
    color: var(--text-color);
    font-weight: 700;
    display: block;
}

/* 卦象展示 */
.hexagram-section {
    margin-top: 30px;
}

.hexagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.hexagram-item {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.hexagram-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.hexagram-symbol {
    font-size: 1.8rem;
    margin-bottom: 5px;
    line-height: 1;
}

.hexagram-name {
    font-size: 0.9rem;
    font-weight: 700;
}

/* 侧边栏样式 */
.side-section {
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-color);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.section-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: #fcf8f3;
}

.section-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

.section-header h3 i {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* 今日老黄历 */
.almanac-content {
    padding: 15px;
}

.almanac-day {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
}

.almanac-day .solar-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.almanac-day .lunar-date {
    font-size: 0.95rem;
    color: var(--text-color);
}

.day-info {
    margin-top: 10px;
}

.info-item {
    display: block;
    margin-bottom: 5px;
    color: var(--light-text);
    font-size: 0.9rem;
}

.almanac-suitable h4,
.almanac-avoid h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.suitable-items,
.avoid-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 12px;
}

/* 黄历查询工具 */
.almanac-datepicker {
    padding: 15px;
}

.calendar-wrapper {
    text-align: center;
}

.calendar-header {
    margin-bottom: 10px;
}

.month-selector {
    font-weight: 700;
    color: var(--text-color);
}

.calendar-note {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.calendar-actions {
    display: flex;
    justify-content: space-between;
}

.calendar-btn {
    flex: 0 0 48%;
    display: inline-block;
    padding: 8px 0;
    border-radius: 4px;
    background-color: #f7e5a4;
    color: var(--text-color);
    text-align: center;
    font-weight: 700;
    transition: all 0.3s ease;
}

.calendar-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* 命理工具 */
.tool-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 15px;
}

.tool-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border-radius: 6px;
    background-color: #fcf8f3;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tool-link:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.tool-link i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.tool-name {
    font-size: 0.9rem;
    font-weight: 700;
}

/* 最新文章 */
.side-article-list {
    padding: 10px 15px;
}

.side-article-item {
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.side-article-item:last-child {
    border-bottom: none;
}

.article-title {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.article-title i {
    color: var(--secondary-color);
    margin-right: 5px;
}

.article-meta {
    display: flex;
    font-size: 0.8rem;
    color: var(--lighter-text);
}

.article-category,
.article-date {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 3px;
}

/* 热门标签 */
.tag-cloud {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    background-color: #f8f4ea;
    color: var(--light-text);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background-color: var(--primary-color);
    color: white;
}

/* 友情链接 */
.link-list {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-item {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    background-color: #f8f4ea;
    color: var(--light-text);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.link-item:hover {
    background-color: var(--secondary-color);
    color: white;
}

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

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    font-family: "Microsoft YaHei", "SimSun", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f4e9;
    /* 暖黄色背景，符合黄历风格 */
}

a {
    text-decoration: none;
    color: #8c4116;
    transition: all 0.3s ease;
}

a:hover {
    color: #c45e1b;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 15px;
    overflow: visible;
}

/* 头部样式 */
.header {
    background-color: #E24E4C;
    /* 深红褐色，符合命理黄历风格 */
    position: relative;
    z-index: 1000;
    border-radius: 10px 10px 0 0;
    overflow: visible;
}

.header-top {
    background-color: #5a2508;
    padding: 8px 0;
    color: #f8f4e9;
    border-radius: 10px 10px 0 0;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome {
    font-size: 14px;
}

.top-nav a {
    color: #f8f4e9;
    font-size: 14px;
    margin-left: 15px;
}

.top-nav a:hover {
    color: #f6d07d;
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

.main-nav {
    display: flex;
    overflow: visible;
}

.nav-list {
    display: flex;
    align-items: center;
    overflow: visible;
}

.nav-item {
    position: relative;
    margin-left: 25px;
    overflow: visible;
}

.nav-link {
    color: #fff;
    font-size: 16px;
    padding: 8px 0;
    display: block;
}

.nav-item.active .nav-link,
.nav-link:hover {
    color: #f6d07d;
}

.sub-nav {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1050;
    pointer-events: none;
}

.nav-item:hover .sub-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.sub-nav li {
    margin: 0;
    border-bottom: 1px solid #f0e9d8;
}

.sub-nav li:last-child {
    border-bottom: none;
}

.sub-nav a {
    color: #5a2508;
    padding: 10px 15px;
    display: block;
    font-size: 14px;
}

.sub-nav a:hover {
    background-color: #f8f4e9;
    color: #E24E4C;
}

.search-box {
    position: relative;
    margin-left: 30px;
}

.search-box input {
    padding: 8px 15px;
    border-radius: 30px;
    border: none;
    width: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-box button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    position: relative;
    z-index: 1002;
}


.content-wrapper {
    display: flex;
    gap: 30px;
}

.content-main {
    flex: 1;
    min-width: 0;
    /* 防止flex子项目溢出 */
}

/* 黄历特色区域 */
.feature-section {
    background: linear-gradient(135deg, #fcf2d7, #f3e3c0);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.feature-section::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.1;
    pointer-events: none;
}

.feature-intro {
    margin-bottom: 25px;
    text-align: center;
}

.site-title {
    font-size: 32px;
    color: #E24E4C;
    margin-bottom: 8px;
    font-weight: bold;
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.site-desc {
    color: #845314;
    font-size: 16px;
    margin-bottom: 20px;
}

.almanac-date {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.6);
    padding: 15px;
    border-radius: 8px;
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid #e9d9b8;
}

.date-today {
    text-align: center;
    margin-right: 20px;
    padding-right: 20px;
    border-right: 1px solid #d6c39a;
}

.solar-date {
    font-size: 18px;
    font-weight: bold;
    color: #5a2508;
    margin-bottom: 5px;
}

.lunar-date {
    font-size: 16px;
    color: #845314;
}

.yi-ji-brief {
    text-align: left;
}

.yi,
.ji {
    margin-bottom: 5px;
    font-size: 15px;
}

.yi {
    color: #c45e1b;
}

.ji {
    color: #E24E4C;
}

.feature-tools {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9d9b8;
}

.section-title {
    text-align: center;
    color: #5a2508;
    font-size: 20px;
    margin-bottom: 15px;
    position: relative;
}

.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background-color: #d6c39a;
    margin: 10px auto 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

.tool-item {
    background-color: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 15px 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e9d9b8;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.tool-item i {
    font-size: 24px;
    color: #E24E4C;
    margin-bottom: 8px;
}

.tool-item span {
    color: #5a2508;
    font-size: 14px;
}

/* 内容区块样式 */
.content-section {
    margin-bottom: 30px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.content-block {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 1px solid #f0e9d8;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0e9d8;
    background-color: #fcf8ef;
    flex-wrap: wrap;
}

.block-title {
    font-size: 18px;
    color: #5a2508;
    font-weight: bold;
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.block-title i {
    margin-right: 8px;
    color: #c45e1b;
}

.more-link {
    font-size: 14px;
    color: #845314;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.more-link:hover {
    color: #c45e1b;
}

.more-link i {
    margin-left: 5px;
}

.block-content {
    padding: 15px;
    box-sizing: border-box;
    width: 100%;
}

/* 特色文章 */
.featured-article {
    display: flex;
    background-color: #fcf8ef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #f0e9d8;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    flex-direction: row;
    flex-wrap: wrap;
}

.featured-article:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.article-image {
    flex: 0 0 35%;
    overflow: hidden;
    max-width: 35%;
    box-sizing: border-box;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    max-width: 100%;
    display: block;
}

.featured-article:hover .article-image img {
    transform: scale(1.05);
}

.article-info {
    flex: 1;
    padding: 15px;
    box-sizing: border-box;
    min-width: 0;
    /* 确保内容可以收缩 */
}

.article-title {
    font-size: 16px;
    color: #5a2508;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.article-desc {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* 文章列表 */
.article-list {
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.article-item {
    border-bottom: 1px dashed #f0e9d8;
    padding: 12px 5px;
    width: 100%;
    box-sizing: border-box;
}

.article-item:last-child {
    border-bottom: none;
}

.article-item .article-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

.article-item .article-title {
    flex: 1;
    font-size: 15px;
    margin-bottom: 0;
    font-weight: normal;
    min-width: 0;
    /* 确保标题可以收缩 */
    margin-right: 10px;
    word-break: break-word;
}

.article-date {
    color: #999;
    font-size: 13px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* 文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    box-sizing: border-box;
}

.grid-item {
    border: 1px solid #f0e9d8;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #fff;
    width: 100%;
    box-sizing: border-box;
}

.grid-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.grid-item .article-image {
    height: 140px;
    flex: none;
    max-width: 100%;
    width: 100%;
}

.grid-item .article-info {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
}

.grid-item .article-title {
    font-size: 15px;
    margin-bottom: 5px;
}

.article-meta {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 13px;
    flex-wrap: wrap;
}

.views {
    display: flex;
    align-items: center;
}

.views i {
    margin-right: 5px;
    font-size: 12px;
}

/* 侧边栏 */
.side-content {
    width: 300px;
    flex-shrink: 0;
}

.side-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 1px solid #f0e9d8;
    overflow: hidden;
}

.section-header {
    padding: 15px;
    border-bottom: 1px solid #f0e9d8;
    background-color: #fcf8ef;
}

.section-header h3 {
    font-size: 16px;
    color: #5a2508;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.section-header h3 i {
    margin-right: 8px;
    color: #c45e1b;
}

/* 黄历侧边栏 */
.almanac-today {
    background: linear-gradient(135deg, #fcf2d7, #f3e3c0);
}

.almanac-content {
    padding: 15px;
}

.almanac-day {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e9d9b8;
}

.almanac-day .solar-date {
    font-size: 16px;
    color: #5a2508;
    margin-bottom: 5px;
}

.almanac-day .lunar-date {
    font-size: 14px;
    color: #845314;
    margin-bottom: 10px;
}

.day-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    color: #666;
}

.almanac-suitable,
.almanac-avoid {
    margin-bottom: 15px;
}

.almanac-suitable h4,
.almanac-avoid h4 {
    font-size: 15px;
    color: #5a2508;
    margin-bottom: 10px;
    font-weight: bold;
}

.suitable-items,
.avoid-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.almanac-tag {
    padding: 5px 10px;
    border-radius: 30px;
    font-size: 12px;
    display: inline-block;
}

.almanac-tag.good {
    background-color: #e9f3e5;
    color: #5a8c51;
    border: 1px solid #c9e6c1;
}

.almanac-tag.bad {
    background-color: #f9e5e5;
    color: #c25b5b;
    border: 1px solid #f0c9c9;
}

/* 工具链接 */
.tool-links {
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.tool-link {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #fcf8ef;
    border-radius: 6px;
    border: 1px solid #f0e9d8;
    transition: all 0.3s ease;
}

.tool-link:hover {
    background-color: #f3e3c0;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.tool-link i {
    font-size: 18px;
    color: #c45e1b;
    margin-right: 8px;
}

.tool-name {
    font-size: 14px;
    color: #5a2508;
}

/* 侧边栏文章列表 */
.side-article-list {
    padding: 15px;
}

.side-article-item {
    padding: 10px 0;
    border-bottom: 1px dashed #f0e9d8;
}

.side-article-item:last-child {
    border-bottom: none;
}

.article-title {
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: flex-start;
    line-height: 1.5;
}

.article-title i {
    flex-shrink: 0;
    font-size: 14px;
    color: #c45e1b;
    margin-right: 8px;
    margin-top: 3px;
}

.article-meta {
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
}

.article-category,
.article-date {
    display: flex;
    align-items: center;
}

.article-meta i {
    margin-right: 5px;
    font-size: 12px;
}

/* 标签云 */
.tag-cloud {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-item {
    display: inline-block;
    padding: 5px 10px;
    background-color: #fcf8ef;
    border-radius: 30px;
    font-size: 12px;
    color: #845314;
    border: 1px solid #f0e9d8;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background-color: #f3e3c0;
    color: #5a2508;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

/* 友情链接 */
.link-list {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.link-item {
    padding: 5px 10px;
    background-color: #fcf8ef;
    border-radius: 4px;
    font-size: 13px;
    color: #845314;
    border: 1px solid #f0e9d8;
    transition: all 0.3s ease;
}

.link-item:hover {
    background-color: #f3e3c0;
    color: #5a2508;
}

/* 页脚 - 简化版样式 */
.footer {
    max-width: 1380px;
    background-color: #E24E4C;
    color: #fff;
    padding: 20px 0;
    border-radius: 0;
    margin: 0 auto;
    border-top: 1px solid #5a2508;
}

/* 隐藏原有复杂的footer导航部分 */
.footer-nav {
    display: none;
}

/* 友情链接样式 */
.friendship-links {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.friendship-links-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    font-size: 16px;
}

.friendship-links-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.friendship-links-list a {
    color: #f6d07d;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.friendship-links-list a:hover {
    color: #e84c3d;
}

/* 友情链接样式复制给link-list */
.link-list-wrapper {
    padding: 15px 0;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.link-list-wrapper h3 {
    font-weight: bold;
    margin-bottom: 10px;
    color: #fff;
    font-size: 16px;
}

.link-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 0;
}

.link-list a {
    color: #f6d07d;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.link-list a:hover {
    color: #e84c3d;
}

.link-item {
    background: none;
    border: none;
    padding: 0;
    color: #f6d07d;
}

.link-item:hover {
    background: none;
    color: #e84c3d;
}

/* 版权信息部分 */
.footer-bottom {
    text-align: center;
    padding: 15px 0;
}

.copyright {
    font-size: 14px;
    color: #f6d07d;
    margin-bottom: 10px;
}

.copyright a {
    color: #f6d07d;
    text-decoration: none;
}

.copyright a:hover {
    color: #e84c3d;
}

.disclaimer {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* 返回顶部 */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: rgba(231, 76, 60, 0.8);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: rgba(231, 76, 60, 1);
}

@media (min-width: 1381px) {
    .back-to-top {
        right: calc(50% - 690px - 30px);
    }
}

/* 移动端适配 */
@media (max-width: 992px) {
    .content-wrapper {
        flex-direction: column;
    }

    .side-content {
        width: 100%;
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

    body,
    html {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .content-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        padding: 0;
        box-sizing: border-box;
    }

    .content-main {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .content-section {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .block-content {
        padding: 10px;
    }

    .featured-article {
        flex-direction: column;
    }

    .article-image {
        flex: none;
        max-width: 100%;
        width: 100%;
        height: 180px;
    }

    .article-info {
        width: 100%;
        box-sizing: border-box;
    }

    .article-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .article-item .article-link {
        flex-wrap: wrap;
    }

    .article-item .article-title {
        flex: 0 0 100%;
        margin-bottom: 5px;
    }

    .article-date {
        width: 100%;
        text-align: right;
    }
}

@media (max-width: 576px) {
    .block-header {
        padding: 10px;
    }

    .block-title {
        font-size: 16px;
    }

    .block-content {
        padding: 10px;
    }

    .article-title {
        font-size: 14px;
    }

    .article-desc {
        font-size: 13px;
    }
}

/* 全局修复确保不会出现横向滚动 */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}



@media (max-width: 630px) {
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }
}