/* ==========================================================================
   abc_theme.css
   全站唯一定制样式包，替代原来的 abc_header.css / abc_index.css /
   abc_list.css / abc_show.css（四个文件大量重复，且导航样式三份不一致）。
   tw.css 是 Tailwind 编译产物，请勿手改，只在这里补定制样式。
   加载顺序：tw.css → font-awesome.min.css → abc_theme.css
   最后更新：2026-12-04
   ========================================================================== */

/* ---------- 1. 基础 ---------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
    font-size: 0.96rem;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ---------- 2. 页头与导航 ---------- */
/* 导航栏底色固定为米黄，JS 只负责加阴影，不再切换背景色 */
#main-header.scroll-bg {
    background-color: rgba(253, 230, 138, 0.95) !important;
}

/* 滚动后加阴影（JS 只切这个类，不再切背景色） */
#main-header.is-scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.menu-container {
    position: relative;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.menu-items {
    display: flex;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: calc(100% - 60px); /* 给“更多”按钮留位置 */
}

.menu-items a {
    white-space: nowrap;
    margin-right: 20px;
    text-decoration: none;
    color: #333;
}

.more-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 0 10px;
    display: none; /* 由 JS 控制显隐 */
}

.expanded-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FCF0C1;
    border: 1px solid #FCEAA2;
    padding: 10px;
    min-width: 150px;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.expanded-menu a {
    display: block;
    margin-bottom: 8px;
    text-decoration: none;
    color: #333;
}

.expanded-menu a:last-child {
    margin-bottom: 0;
}

/* 头条竖排标签：Tailwind v3 没有 writing-mode 工具类，只能手写 */
.writing-vertical-rl {
    writing-mode: vertical-rl;
    text-orientation: upright;
    letter-spacing: 0.15em;
}

/* ---------- 3. 面包屑 ---------- */
.breadcrumb-bar {
    background-color: #FDE790;
    border-top: 2px solid #6997fa;   /* 顶部那条线，改绿色就换这个色值 */
}
.breadcrumb-bar a {
    color: #374151;
    text-decoration: none;
    transition: color .2s;
}
.breadcrumb-bar a:hover {
    color: #ef4444;
}
.breadcrumb-bar .fa-angle-right {
    color: #9ca3af;
    font-size: .75rem;
}
.breadcrumb-bar .fa-home {
    margin-right: .25rem;
}

/* ---------- 4. 广告位 ---------- */
.ad-span img {
    width: 100%;
    height: auto;
    max-height: 200px;
    min-height: 35px;
    object-fit: fill !important;
}

/* ---------- 5. 列表与分页 ---------- */
#page {
    margin: 30px 0;
    min-height: 25px;
    font-size: 13px;
    line-height: 25px;
    text-align: center;
}

#page .pageinfo {
    color: #666;
    padding: 6px 8px;
    border: 1px solid #ddd;
}

#page .pageinfo strong {
    font-weight: normal;
}

#page a {
    border: 1px solid #ddd;
    background: #fff;
    color: #808080;
    padding: 6px 11px;
    margin-left: 5px;
    border-radius: 2px;
    transition: all 0.2s;
    white-space: nowrap;
}

#page a:hover,
#page .curpage {
    background: #2196f3;
    color: #fff;
    text-decoration: none;
    border: 1px solid #2196f3;
}

#page .nopage {
    cursor: not-allowed;
}

#page .nopage:hover {
    background: #fff;
    color: #808080;
    border: 1px solid #ddd;
}

/* 卡片圆角统一 */
article {
    border-radius: 1rem;
}

article > div:first-child {
    border-radius: inherit;
}

article > div:first-child img {
    border-radius: inherit;
}

/* ---------- 6. 文章详情 ---------- */
.prose {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.8;
}

.prose h2 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.prose h3 {
    font-size: clamp(1.1rem, 1.75vw, 1.5rem);
}

.prose img {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 0.3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-navigation {
    background-color: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-navigation p {
    margin: 0.75rem 0;
    display: flex;
    align-items: center;
}

.article-navigation a {
    color: #374151;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
    display: inline-block;
    max-width: calc(100% - 5rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-navigation a:hover {
    color: #165DFF;
}

.article-navigation p:first-child a:before {
    content: "← ";
    color: #9CA3AF;
}

.showimg a img {
    width: 100%;
    height: 100%;
}

.comment-form {
    transition: all 0.3s ease;
}

.comment-form:focus-within {
    transform: translateY(-5px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
}

#map {
    height: 300px;
}

/* ---------- 7. 侧栏与标签云 ---------- */
@media (max-width: 1023px) {
    .aside {
        display: none !important;
    }
}

.aside {
    min-width: 232px;
}

.tag-cloud-container {
    height: 230px;
    overflow: hidden;
}

.tag-cloud-content {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    line-height: 25px;
}

.tag-cloud-content a {
    height: 25px;
    line-height: 25px;
    padding: 0 12px;
    margin-bottom: 0;
    white-space: nowrap;
}

/* ---------- 8. 工具类 ---------- */
.content-auto {
    content-visibility: auto;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.transition-custom {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.wechat-font-scale {
    font-size: 1.2rem !important;
}

.yincang_1 {
    display: block;
}

@media (max-width: 1500px) {
    .yincang_1 {
        display: none !important;
    }
}

/* ---------- 9. 移动端适配 ---------- */
@media (max-width: 760px) {
    .px-mobile {
        padding-left: 0.01rem;
        padding-right: 0.01rem;
    }
}

@media screen and (max-width: 767px) {
    .img_yd {
        border-radius: 8px !important;
        margin-top: 18px !important;
        margin-left: 9px !important;
        margin-right: 9px !important;
        max-width: calc(100% - 18px) !important;
    }
}

@media screen and (min-width: 768px) {
    .img_yd {
        border-radius: initial !important;
        margin-top: initial !important;
        margin-left: initial !important;
        margin-right: initial !important;
        max-width: initial !important;
    }
}

/* 跑马灯（历史模板可能仍在用，保留） */
.marquee-container {
    width: 100%;
    overflow: hidden;
    background-color: #3B82F6;
    padding: 2px 0;
}

.marquee-text {
    white-space: nowrap;
    color: #fff;
    font-size: 16px;
    animation: scroll-right-to-left 55s linear infinite;
}

@keyframes scroll-right-to-left {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-150%); }
}

#mobile-search-button i,
#mobile-menu-button i,
#main-header .fa-user-circle {
  font-size: 1.2rem;
}
