* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* 页面顶部留白 */
body {
    padding-top: 0;
}

/* 侧边栏 - 左侧固定，可收起，毛玻璃效果 */
.sidebar {
    width: 200px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    transition: width 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
    /* 隐藏滚动条但保持滚动功能 */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.sidebar:hover,
.sidebar.expanded {
    width: 220px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.sidebar:hover .sidebar-header,
.sidebar.expanded .sidebar-header {
    padding: 20px;
    justify-content: space-between;
}

.sidebar-header-text {
    position: absolute;
    left: 20px;
    white-space: nowrap;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.sidebar:hover .sidebar-header-text,
.sidebar.expanded .sidebar-header-text {
    opacity: 1;
}

.sidebar-toggle {
    position: absolute;
    right: 20px;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    transition: color 0.15s ease;
}

.sidebar:hover .sidebar-toggle,
.sidebar.expanded .sidebar-toggle {
    opacity: 1;
}

.sidebar-toggle:hover {
    color: #1890ff;
}

.sidebar-menu {
    padding: 10px 0;
}

.sidebar-menu-item {
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-menu-item span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    opacity: 0;
    width: 0;
    transition: opacity 0.1s ease;
}

.sidebar:hover .sidebar-menu-item,
.sidebar.expanded .sidebar-menu-item {
    padding: 12px 20px;
    justify-content: flex-start;
}

.sidebar-menu-item:hover {
    background: #f0f5ff;
    color: #1890ff;
}

.sidebar-menu-item.active {
    background: #e6f7ff;
    color: #1890ff;
    font-weight: 500;
}

.sidebar-menu-item i {
    width: 20px;
    font-size: 16px;
    text-align: center;
}

.sidebar:hover .sidebar-menu-item span,
.sidebar.expanded .sidebar-menu-item span {
    opacity: 1;
    width: auto;
}

/* 主内容布局 */
.content-wrapper {
    display: flex;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 10px 20px 70px;
}

.main-content {
    flex: 1;
    min-width: 0;
}

/* 返回顶部 - 右下角，小一点 */
.back-to-top {
    position: fixed;
    right: 15px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1890ff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    z-index: 998;
}

.back-to-top:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-3px);
}

.back-to-top.show {
    display: flex;
}

.back-to-top.hidden {
    transform: translateY(100px);
    opacity: 0;
}

.back-to-top i {
    font-size: 20px;
}

/* 手机端分类导航按钮 - 左下角 */
.mobile-category-toggle {
    position: fixed;
    left: 15px;
    bottom: 20px;
    /* 为iOS Safari底部栏预留空间 */
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    /* 额外增加底部边距，避免被浏览器UI遮挡 */
    margin-bottom: 10px;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #1890ff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
    z-index: 999;
}

.mobile-category-toggle.hidden {
    transform: translateY(100px);
    opacity: 0;
}

.mobile-category-toggle i {
    font-size: 22px;
}

/* 侧边栏展开时隐藏分类按钮 */
.mobile-category-toggle.sidebar-open {
    opacity: 0;
    pointer-events: none;
}

/* 小于1200px时使用悬浮导航栏 */
@media (max-width: 1199px) {
    .mobile-category-toggle {
        display: flex !important;
    }

    .sidebar {
        display: none !important;
    }
}

/* 移动端侧边栏 - 透明毛玻璃效果 - 优化性能 */
.mobile-sidebar {
    display: none;
    position: fixed;
    left: 10px;
    top: 86px;
    width: 220px;
    max-width: calc(100vw - 90px);
    height: calc(100vh - 101px);
    max-height: calc(100vh - 101px);
    transform: translateX(-120%) translateZ(0);
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    will-change: transform;
    -webkit-transform: translateX(-120%) translateZ(0);
}

.mobile-sidebar .sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* 隐藏滚动条 */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-sidebar .sidebar-menu::-webkit-scrollbar {
    display: none;
}

/* 小于1200px时启用移动端侧边栏 */
@media (max-width: 1199px) {
    .mobile-sidebar {
        display: flex !important;
        bottom: calc(25px + env(safe-area-inset-bottom, 0px));
        height: calc(100vh - 101px - 25px - env(safe-area-inset-bottom, 0px));
        max-height: calc(100vh - 101px - 25px - env(safe-area-inset-bottom, 0px));
        /* 为底部菜单栏预留额外空间 */
        margin-bottom: 10px;
    }

    .mobile-sidebar.show {
        transform: translateX(0) translateZ(0) !important;
        -webkit-transform: translateX(0) translateZ(0) !important;
    }

    /* 确保桌面侧边栏完全隐藏 */
    aside.sidebar,
    #pcSidebar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
        width: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
    }

    /* 隐藏桌面侧边栏的所有子元素 */
    aside.sidebar *,
    #pcSidebar * {
        display: none !important;
    }
}

/* 移动端侧边栏收起按钮 - 固定在底部 */
.mobile-sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px 20px;
    margin: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: #666;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    border-radius: 0 0 16px 16px;
}

.mobile-sidebar-close-btn i {
    background: none !important;
    color: #666 !important;
    font-size: 16px;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
}

.mobile-sidebar-close-btn:active {
    background: rgba(0, 0, 0, 0.05);
}

/* 移动端侧边栏菜单项样式 - 适用于所有移动端尺寸 */
@media (max-width: 1199px) {
    .mobile-sidebar .sidebar-menu {
        padding: 0;
    }

    .mobile-sidebar .sidebar-menu-item {
        padding: 16px 20px !important;
        margin: 0;
        background: transparent;
        border-radius: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 14px !important;
        color: #333;
        font-size: 15px;
        transition: all 0.2s;
        text-decoration: none;
    }

    .mobile-sidebar .sidebar-menu-item i {
        width: 24px !important;
        height: 24px;
        background: #1890ff !important;
        color: #fff !important;
        border-radius: 6px !important;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px !important;
        flex-shrink: 0;
    }

    .mobile-sidebar .sidebar-menu-item span {
        opacity: 1 !important;
        width: auto !important;
        overflow: visible !important;
        display: inline-block !important;
    }

    .mobile-sidebar .sidebar-menu-item:active {
        background: rgba(0, 0, 0, 0.05);
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 998;
}

.sidebar-overlay.show {
    display: block;
}

/* 搜索区域 - 从顶部开始 */
.search-section {
    padding: 130px 20px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0;
    min-height: 380px;
}

/* 手机端搜索区域高度调整 */
@media (max-width: 768px) {
    .search-section {
        padding: 105px 15px 0;
        min-height: 280px;
    }
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 1;
    pointer-events: none;
}

.search-section>* {
    position: relative;
    z-index: 2;
}

/* 搜索区域标语 */
.search-slogan {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.search-subtitle {
    position: relative;
    z-index: 2;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    margin-bottom: 35px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.15);
    font-weight: 400;
}

.search-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    width: 100%;
    margin: 0 auto 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    width: 100%;
    padding: 18px 70px 18px 24px;
    border: none;
    border-radius: 50px;
    font-size: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
    background: #fff;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: #1890ff;
    color: #fff;
    border: none;
    padding: 0;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.3);
}

.search-btn:hover {
    background: #40a9ff;
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(24, 144, 255, 0.4);
}

/* 热门标签 */
.search-tags {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    margin-bottom: 30px;
}

.search-tags-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin-right: 5px;
    flex-shrink: 0;
}

.search-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    flex-shrink: 0;
}

.search-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



/* 分类卡片 */
.category-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.category-header {
    margin-bottom: 20px;
}

.category-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.category-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.category-title i {
    color: #1890ff;
}

.category-more {
    color: #1890ff;
    text-decoration: none;
    font-size: 14px;
    flex-shrink: 0;
}

.category-more:hover {
    color: #40a9ff;
}

/* 置顶站点样式 */
.top-site-card {
    position: relative;
    border: 2px solid #91d5ff;
}

.top-site-card:hover {
    border-color: #69c0ff;
    box-shadow: 0 4px 16px rgba(24, 144, 255, 0.2);
}

.top-badge {
    position: absolute;
    top: -1px;
    right: -1px;
    background: linear-gradient(135deg, #69c0ff, #91d5ff);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 0 10px 0 8px;
    letter-spacing: 0.5px;
}

.category-title-wrapper {
    display: block;
}

/* 子分类标签 - 共用一个背景 */
.sub-categories {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    padding: 0;
    margin: 0;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sub-categories::-webkit-scrollbar {
    display: none;
}

.sub-cat-tag {
    display: inline-block;
    padding: 6px 16px;
    background: transparent;
    color: #666;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.sub-cat-tag:hover {
    background: rgba(255, 255, 255, 0.6);
    color: #333;
}

.sub-cat-tag.active {
    background: #1890ff;
    color: #fff;
}



/* 站点网格 - 固定尺寸布局 */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
}

.site-card {
    background: #fafafa;
    border-radius: 12px;
    padding: 12px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 12px;
    opacity: 1;
    position: relative;
    min-height: 70px;
}

.site-card[style*="display: none"] {
    display: none !important;
}

.site-card.loading-card {
    opacity: 0.5;
    pointer-events: none;
}

.site-card:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.site-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.site-icon.loaded {
    animation: none;
    background: none;
    opacity: 1;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.site-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.site-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
    line-height: 1.3;
}

.site-desc {
    font-size: 12px;
    color: #999;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* 手机端站点卡片 - 固定2列布局 */
@media (max-width: 768px) {
    .sites-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px;
    }

    .site-card {
        padding: 10px;
        border-radius: 10px;
        min-height: 65px;
        grid-template-columns: 44px 1fr;
        gap: 10px;
    }

    .site-icon {
        width: 44px;
        height: 44px;
        border-radius: 8px;
    }

    .site-name {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 2px;
    }

    .site-desc {
        font-size: 11px;
        color: #999;
    }
}

/* 友情链接卡片 */
.friend-links-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.friend-links-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.friend-links-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.friend-links-title i {
    color: #1890ff;
}

.friend-links-apply {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #ff4d6d;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.friend-links-apply:hover {
    color: #ff1744;
}

.friend-links-apply i {
    font-size: 16px;
}

.friend-links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    line-height: 2.2;
}

.friend-link-item {
    text-decoration: none;
    color: #666;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    position: relative;
    padding: 0;
}

.friend-link-item:hover {
    color: #1890ff;
}

.friend-link-item::before {
    content: '•';
    margin: 0 8px 0 0;
    color: #333;
    font-weight: bold;
}

.friend-link-item::after {
    content: '';
    margin-right: 8px;
}

.friend-link-logo {
    display: none;
}

.friend-link-info {
    flex: 1;
    min-width: 0;
}

.friend-link-name {
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
}

.friend-link-desc {
    display: none;
}

/* 文章网格 */
.article-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.article-card {
    background: #fafafa;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    display: flex;
    height: 140px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-card:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.article-thumb {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    background: #e8e8e8;
}

.article-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s, opacity 0.3s ease-in-out;
    opacity: 0;
}

.article-thumb img.loaded {
    opacity: 1;
}

.article-card:hover .article-thumb img {
    transform: scale(1.05);
}

.article-card .article-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #333;
    margin: 0;
}

.article-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
    flex: 1;
    max-height: 3em;
    word-break: break-all;
}

.article-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #999;
    margin-top: auto;
}

/* 底部 */
.footer {
    background: #fff;
    padding: 40px 20px;
    text-align: center;
    color: #999;
    margin-top: 60px;
    border-top: 1px solid #f0f0f0;
}

@media (max-width: 768px) {
    .footer {
        padding: 40px 20px 100px;
    }
}

.footer a {
    color: #999;
    text-decoration: none;
}

.footer a:hover {
    color: #1890ff;
}

/* 响应式 - 小于1200px */
@media (max-width: 1199px) {
    .sidebar {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        position: absolute !important;
        left: -9999px !important;
    }

    .sidebar * {
        display: none !important;
    }

    .content-wrapper {
        padding: 20px 10px;
    }

    .main-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
        /* 为底部导航按钮预留空间，避免被浏览器UI遮挡 */
        padding-bottom: 0;
    }

    .search-slogan {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .search-subtitle {
        font-size: 12px;
        margin-bottom: 25px;
    }

    .search-box {
        max-width: 100%;
        margin-bottom: 18px;
    }

    .search-input {
        padding: 14px 56px 14px 18px;
        font-size: 14px;
    }

    .search-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
        right: 4px;
    }

    .search-tags {
        gap: 6px;
        justify-content: center;
        margin-bottom: 20px;
    }

    .d-none {
        display: none !important;
    }

    .d-md-inline-block {
        display: inline-block !important;
    }

    @media (max-width: 768px) {
        .d-md-inline-block {
            display: none !important;
        }
    }

    .search-tags-label {
        font-size: 11px;
    }

    .search-tag {
        padding: 4px 10px;
        font-size: 11px;
        max-width: 100px;
    }

    .sites-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 15px;
    }

    .category-title-row {
        margin-bottom: 10px;
    }

    .category-title {
        font-size: 17px;
    }

    .sub-categories {
        width: 100%;
        padding: 3px;
    }

    .sub-cat-tag {
        padding: 5px 14px;
        font-size: 12px;
    }

    .back-to-top {
        right: 10px;
        bottom: calc(30px + env(safe-area-inset-bottom));
        width: 45px;
        height: 45px;
    }

    .mobile-category-toggle {
        left: 10px;
        bottom: calc(30px + env(safe-area-inset-bottom));
        /* 为底部菜单栏预留额外空间 */
        margin-bottom: 10px;
    }

    .article-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .article-card {
        height: 120px;
    }

    .article-thumb {
        width: 120px;
        height: 120px;
    }

    .article-info {
        padding: 12px;
    }

    .article-card .article-title {
        font-size: 14px;
        -webkit-line-clamp: 2;
    }

    .article-desc {
        font-size: 12px;
        -webkit-line-clamp: 1;
        line-clamp: 1;
        max-height: 1.5em;
    }

    .article-meta {
        gap: 8px;
        font-size: 11px;
    }
}

/* 公告栏 */
.notice-bar-wrapper {
    grid-column: 1 / -1;
    margin: -10px 0 5px 0;
}

.notice-content {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    line-height: 1.6;
    padding: 12px 20px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.notice-icon {
    font-size: 18px;
    flex-shrink: 0;
    z-index: 2;
    position: relative;
}

.notice-text-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.notice-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: scroll-left 20s linear infinite;
}

.notice-text:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-100%);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .notice-bar {
        margin: 15px 0 0 0;
    }

    .notice-content {
        width: calc(100% - 20px);
        font-size: 13px;
        gap: 8px;
        padding: 10px 15px;
        border-radius: 12px;
    }

    .notice-icon {
        font-size: 16px;
    }

    .notice-text {
        animation: scroll-left 15s linear infinite;
    }
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.overlay.show {
    display: block;
}

/* 右
侧边栏 */
.right-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 统计信息卡片 */
.stats-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    padding: 30px 20px;
    border-radius: 16px;
    border: 3px solid;
    background: white;
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.6;
}

.stat-icon-small {
    font-size: 36px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.stat-value {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 15px;
    color: #999;
    font-weight: 500;
}

/* 主要统计 - 大卡片 */
.stat-primary {
    border-color: #ffb3ba;
    background: #fff5f6;
    padding: 40px 20px;
    min-height: 200px;
}

.stat-primary .stat-icon {
    color: #ff6b7a;
}

.stat-primary .stat-value {
    color: #ff6b7a;
    font-size: 64px;
}

/* 次要统计 - 3个小卡片 */
.stats-secondary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stats-secondary .stat-item {
    min-height: 160px;
}

.stat-blue {
    border-color: #bae1ff;
    background: #f0f8ff;
}

.stat-blue .stat-icon-small {
    color: #4a9eff;
}

.stat-blue .stat-value {
    color: #4a9eff;
    font-size: 36px;
}

.stat-green {
    border-color: #baffc9;
    background: #f0fff4;
}

.stat-green .stat-icon-small {
    color: #52c41a;
}

.stat-green .stat-value {
    color: #52c41a;
    font-size: 36px;
}

.stat-pink {
    border-color: #ffdfba;
    background: #fffaf0;
}

.stat-pink .stat-icon-small {
    color: #fa8c16;
}

.stat-pink .stat-value {
    color: #fa8c16;
    font-size: 36px;
}

/* 最新文章卡片 */
.latest-articles-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.latest-articles-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.latest-articles-header i {
    font-size: 20px;
    color: #1890ff;
}

.latest-articles-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.latest-article-item {
    display: block;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
}

.latest-article-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.latest-article-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.5;
}

.latest-article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

.latest-article-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.latest-article-meta i {
    font-size: 14px;
}

/* 手机端统计卡片 - 新样式 */
.mobile-sidebar-card {
    display: none;
    margin-bottom: 30px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.mobile-sidebar-banner {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}

.mobile-sidebar-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.mobile-banner-logo {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.mobile-banner-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-banner-text {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.mobile-banner-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
}

.mobile-banner-desc {
    font-size: 12px;
    opacity: 0.95;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-sidebar-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 15px 10px;
}

.mobile-sidebar-stat-item {
    text-align: center;
}

.mobile-stat-num {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.mobile-sidebar-stat-item:nth-child(1) .mobile-stat-num {
    color: #1890ff;
}

.mobile-sidebar-stat-item:nth-child(2) .mobile-stat-num {
    color: #52c41a;
}

.mobile-sidebar-stat-item:nth-child(3) .mobile-stat-num {
    color: #ff4d4f;
}

.mobile-sidebar-stat-item:nth-child(4) .mobile-stat-num {
    color: #722ed1;
}

.mobile-stat-text {
    font-size: 12px;
    color: #999;
}

/* 响应式 - 隐藏右侧栏 */
@media (max-width: 1200px) {
    .right-sidebar {
        display: none;
    }

    .mobile-stats-card {
        display: block;
    }

    .content-wrapper {
        max-width: 1200px;
    }
}

/* 
右侧栏重新设计 */
.right-sidebar {
    width: 320px !important;
    gap: 15px !important;
}

/* 顶部信息卡片 */
.sidebar-top-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-banner {
    background: linear-gradient(135deg, #1890ff 0%, #096dd9 100%);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}

.sidebar-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.sidebar-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.banner-logo {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.banner-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-text {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.banner-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.banner-desc {
    font-size: 12px;
    opacity: 0.95;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.sidebar-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 15px 10px;
}

.sidebar-stat-item {
    text-align: center;
}

.stat-num {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.sidebar-stat-item:nth-child(1) .stat-num {
    color: #1890ff;
}

.sidebar-stat-item:nth-child(2) .stat-num {
    color: #52c41a;
}

.sidebar-stat-item:nth-child(3) .stat-num {
    color: #ff4d4f;
}

.sidebar-stat-item:nth-child(4) .stat-num {
    color: #722ed1;
}

.stat-text {
    font-size: 12px;
    color: #999;
}

/* 网站排行卡片 */
.sidebar-ranking-card,
.sidebar-articles-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.sidebar-card-header i {
    font-size: 18px;
    color: #1890ff;
}

.ranking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ranking-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s;
}

.ranking-tab.active {
    background: #ff4d4f;
    color: white;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fafafa;
    text-decoration: none;
    transition: all 0.2s;
}

.ranking-item:hover {
    background: #f0f0f0;
    transform: translateX(3px);
}

.ranking-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #999;
    flex-shrink: 0;
}

.ranking-item:nth-child(1) .ranking-num {
    background: #ff4d4f;
    color: white;
}

.ranking-item:nth-child(2) .ranking-num {
    background: #ff7a45;
    color: white;
}

.ranking-item:nth-child(3) .ranking-num {
    background: #ffa940;
    color: white;
}

.ranking-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.ranking-info {
    flex: 1;
    min-width: 0;
}

.ranking-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
}

.ranking-desc {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-stats {
    font-size: 11px;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.ranking-stats i {
    font-size: 13px;
}

.ranking-more {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    background: #fff1f0;
    color: #ff4d4f;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.ranking-more:hover {
    background: #ffccc7;
}

/* 最新文章列表 */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fafafa;
    text-decoration: none;
    transition: all 0.2s;
}

.article-item:hover {
    background: #f0f0f0;
    transform: translateX(3px);
}

.article-num {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    color: #999;
    flex-shrink: 0;
}

.article-item:nth-child(1) .article-num {
    background: #fff7e6;
    color: #fa8c16;
}

.article-title {
    flex: 1;
    font-size: 13px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.article-views {
    font-size: 11px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.article-views i {
    font-size: 13px;
}

/* 右侧栏
固定定位 - 已取消 */
.right-sidebar {
    /* position: sticky; */
    /* top: 20px; */
    /* align-self: flex-start; */
}

/* 响应式 - 显示手机端统计卡片 */
@media (max-width: 1200px) {
    .mobile-sidebar-card {
        display: block;
    }
}

/* PC端左侧栏 - 从搜索区域下方开始，sticky定位，悬浮展开 */
@media (min-width: 1200px) {
    .sidebar {
        width: 60px !important;
        position: sticky !important;
        top: 100px !important;
        align-self: flex-start !important;
        max-height: calc(100vh - 120px) !important;
        padding-bottom: 60px !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        background: #ffffff !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
        transition: width 0.15s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.15s ease !important;
        will-change: width !important;
        transform: translateZ(0) !important;
        z-index: 100 !important;
        /* 隐藏滚动条 */
        scrollbar-width: none !important;
        -ms-overflow-style: none !important;
    }

    .sidebar::-webkit-scrollbar {
        display: none !important;
    }

    .sidebar:hover {
        width: 220px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
        z-index: 101 !important;
    }

    .sidebar-header {
        display: none !important;
    }

    .sidebar-menu {
        padding: 10px 0 !important;
    }

    .sidebar-menu-item {
        padding: 12px 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        white-space: nowrap !important;
        transition: background-color 0.2s ease, padding 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .sidebar:hover .sidebar-menu-item {
        padding: 12px 20px !important;
        justify-content: flex-start !important;
    }

    .sidebar-menu-item i {
        width: 20px !important;
        font-size: 18px !important;
        text-align: center !important;
        flex-shrink: 0 !important;
    }

    .sidebar-menu-item span {
        opacity: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        transition: opacity 0.15s ease !important;
    }

    .sidebar:hover .sidebar-menu-item span {
        opacity: 1 !important;
        width: auto !important;
    }

    .content-wrapper {
        padding-left: 10px !important;
    }
}

/* 手机端排行榜 */
.mobile-ranking-card {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
}

.mobile-ranking-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.mobile-ranking-header i {
    font-size: 18px;
    color: #1890ff;
}

.mobile-ranking-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mobile-ranking-tab {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
    background: #f5f5f5;
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-ranking-tab.active {
    background: #ff4d4f;
    color: white;
}

.mobile-ranking-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #fafafa;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-ranking-item:active {
    background: #f0f0f0;
    transform: scale(0.98);
}

.mobile-ranking-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #999;
    flex-shrink: 0;
}

.mobile-ranking-item:nth-child(1) .mobile-ranking-num {
    background: #ff4d4f;
    color: white;
}

.mobile-ranking-item:nth-child(2) .mobile-ranking-num {
    background: #ff7a45;
    color: white;
}

.mobile-ranking-item:nth-child(3) .mobile-ranking-num {
    background: #ffa940;
    color: white;
}

.mobile-ranking-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.mobile-ranking-info {
    flex: 1;
    min-width: 0;
}

.mobile-ranking-name {
    font-size: 13px;
    color: #333;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 3px;
}

.mobile-ranking-desc {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-ranking-stats {
    font-size: 11px;
    color: #1890ff;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-shrink: 0;
}

.mobile-ranking-stats i {
    font-size: 13px;
}

.mobile-ranking-more {
    display: block;
    text-align: center;
    padding: 10px;
    margin-top: 10px;
    background: #fff1f0;
    color: #ff4d4f;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-ranking-more:active {
    background: #ffccc7;
}

@media (max-width: 1200px) {
    .mobile-ranking-card {
        display: block;
    }
}



.notice-bar-wrapper {
    grid-column: 1 / -1 !important;
    margin: -10px 0 5px 0 !important;
}

.notice-content {
    width: 100% !important;
    max-width: none !important;
}

/* 主内容布局 - PC端使用grid，手机端使用flex */
.content-wrapper {
    display: flex !important;
    flex-direction: column !important;
}

@media (min-width: 1201px) {
    .content-wrapper {
        display: grid !important;
        grid-template-columns: 60px 1fr 320px !important;
        gap: 20px !important;
    }
}

/* PC端左侧栏菜单样式优化 */
@media (min-width: 1200px) {
    .sidebar-header {
        display: none !important;
    }

    .sidebar-menu {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }
}