@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);
    }
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
    .scrollbar-hide {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
}

/* 全局样式 */
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;
}

/* 图片画廊 */
.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;
}

/* 评论表单动画 */
.comment-form {
    transition: all 0.3s ease;
}

.comment-form:focus-within {
    transform: translateY(-5px);
}

/* 动态导航 */
.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;
}

/* 热点排行容器样式 */
.hot-ranking {
    display: flex;
    flex-direction: column;
    gap: 12px; /* 项目之间的间距 */
}

.item-container {
    display: grid;
    grid-template-columns: 62px auto;
    gap: 10px;
    align-items: center;
    width: fit-content;
    padding: 0px;
}

.fixed-size-image {
    width: 60px;        /* 强制宽度为60px */
    height: 60px;       /* 强制高度为60px */
    object-fit: cover;  /* 保持纵横比并裁剪 */
    object-position: center; /* 居中裁剪 */
    border-radius: 5px; /* 圆角 */
}

.item-title {
    margin: 0;
    font-size: 16px;
}

.showimg a img {
    width: 100%; 
    height: 100% 
}

.prose {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    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: #ffffff;
    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 span {
    color: #6B7280;
    font-weight: 500;
    margin-right: 0.75rem;
    min-width: 5rem;
}

.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;
}