@layer utilities {
    .content-auto {
        content-visibility: auto;
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .transition-custom {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* 全局样式 */
body {
    font-family: 'Inter', system-ui, sans-serif;
}

/* 滚动行为 */
html {
    scroll-behavior: smooth;
}

/* 骨架屏动画 */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 动态菜单 */
.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: #0066cc;
    padding: 0 10px;
    display: none; /* 默认隐藏，通过JS控制显示 */
}

.expanded-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    border: 1px solid #ddd;
    padding: 10px;
    min-width: 150px;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.expanded-menu a {
    display: block;
    margin-bottom: 8px;
    text-decoration: none;
    color: #333;
}

/* 定义标签项的基本样式（统一保留在此文件，abc_show.css中已删除重复） */
.tag-item {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background-color: #e2e8f0;
    color: #1e293b;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

/* 标签项悬停时的样式 */
.tag-item:hover {
    background-color: #cbd5e1;
}

/* 响应式调整 */
@media (max-width: 640px) {
    .tag-item {
        font-size: 0.75rem;
        padding: 0.125rem 0.25rem;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .tag-item {
        font-size: 0.875rem;
    }
}

@media (min-width: 1024px) {
    .tag-item {
        font-size: 1rem;
    }
}

/* 热点排行容器样式 */
.hot-ranking {
    display: flex;
    flex-direction: column;
    gap: 16px; /* 项目之间的间距 */
}

.item-container {
    display: grid;
    grid-template-columns: 80px auto;
    gap: 10px;
    align-items: center;
    width: fit-content;
    padding: 0px;
}

.fixed-size-image {
    width: 80px;        /* 强制宽度为80px */
    height: 80px;       /* 强制高度为80px */
    object-fit: cover;  /* 保持纵横比并裁剪 */
    object-position: center; /* 居中裁剪 */
}

.item-title {
    margin: 0;
    font-size: 16px;
}

#page {
    margin: 30px 0;
    font-size: 13px;
    height: 25px;
    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;
}


/* 响应式内边距调整 */
@media (max-width: 768px) {
  
    /* 调整文章内容内边距 */
 .px-mobile {
        padding-left: 0.1rem !important;
        padding-right: 0.1rem !important;
    }
    
    /* 调整侧边栏在移动端的显示 */
    .aside {
        padding-left: 0.1rem;
        padding-right: 0.1rem;
    }
}


/* 手机端：仅视口宽度≤767px时生效（所有手机） */
@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;
  }
}

/* 平板端：视口宽度≥768px时重置样式，避免继承手机端样式 */
@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;
    /* 若需平板端自定义样式，可在此处编写 */
  }
}