/* 基础重置 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部 */
.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.logo h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1a73e8;
}
.main-nav ul {
    display: flex;
    gap: 24px;
}
.main-nav a {
    color: #555;
    font-size: 15px;
    transition: color 0.2s;
}
.main-nav a:hover {
    color: #1a73e8;
}

/* Hero区域 */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}
.hero-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
}
.hero-desc {
    font-size: 16px;
    opacity: 0.9;
}

/* 主体 */
.site-main {
    padding: 40px 0 60px;
}
.cate-section {
    margin-bottom: 48px;
}
.cate-header {
    display: flex;
    align-items: baseline;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8eaed;
}
.cate-title {
    font-size: 20px;
    font-weight: 600;
    color: #222;
    margin-right: 12px;
}
.cate-count {
    font-size: 13px;
    color: #999;
}

/* 封面卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.res-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e8eaed;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.res-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
    border-color: #1a73e8;
}

/* 封面图 */
.card-cover {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: #f0f2f5;
    position: relative;
}
.card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.res-card:hover .card-cover img {
    transform: scale(1.05);
}
.cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 32px;
    font-weight: 600;
}

/* 卡片内容 */
.card-body {
    padding: 14px 16px;
    flex: 1;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

/* 底部标签 */
.card-footer {
    padding: 10px 16px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #f0f2f5;
}
.cate-tag {
    font-size: 12px;
    padding: 2px 8px;
    background: #f0f9ff;
    color: #1a73e8;
    border-radius: 4px;
}
.hot-tag {
    font-size: 12px;
    padding: 2px 8px;
    background: #fff1f0;
    color: #ff4d4f;
    border-radius: 4px;
    font-weight: 500;
}

/* 页脚 */
.site-footer {
    background: #fff;
    border-top: 1px solid #e8eaed;
    padding: 24px 0;
    text-align: center;
    color: #999;
    font-size: 13px;
}
.footer-icp {
    margin-top: 6px;
}
.footer-icp a {
    color: #999;
}

/* 响应式适配 */
@media (max-width: 992px) {
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    .card-cover {
        height: 140px;
    }
}

@media (max-width: 768px) {
    .hero-section { padding: 40px 0; }
    .hero-section h2 { font-size: 24px; }
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    .card-cover {
        height: 100px;
    }
    .card-body {
        padding: 10px 12px;
    }
    .card-title {
        font-size: 14px;
    }
    .card-desc {
        font-size: 12px;
        -webkit-line-clamp: 1;
        min-height: auto;
    }
    .card-footer {
        padding: 8px 12px 12px;
    }
    .main-nav { display: none; }
}
/* 封面hover遮罩效果 */
.card-cover {
    position: relative;
}
.cover-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 2;
}
.res-card:hover .cover-mask {
    opacity: 1;
}
/* 立即进入按钮背景框 */
.cover-mask span {
    padding: 8px 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 24px;
    backdrop-filter: blur(4px);
    font-size: 14px;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

/* 鼠标移入卡片时按钮轻微放大 */
.res-card:hover .cover-mask span {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.2);
}
.click-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    z-index: 3;
}
/* 底部左侧内容排版 */
.card-footer .footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 点击量样式 */
.click-count {
    font-size: 12px;
    color: #999;
    line-height: 1;
}
/* 卡片内容左右排版 */
.card-body {
padding: 14px 16px;
    flex: 1;
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 左侧Logo样式 */
.card-logo {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f0f2f5;
}
.card-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-logo span {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
}

/* 右侧内容自适应 */
.card-content {
    flex: 1;
    min-width: 0;
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 39px;
}

/* 手机端适配：缩小Logo尺寸 */
@media (max-width: 768px) {
    .card-logo {
        width: 32px;
        height: 32px;
    }
    .card-logo span {
        font-size: 14px;
    }
}
/* 头部右侧按钮区域 */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.main-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-right: 24px;
}
.header-right {
    flex-shrink: 0;
}

/* 站点申请按钮样式 */
.apply-btn {
    display: inline-block;
    padding: 7px 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    border-radius: 4px;
    transition: opacity 0.2s ease;
}
.apply-btn:hover {
    opacity: 0.9;
    color: #fff;
}
/* 站点申请按钮 边框背景框样式 */
.apply-btn {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #667eea;
    border-radius: 4px;
    background: #ffffff;
    color: #667eea;
    font-size: 14px;
    transition: all 0.25s ease;
}

/* hover 交互效果 */
.apply-btn:hover {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
}
/* 底部备案链接样式 */
.footer-icp a {
    color: #999;
    transition: color 0.2s;
}
.footer-icp a:hover {
    color: #667eea;
}

/* 移动端适配：小屏幕隐藏申请按钮 */
@media (max-width: 768px) {
    .header-right {
        display: none;
    }
}
/* 返回顶部按钮 */
#backToTop {
    position: fixed;
    right: 30px;
    bottom: 30px;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#backToTop:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
}
/* 手机端适配 */
@media (max-width: 768px) {
    #backToTop {
        right: 15px;
        bottom: 20px;
        width: 42px;
        height: 42px;
        line-height: 42px;
        font-size: 18px;
    }
}
 /* 置顶区块专属样式 */
        .top-section {
            margin-bottom: 40px;
        }
        .top-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 18px;
        }
        .top-title {
            font-size: 20px;
            font-weight: 600;
            color: #333;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .top-tag {
            padding: 3px 10px;
            background: linear-gradient(135deg, #ff9966 0%, #ff5e62 100%);
            color: #fff;
            font-size: 12px;
            border-radius: 3px;
            font-weight: 500;
        }
        .top-card .card-cover::after {
            content: '置顶推荐';
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 2px 8px;
            background: rgba(255, 94, 98, 0.9);
            color: #fff;
            font-size: 12px;
            border-radius: 3px;
            z-index: 2;
        }
 /* 右侧伸缩联系方式栏 */
.contact-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px 0 0 8px;
    overflow: visible;
    box-shadow: -2px 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 998;
    transition: width 0.25s ease;
}
.contact-sidebar:hover {
    width: 150px;
}
.contact-item {
    display: flex;
    align-items: center;
    height: 40px;
    padding: 0 5px;
    color: #fff;
    text-decoration: none;
    position: relative;
    transition: background 0.2s;
    white-space: nowrap;
    box-sizing: border-box;
}
.contact-item:hover {
    background: rgba(255,255,255,0.15);
}
.contact-icon {
    flex-shrink: 0;
    width: 40px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10%;
    font-size: 12px;
    font-weight: 600;
    margin-right: 12px;
}
.contact-text {
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease 0.05s;
}
.contact-sidebar:hover .contact-text {
    opacity: 1;
}

/* 微信二维码浮层：消除空隙，解决断开问题 */
.wechat-qrcode {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 8px;
    background: #fff;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease 0.1s;
    white-space: nowrap;
    pointer-events: none;
}
.wechat-item:hover .wechat-qrcode {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
/* 右侧小三角箭头，贴合侧边栏 */
.wechat-qrcode::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #fff;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* 手机端适配 */
@media (max-width: 768px) {
    .contact-sidebar {
        width: 42px;
        top: auto;
        bottom: 80px;
        transform: none;
    }
    .contact-item {
        height: 46px;
        padding: 0 10px;
    }
    .contact-icon {
        margin-right: 0;
    }
    .contact-sidebar:hover {
        width: 130px;
    }
}       