@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: #000000 !important;
    padding: 0 10px;
    display: none; /* 默认隐藏，通过JS控制显示 */
}

.expanded-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FCF0C1 !important;
    border: 1px solid #FCEAA2 !important;
    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: 1.8rem !important; /* 与菜单之间的间距 */
}

.expanded-menu a {
    display: block;
    margin-bottom: 8px;
    text-decoration: none;
    color: #333;
}

/* 首页横条广告图片 */
#ad-span img {
    width: 100%;
    height: auto;
    max-height: 200px;
    min-height: 35px;
    object-fit: fill !important; /* 变形 */
}