/* ==========================================
   全局通用样式
   ========================================== */
/* 容器样式 */
.container {
    max-width: 950px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
}

/* ==========================================
   位置导航样式
   ========================================== */
.weizhi {
    width: 100%;
    padding: 10px 0;
    margin-bottom: 5px;
}

.current {
    font-size: 14px;
}

.hui12 {
    color: #999;
    font-size: 12px;
}

/* ==========================================
   主内容布局样式
   ========================================== */
/* 主内容区域 */
.main-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* 左侧边栏 */
.sidebar {
    flex: 0 0 200px;
    width: 100%;
}

/* 右侧内容区 */
.content {
    flex: 1;
    min-width: 0; /* 解决flex子元素溢出问题 */
}

/* ==========================================
   分类导航样式
   ========================================== */
.category-nav {
    width: 100%;
    margin-bottom: 15px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 2px;
    border: 1px solid #ddd;
    padding: 5px;
}

.category-item {
    padding: 8px 5px;
    text-align: center;
    background-color: #f5f5f5;
    border-radius: 3px;
}

.news_title12 {
    font-size: 12px;
    font-weight: bold;
}

/* ==========================================
   网站列表样式
   ========================================== */
.site-list {
    width: 100%;
    margin-bottom: 20px;
}

.site-item {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.showlist1 {
    background-color: #f9f9f9;
}

.showlist2 {
    background-color: #fff;
}

.site-img {
    flex: 0 0 10%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('../images/blank.gif');
    background-repeat: no-repeat;
    background-position: center center;
    background-color: #fff;
    border: 1px solid #fff;
}

.site-img img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    z-index: 1;
    position: relative;
}

.site-info {
    flex: 1;
    padding: 10px;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.site-name {
    font-weight: bold;
    cursor: pointer;
}

.site-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.site-intro {
    font-size: 12px;
    color: #666;
}

/* ==========================================
   分页样式
   ========================================== */
.pagination {
    padding: 5px 0;
    text-align: left;
    font-size: 12px;
}

.pagination a {
    display: inline-block;
    padding: 3px 8px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.pagination a:hover {
    background-color: #f00;
    color: #fff;
    border-color: #f00;
}

/* ==========================================
   响应式媒体查询
   ========================================== */
@media (max-width: 768px) {
    .main-wrapper {
        flex-direction: column;
    }

    .sidebar {
        flex: 0 0 100%;
        margin-bottom: 15px;
    }

    .site-item {
        flex-direction: column;
    }

    .site-img {
        flex: 0 0 100%;
        padding: 20px 0;
        background-size: contain;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    }

    .site-header,
    .site-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-img img {
        width: 50px;
        height: 50px;
    }
}