/* Responsive & Mobile */
@media screen and (max-width: 800px) {
    #main {
        width: 100%;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }

    #content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-md);
    }

    /* 触发按钮样式 */
    #mobile-menu-btn {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        z-index: 1000;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
    }
    #mobile-menu-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--text-color);
        margin: 5px 0;
    }

    /* 抽屉式侧边栏 */
    .content-right {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px; /* Reduced width */
        max-width: 85vw; /* Max width for small screens */
        height: 100vh;
        background-color: rgba(var(--bg-card-rgb), 0.95); /* Semi-transparent */
        backdrop-filter: blur(10px); /* Frosted glass effect */
        z-index: 999;
        overflow-y: auto;
        transform: translateX(100%); /* 默认移出屏幕 */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 20px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.2); /* Softer shadow */
        margin-top: 0; /* 重置可能存在的 margin */
    }

    /* 激活状态 */
    body.drawer-open .content-right {
        transform: translateX(0);
    }

    body.drawer-open {
        overflow: hidden; /* 防止背景滚动 */
    }

    /* 遮罩层 */
    #drawer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 998;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    body.drawer-open #drawer-overlay {
        display: block;
        opacity: 1;
    }

    /* 恢复垂直列表样式 */
    .widget-list li {
        display: block;
        margin-right: 0;
        border: none;
        border-bottom: 1px dashed var(--border-color);
        background: none;
    }

    /* 简化分页，只显示上一页和下一页 */
    .pager li {
        display: none !important; /* 强制隐藏所有页码 */
    }

    .pager li.prev,
    .pager li.next {
        display: inline-block !important; /* 仅显示上一页和下一页 */
    }

    /* 增加点击区域，优化触摸体验 */
    .pager li.prev a,
    .pager li.next a {
        padding: 10px 20px;
    }
}
