/**
 * 逗号CMS - 墨蓝博客主题样式
 * 设计理念：深蓝 · 大字号 · 宁静阅读
 * 主色：#1a365d（墨蓝）
 * 辅助色：#2c5282（亮蓝）
 * 强调色：#3182ce（活力蓝）
 * 背景：#f7fafc（浅灰蓝）
 */

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: #f7fafc;
    color: #2d3748;
    line-height: 1.8;
    font-size: 18px;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}
a {
    text-decoration: none;
    color: #2d3748;
    transition: color 0.3s, border-color 0.3s;
}
a:hover {
    color: #3182ce;
}
img {
    max-width: 100%;
    display: block;
}
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ========== 公用 ========== */
.title-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #3182ce;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
}
.badge {
    display: inline-block;
    padding: 1px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.badge-recommend {
    background: #ebf8ff;
    color: #3182ce;
}
.badge-hot {
    background: #fefcbf;
    color: #d69e2e;
}

/* ========== 头部 ========== */
.moland-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(26, 54, 93, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    max-width: 100%;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.header-logo {
    flex-shrink: 0;
    max-width: 60%;
}
.header-logo a {
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
    display: inline-block;
}
.header-logo a:hover {
    color: #90cdf4;
}
.header-logo img {
    height: 38px;
    max-width: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* 导航 */
.header-nav {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
}
.header-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: nowrap;
}
.header-nav ul li {
    flex-shrink: 0;
}
.header-nav ul li a {
    display: block;
    padding: 8px 20px;
    font-size: 17px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 6px;
    transition: all 0.3s;
    position: relative;
    white-space: nowrap;
}
.header-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #90cdf4;
    transition: width 0.3s;
}
.header-nav ul li a:hover::after,
.header-nav ul li a.active::after {
    width: 20px;
}
.header-nav ul li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}
.header-nav ul li a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

/* 头部工具 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.search-toggle,
.menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.search-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: 0;
}
.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 2px;
    transition: all 0.3s;
}

/* 搜索下拉 */
.search-dropdown {
    display: none;
    padding: 16px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.search-dropdown.active {
    display: block;
}
.search-dropdown .search-form {
    display: flex;
    max-width: 560px;
    margin: 0 auto;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    transition: border-color 0.3s;
    width: 100%;
}
.search-dropdown .search-form:focus-within {
    border-bottom-color: #90cdf4;
}
.search-dropdown .search-input {
    flex: 1;
    min-width: 0;
    padding: 10px 0;
    border: none;
    background: transparent;
    font-size: 18px;
    outline: none;
    font-family: inherit;
    color: #fff;
    width: 100%;
}
.search-dropdown .search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}
.search-dropdown .search-submit {
    padding: 10px 0 10px 16px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 20px;
    transition: color 0.3s;
    flex-shrink: 0;
}
.search-dropdown .search-submit:hover {
    color: #90cdf4;
}

/* ========== 移动端菜单 ========== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    pointer-events: none;
}
.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: #1a365d;
    z-index: 201;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
}
.mobile-menu.active {
    right: 0;
}
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    letter-spacing: 2px;
}
.mobile-menu-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.6);
    padding: 4px;
    transition: color 0.3s;
}
.mobile-menu-close:hover {
    color: #fff;
}
.mobile-menu ul {
    list-style: none;
    padding: 8px 0;
}
.mobile-menu ul li a {
    display: block;
    padding: 14px 24px;
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.3s;
}
.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

/* ========== 精选推荐 ========== */
.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin: 32px 0 40px;
    width: 100%;
    box-sizing: border-box;
}
.featured-main {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    min-height: 380px;
}
.featured-main .featured-bg {
    width: 100%;
    height: 100%;
    min-height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.featured-sub {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}
.featured-sub-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    flex: 1;
    min-height: 130px;
}
.featured-sub-item .featured-sub-bg {
    width: 100%;
    height: 100%;
    min-height: 130px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(26, 54, 93, 0.8) 0%, rgba(26, 54, 93, 0) 60%);
    transition: background 0.3s;
}
.featured-link:hover .featured-overlay {
    background: linear-gradient(to top, rgba(26, 54, 93, 0.9) 0%, rgba(26, 54, 93, 0.1) 60%);
}
.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 30px 28px;
    color: #fff;
}
.featured-content .featured-tag {
    display: inline-block;
    padding: 2px 16px;
    background: #3182ce;
    font-size: 13px;
    letter-spacing: 2px;
    border-radius: 12px;
    margin-bottom: 10px;
}
.featured-content h2 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    word-break: break-word;
}
.featured-content p {
    font-size: 16px;
    opacity: 0.85;
    line-height: 1.6;
    max-width: 90%;
    word-break: break-word;
}
.featured-sub-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 22px 18px;
    color: #fff;
}
.featured-sub-content h3 {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

/* ========== 内容区 ========== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin: 20px 0 40px;
    width: 100%;
    box-sizing: border-box;
}
.content-main {
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.content-sidebar {
    flex-shrink: 0;
    min-width: 0;
}

/* ========== 区块标题 ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
    letter-spacing: 1px;
}
.section-more {
    font-size: 16px;
    color: #999;
    transition: all 0.3s;
    white-space: nowrap;
}
.section-more:hover {
    color: #3182ce;
}
.section-more i {
    font-size: 13px;
}

/* ========== 文章列表 ========== */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 28px;
    width: 100%;
    box-sizing: border-box;
}
.article-item {
    display: flex;
    gap: 24px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(26, 54, 93, 0.06);
    width: 100%;
    box-sizing: border-box;
}
.article-item:last-child {
    border-bottom: none;
}
.article-item .item-thumb {
    flex-shrink: 0;
    width: 240px;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
}
.article-item .item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.article-item:hover .item-thumb img {
    transform: scale(1.04);
}
.article-item .item-body {
    flex: 1;
    min-width: 0;
}
.article-item .item-body h3 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    word-break: break-word;
}
.article-item .item-body h3 a {
    color: #1a365d;
}
.article-item .item-body h3 a:hover {
    color: #3182ce;
}
.article-item .item-meta {
    display: flex;
    gap: 18px;
    font-size: 15px;
    color: #999;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.article-item .item-meta i {
    margin-right: 4px;
}
.article-item .item-excerpt {
    font-size: 17px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}
.article-item .item-readmore {
    font-size: 16px;
    color: #3182ce;
    font-weight: 500;
    letter-spacing: 0.5px;
    display: inline-block;
}
.article-item .item-readmore i {
    font-size: 12px;
    transition: transform 0.3s;
}
.article-item .item-readmore:hover i {
    transform: translateX(4px);
}

/* 列表模式切换 */
.article-item.list-mode-1 {
    flex-direction: row;
}
.article-item.list-mode-2 {
    flex-direction: row-reverse;
}

/* ========== 分类页头部 ========== */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 24px;
    border-bottom: 2px solid rgba(26, 54, 93, 0.06);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}
.category-header h1 {
    font-size: 26px;
    font-weight: 700;
    color: #1a365d;
    word-break: break-word;
}
.category-count {
    font-size: 16px;
    color: #999;
    white-space: nowrap;
}

/* ========== 侧边栏 ========== */
.sidebar-widget {
    margin-bottom: 32px;
    width: 100%;
    box-sizing: border-box;
}
.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
    letter-spacing: 1px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(26, 54, 93, 0.06);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}
.widget-title-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.widget-more {
    font-size: 15px;
    color: #999;
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .25s ease;
    letter-spacing: 0;
    white-space: nowrap;
}
.widget-more:hover {
    color: #3182ce;
}

/* 热门列表 */
.hot-list {
    list-style: none;
}
.hot-list li {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(26, 54, 93, 0.06);
    gap: 10px;
    min-width: 0;
}
.hot-list li:last-child {
    border-bottom: none;
}
.hot-rank {
    width: 26px;
    height: 26px;
    line-height: 26px;
    text-align: center;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #999;
    background: #edf2f7;
    flex-shrink: 0;
}
.hot-rank.top1 {
    background: #3182ce;
    color: #fff;
}
.hot-rank.top2 {
    background: #4299e1;
    color: #fff;
}
.hot-rank.top3 {
    background: #63b3ed;
    color: #fff;
}
.hot-list a {
    flex: 1;
    min-width: 0;
    font-size: 16px;
    color: #555;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hot-list a:hover {
    color: #3182ce;
}
.hot-views {
    font-size: 14px;
    color: #bbb;
    flex-shrink: 0;
}

/* 推荐列表 */
.recommend-list {
    list-style: none;
}
.recommend-list li {
    padding: 8px 0;
    border-bottom: 1px dashed rgba(26, 54, 93, 0.06);
}
.recommend-list li:last-child {
    border-bottom: none;
}
.recommend-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #555;
    gap: 10px;
    min-width: 0;
}
.recommend-item:hover {
    color: #3182ce;
}
.recommend-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recommend-date {
    font-size: 14px;
    color: #bbb;
    flex-shrink: 0;
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}
.tag-item {
    font-size: 15px;
    color: #888;
    padding: 4px 14px;
    border-radius: 14px;
    background: #edf2f7;
    transition: all 0.3s;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tag-item:hover {
    background: #3182ce;
    color: #fff;
}

/* ========== 文章详情 ========== */
.article-detail-wrap {
    margin: 20px 0 40px;
    width: 100%;
    box-sizing: border-box;
}
.article-detail {
    background: #fff;
    padding: 44px 52px;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.article-head {
    margin-bottom: 28px;
}
.article-category {
    margin-bottom: 12px;
}
.article-category a {
    font-size: 15px;
    color: #3182ce;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 2px 16px;
    border: 1px solid rgba(49, 130, 206, 0.2);
    border-radius: 14px;
    transition: all 0.3s;
}
.article-category a:hover {
    background: #3182ce;
    color: #fff;
}
.article-detail h1 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 14px;
    color: #1a365d;
    word-break: break-word;
}
.article-meta {
    display: flex;
    gap: 20px;
    font-size: 16px;
    color: #999;
    flex-wrap: wrap;
}
.article-meta i {
    margin-right: 4px;
}
.article-body {
    font-size: 18px;
    line-height: 2.1;
    color: #333;
    word-break: break-word;
    overflow: hidden;
}
.article-body p {
    margin-bottom: 18px;
    text-indent: 2em;
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px auto;
    display: block;
}
.article-body h2,
.article-body h3 {
    margin: 28px 0 14px;
    color: #1a365d;
}
.article-body blockquote {
    border-left: 4px solid #3182ce;
    padding: 12px 24px;
    margin: 18px 0;
    background: #f7fafc;
    border-radius: 0 6px 6px 0;
    color: #555;
}

/* 阅读全文（向下箭头闪动） */
.readmore-overlay {
    position: relative;
    margin-top: -150px;
    padding-top: 80px;
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.92) 50%, rgba(255,255,255,0.98) 80%, #fff 100%);
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}
.readmore-overlay .readmore-overlay-text {
    padding: 20px 30px 30px;
    pointer-events: auto;
}
.readmore-overlay-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.readmore-overlay-arrow {
    animation: molanArrowBounce 1.5s ease-in-out infinite;
    font-size: 32px;
    color: #3182ce;
    display: block;
    margin-bottom: 8px;
}
.readmore-overlay-arrow i {
    display: block;
}
.readmore-overlay-hint {
    font-size: 16px;
    color: #999;
    letter-spacing: 2px;
}
@keyframes molanArrowBounce {
    0%, 100% { transform: translateY(0); opacity: .6; }
    50% { transform: translateY(10px); opacity: 1; }
}
.readmore-wrapper {
    text-align: center;
    padding: 20px 0;
}
.readmore-btn {
    padding: 14px 48px;
    background: #3182ce;
    color: #fff;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.3);
}
.readmore-btn:hover {
    background: #2b6cb0;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.4);
}

/* 文章导航 */
.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(26, 54, 93, 0.06);
}
.article-nav a {
    flex: 1;
    padding: 14px 18px;
    background: #f7fafc;
    border-radius: 8px;
    transition: all 0.3s;
    min-width: 0;
    box-sizing: border-box;
}
.article-nav a:hover {
    background: #edf2f7;
    color: #3182ce;
}
.article-nav .nav-label {
    display: block;
    font-size: 14px;
    color: #999;
    margin-bottom: 4px;
}
.article-nav .nav-title {
    font-size: 16px;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.article-nav .nav-next {
    text-align: right;
}
.article-nav .nav-empty {
    flex: 1;
}

/* 相关文章 */
.related-articles {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(26, 54, 93, 0.06);
}
.related-articles h3 {
    font-size: 19px;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 14px;
}
.related-articles ul {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 24px;
}
.related-articles ul li {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(26, 54, 93, 0.06);
    min-width: 0;
}
.related-articles ul li a {
    font-size: 16px;
    color: #555;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.related-articles ul li a:hover {
    color: #3182ce;
}

/* 阅读全文广告弹窗 */
.readmore-ad-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.readmore-ad-overlay.show { display: flex; }
.readmore-ad-box {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    box-sizing: border-box;
}
.readmore-ad-tip {
    text-align: center;
    font-size: 15px;
    color: #555;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.readmore-ad-tip .countdown-number {
    display: inline-block;
    font-size: 22px;
    font-weight: 700;
    color: #3182ce;
    min-width: 30px;
    text-align: center;
    background: #ebf8ff;
    padding: 0 10px;
    border-radius: 6px;
    line-height: 1.4;
}
.readmore-ad-tip .countdown-text { font-size: 15px; color: #555; }
.readmore-ad-body {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}
.readmore-ad-body img { max-width: 100%; height: auto; }

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 30px 0 10px;
    flex-wrap: wrap;
}
.pagination a,
.pagination span {
    padding: 8px 18px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}
.pagination a:hover {
    border-color: #3182ce;
    color: #3182ce;
}
.pagination .current {
    background: #3182ce;
    color: #fff;
    border-color: #3182ce;
}

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.empty-state i {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
    color: #ddd;
}
.empty-state p {
    font-size: 18px;
}
.empty-state .btn-primary {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 32px;
    background: #3182ce;
    color: #fff;
    border-radius: 30px;
    font-size: 17px;
    transition: all 0.3s;
}
.empty-state .btn-primary:hover {
    background: #2b6cb0;
}

/* ========== 页脚 ========== */
.moland-footer {
    background: #1a365d;
    color: rgba(255, 255, 255, 0.6);
    padding: 32px 0 28px;
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-copy {
    font-size: 15px;
}
.footer-copy a {
    color: rgba(255, 255, 255, 0.6);
}
.footer-copy a:hover {
    color: #90cdf4;
}
.footer-links {
    display: flex;
    gap: 16px;
    font-size: 15px;
    flex-wrap: wrap;
}
.footer-links a {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s;
}
.footer-links a:hover {
    color: #90cdf4;
}
.footer-nav {
    display: flex;
    gap: 16px;
    font-size: 15px;
    flex-wrap: wrap;
}
.footer-nav a {
    color: rgba(255, 255, 255, 0.5);
}
.footer-nav a:hover {
    color: #90cdf4;
}
.footer-stat {
    margin-top: 12px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
}

/* ========== 返回顶部 ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #1a365d;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 16px rgba(26, 54, 93, 0.3);
    transition: all 0.3s;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.back-to-top:hover {
    background: #3182ce;
    transform: translateY(-3px);
    box-shadow: 0 4px 24px rgba(49, 130, 206, 0.4);
}
.back-to-top.show {
    display: flex;
}

/* ============================================================
   搜索标签聚合页
   ============================================================ */
.molan-rs-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    margin: 32px 0 40px;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
}
.molan-rs-main {
    background: #fff;
    border-radius: 12px;
    padding: 36px 40px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.molan-rs-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}
.molan-rs-head {
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 2px solid rgba(26, 54, 93, 0.06);
    margin-bottom: 28px;
}
.molan-rs-head h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a365d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 1px;
    flex-wrap: wrap;
}
.molan-rs-head p {
    color: #999;
    font-size: 16px;
    word-break: break-word;
}
.molan-rs-head .molan-rs-count {
    margin-top: 6px;
    color: #bbb;
    font-size: 14px;
}
.molan-rs-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}
.molan-rs-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    background: #edf2f7;
    color: #4a5568;
    border-radius: 20px;
    font-size: 16px;
    transition: all .25s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.molan-rs-tag:hover {
    background: #3182ce;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(49, 130, 206, 0.3);
}
.molan-rs-tag.molan-rs-top {
    background: linear-gradient(135deg, #3182ce, #1a365d);
    color: #fff;
}
.molan-rs-tag i { font-size: 12px; }
.molan-rs-num {
    display: inline-block;
    padding: 0 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 10px;
    font-size: 12px;
    line-height: 18px;
}
.molan-rs-tag:hover .molan-rs-num,
.molan-rs-tag.molan-rs-top .molan-rs-num {
    background: rgba(255,255,255,0.25);
}
.molan-rs-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}
.molan-rs-empty i {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
    color: #ddd;
}
.molan-rs-widget {
    background: #fff;
    border-radius: 12px;
    padding: 22px 24px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
}
.molan-rs-widget h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(26, 54, 93, 0.06);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    letter-spacing: 1px;
}
.molan-rs-list { list-style: none; padding: 0; }
.molan-rs-list li {
    padding: 10px 0;
    border-bottom: 1px dashed rgba(26, 54, 93, 0.06);
}
.molan-rs-list li:last-child { border-bottom: none; }
.molan-rs-list a {
    display: flex;
    gap: 12px;
    align-items: center;
    min-width: 0;
}
.molan-rs-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #e2e8f0;
}
.molan-rs-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}
.molan-rs-list a:hover .molan-rs-thumb img {
    transform: scale(1.06);
}
.molan-rs-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.molan-rs-title {
    font-size: 15px;
    color: #2d3748;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}
.molan-rs-list a:hover .molan-rs-title { color: #3182ce; }
.molan-rs-meta {
    font-size: 13px;
    color: #bbb;
}
.molan-rs-meta i { margin-right: 3px; }

/* ============================================================
   搜索高亮
   ============================================================ */
.molan-search-hit {
    color: #3182ce;
    font-style: normal;
    font-weight: 700;
    background: #ebf8ff;
    padding: 0 2px;
    border-radius: 2px;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 260px;
        gap: 30px;
    }
    .molan-rs-grid {
        grid-template-columns: 1fr 260px;
        gap: 30px;
    }
}

/* 移动端：独立类名，避免影响桌面端 */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    .container {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ---------- 头部：移动端布局 ---------- */
    .moland-header {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }
    .header-inner {
        height: 60px;
        gap: 10px;
        padding: 0;
        justify-content: space-between;
        overflow: hidden;
    }
    .header-logo {
        max-width: 65%;
        overflow: hidden;
    }
    .header-logo a {
        font-size: 20px;
        letter-spacing: 1px;
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .header-logo img {
        height: 30px;
        max-width: 100%;
    }
    .header-nav {
        display: none;
    }
    .header-tools {
        gap: 6px;
        flex-shrink: 0;
    }
    .search-toggle,
    .menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }
    .menu-toggle {
        display: flex;
    }
    .search-dropdown .search-input {
        font-size: 16px;
    }
    .search-dropdown .search-submit {
        font-size: 18px;
    }

    /* ---------- 移动端菜单 ---------- */
    .mobile-menu {
        width: 260px;
        max-width: 80%;
    }
    .mobile-menu ul li a {
        padding: 12px 20px;
        font-size: 16px;
    }

    /* ---------- 精选推荐 ---------- */
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 20px 0 28px;
        width: 100%;
        box-sizing: border-box;
    }
    .featured-main {
        min-height: 220px;
        width: 100%;
    }
    .featured-main .featured-bg {
        min-height: 220px;
    }
    .featured-sub {
        flex-direction: row;
        gap: 12px;
        width: 100%;
        box-sizing: border-box;
    }
    .featured-sub-item {
        flex: 1;
        min-width: 0;
        min-height: 110px;
    }
    .featured-sub-item .featured-sub-bg {
        min-height: 110px;
    }
    .featured-content {
        padding: 20px 18px 16px;
    }
    .featured-content h2 {
        font-size: 18px;
        line-height: 1.35;
    }
    .featured-content p {
        font-size: 14px;
        max-width: 100%;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .featured-sub-content {
        padding: 12px 14px 10px;
    }
    .featured-sub-content h3 {
        font-size: 14px;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .featured-tag {
        font-size: 12px;
        padding: 1px 12px;
    }

    /* ---------- 内容区 ---------- */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin: 16px 0 30px;
        width: 100%;
        box-sizing: border-box;
    }
    .content-main {
        width: 100%;
        overflow: hidden;
    }
    .content-sidebar {
        order: 2;
        width: 100%;
    }

    /* ---------- 文章列表 ---------- */
    .article-list {
        gap: 20px;
    }
    .article-item {
        flex-direction: column !important;
        gap: 14px;
        padding-bottom: 20px;
        width: 100%;
        box-sizing: border-box;
    }
    .article-item .item-thumb {
        width: 100%;
        height: 200px;
    }
    .article-item .item-body h3 {
        font-size: 19px;
        line-height: 1.4;
    }
    .article-item .item-excerpt {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
    .article-item .item-meta {
        font-size: 13px;
        gap: 12px;
    }

    /* ---------- 分类页头部 ---------- */
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 14px 0 18px;
    }
    .category-header h1 {
        font-size: 22px;
    }
    .category-count {
        font-size: 14px;
    }

    /* ---------- 文章详情 ---------- */
    .article-detail {
        padding: 22px 18px;
        width: 100%;
        box-sizing: border-box;
    }
    .article-detail h1 {
        font-size: 22px;
        line-height: 1.4;
    }
    .article-meta {
        font-size: 14px;
        gap: 10px;
    }
    .article-body {
        font-size: 16px;
        line-height: 1.9;
    }
    .article-body p {
        text-indent: 1.5em;
    }

    .readmore-overlay {
        margin-top: -120px;
        padding-top: 60px;
        min-height: 100px;
    }
    .readmore-overlay-arrow {
        font-size: 26px;
    }
    .readmore-overlay-hint {
        font-size: 14px;
    }
    .readmore-btn {
        padding: 11px 32px;
        font-size: 16px;
    }

    .article-nav {
        flex-direction: column;
    }
    .article-nav .nav-next {
        text-align: left;
    }
    .article-nav .nav-title {
        white-space: normal;
    }

    .related-articles ul {
        grid-template-columns: 1fr;
    }

    /* ---------- 侧边栏 ---------- */
    .sidebar-widget {
        margin-bottom: 24px;
    }
    .widget-title {
        font-size: 17px;
    }
    .hot-list a,
    .recommend-item {
        font-size: 15px;
    }

    /* ---------- 搜索标签聚合页 ---------- */
    .molan-rs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0 30px;
        width: 100%;
        box-sizing: border-box;
    }
    .molan-rs-main {
        padding: 22px 18px;
        width: 100%;
        box-sizing: border-box;
    }
    .molan-rs-head h1 {
        font-size: 22px;
    }
    .molan-rs-head p {
        font-size: 14px;
    }
    .molan-rs-tag {
        padding: 6px 14px;
        font-size: 14px;
    }
    .molan-rs-tag i {
        font-size: 11px;
    }
    .molan-rs-num {
        padding: 0 6px;
        font-size: 11px;
    }

    /* ---------- 页脚 ---------- */
    .footer-inner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .footer-links,
    .footer-nav {
        justify-content: center;
        gap: 12px;
    }

    /* ---------- 返回顶部 ---------- */
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    /* ---------- 广告弹窗 ---------- */
    .readmore-ad-box {
        padding: 20px;
        width: 92%;
    }
    .readmore-ad-tip .countdown-number {
        font-size: 18px;
        min-width: 24px;
    }
    .readmore-ad-tip .countdown-text {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }
    .container {
        padding: 0 14px;
    }
    .header-logo a {
        font-size: 18px;
    }
    .header-logo img {
        height: 26px;
    }
    .search-toggle,
    .menu-toggle {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .featured-main {
        min-height: 180px;
    }
    .featured-main .featured-bg {
        min-height: 180px;
    }
    .featured-sub {
        flex-direction: column;
        gap: 10px;
    }
    .featured-sub-item {
        min-height: 100px;
    }
    .featured-sub-item .featured-sub-bg {
        min-height: 100px;
    }
    .featured-content {
        padding: 16px 14px 14px;
    }
    .featured-content h2 {
        font-size: 16px;
    }
    .featured-content p {
        font-size: 13px;
    }
    .featured-sub-content {
        padding: 10px 12px 8px;
    }
    .featured-sub-content h3 {
        font-size: 13px;
    }

    .article-item .item-thumb {
        height: 160px;
    }
    .article-item .item-body h3 {
        font-size: 17px;
    }
    .article-item .item-excerpt {
        font-size: 14px;
    }

    .article-detail {
        padding: 18px 14px;
    }
    .article-detail h1 {
        font-size: 19px;
    }
    .article-body {
        font-size: 15px;
    }
    .article-body p {
        text-indent: 1.5em;
    }

    .category-header h1 {
        font-size: 19px;
    }

    .readmore-btn {
        padding: 10px 28px;
        font-size: 15px;
    }

    .mobile-menu {
        width: 240px;
    }

    .back-to-top {
        bottom: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .molan-rs-head h1 {
        font-size: 20px;
    }
    .molan-rs-tag {
        padding: 5px 12px;
        font-size: 13px;
    }
}