* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
}

body {
    background: #ffffff;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 顶部区域 */
.header {
    text-align: center;
    padding: 40px 20px 30px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: white;
    border-radius: 0 0 20px 20px;
    margin-bottom: 40px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-icon i {
    font-size: 28px;
    color: #2575fc;
}

.site-name {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.site-desc {
    font-size: 16px;
    margin-top: 8px;
    opacity: 0.9;
    max-width: 600px;
    margin: 10px auto 0;
}

/* 搜索区域 */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    margin: 0 auto;
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.search-box {
    width: 100%;
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 18px 50px 18px 20px;
    border: none;
    border-radius: 50px;
    background: #f5f7fa;
    font-size: 16px;
    color: #333;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(37, 117, 252, 0.2);
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    width: 45px;
    border: none;
    border-radius: 50%;
    background: #2575fc;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    background: #1a67e8;
    transform: scale(1.05);
}

.search-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.search-tip {
    background: #eef4ff;
    color: #2575fc;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-tip:hover {
    background: #2575fc;
    color: white;
}

/* 按钮容器 */
.buttons-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
}

/* 按钮样式 */
.group-button {
    width: auto;
    min-width: 200px;
    padding: 15px 25px;
    border: none;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: #2575fc;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0;
    text-decoration: none;
}

.group-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15);
    background: white;
    text-decoration: none;
}

.group-button i {
    font-size: 18px;
}

/* 内容区域 */
.content-area {
    padding: 20px;
    flex: 1;
}

/* 卡片样式 */
.block {
    margin-bottom: 40px;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    cursor: pointer;
}

.nav {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 2px solid #2575fc;
    display: inline-block;
}

.toggle-btn {
    background: #2575fc;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.toggle-btn:hover {
    background: #1a67e8;
}

/* 列表样式 - 修改为每行6个 */
.list {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(6, 1fr);
}

/* 折叠状态显示前12个 */
.list.collapsed .item:nth-child(n+13) {
    display: none;
}

.item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.img {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 使用 cover 填充整个图片区域 */
    transition: transform 0.3s ease;
}

.item:hover .img img {
    transform: scale(1.05);
}

/* 排行标签样式 */
.ranking-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* 前三名黄色样式 */
.ranking-badge[data-rank="1"],
.ranking-badge[data-rank="2"],
.ranking-badge[data-rank="3"] {
    background: linear-gradient(135deg, #ffd700, #ffa500);
}

/* 其余名次蓝色样式 */
.ranking-badge[data-rank="4"],
.ranking-badge[data-rank="5"],
.ranking-badge[data-rank="6"],
.ranking-badge[data-rank="7"],
.ranking-badge[data-rank="8"],
.ranking-badge[data-rank="9"],
.ranking-badge[data-rank="10"] {
    background: linear-gradient(135deg, #2575fc, #1a67e8);
}

/* 热度值标签 */
.hot-score {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    z-index: 2;
    backdrop-filter: blur(5px);
}

/* 内容区域 */
.item-content {
    padding: 12px 12px 8px 12px; /* 减少底部内边距 */
}

.item-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0; /* 减少标题下方间距 */
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 关键词样式 */
.item-keywords {
    margin-top: 4px; /* 减少关键词上方间距 */
    padding-top: 6px;
    border-top: 1px solid #f0f0f063;
}

/* 找到 .keyword-tag 样式，修改为： */
.keyword-tag {
    display: block;
    background: transparent;
    color: #666;
    padding: 4px 0;
    border-radius: 0;
    font-size: 11px;
    line-height: 1.4; /* 增加行高 */
    margin-bottom: 0;
    font-weight: 400;
    border: none;
    /* 移除文本截断样式 */
    overflow: visible;
    white-space: normal;
    text-overflow: unset;
    display: -webkit-box;
    -webkit-line-clamp: unset;
    -webkit-box-orient: unset;
    height: auto;
}

/* 页脚 */
.footer {
    background: #f8f9fa;
    padding: 30px 20px;
    text-align: center;
    color: #666;
    border-top: 1px solid #eaeaea;
}

.footer p {
    margin-bottom: 10px;
}

.footer a {
    color: #2575fc;
    text-decoration: none;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.close {
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.modal-body {
    padding: 20px;
}

.qrcode-image {
    text-align: center;
    margin: 20px 0;
}

.qrcode-image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* 统计信息 */
.search-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    padding: 0 10px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #666;
    padding: 8px 15px;
}

.stat-item i {
    color: #667eea;
    font-size: 0.9rem;
}

.stat-item:nth-child(2) i {
    color: #f5576c;
}

.stat-text {
    font-weight: 500;
}

.stat-text strong {
    color: #333;
    font-weight: 600;
}

/* 动态图标效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}

.spin {
    animation: spin 3s infinite linear;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .list {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 992px) {
    .list {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .search-container {
        width: 90%;
    }
    
    .buttons-container {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 30px 15px 20px;
    }
    
    .site-name {
        font-size: 26px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
    }
    
    .search-container {
        padding: 20px;
        width: 95%;
    }
    
    .buttons-container {
        flex-direction: row;
        align-items: center;
        width: 95%;
        gap: 10px;
    }
    
    .group-button {
        width: 100%;
        min-width: auto;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .list {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* 修改为每个分类最多显示6个 */
    .list.collapsed .item:nth-child(n+7) {
        display: none;
    }
    
    .search-stats {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .stat-item {
        font-size: 0.85rem;
        padding: 6px 12px;
        gap: 6px;
    }
}

@media (max-width: 576px) {
    .list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* 修改为每个分类最多显示6个 */
    .list.collapsed .item:nth-child(n+7) {
        display: none;
    }
    
    .img {
        height: 150px;
    }
    
    .item-title {
        font-size: 13px;
        height: 32px;
    }
    
    .keyword-tag {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 20px 10px 15px;
    }
    
    .site-name {
        font-size: 22px;
    }
    
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-icon {
        margin-right: 0;
    }
    
    .search-tips {
        gap: 8px;
    }
    
    .search-tip {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .buttons-container {
        flex-direction: row;
        gap: 8px;
    }
    
    .group-button {
        padding: 10px 15px;
        font-size: 13px;
    }
    
    .group-button i {
        font-size: 16px;
    }
    
    .search-stats {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .stat-item {
        width: fit-content;
        min-width: 180px;
        justify-content: center;
    }
}

@media (max-width: 360px) {
    .buttons-container {
        flex-wrap: wrap;
    }
    
    .group-button {
        min-width: 140px;
    }
    
    .list {
        grid-template-columns: repeat(1, 1fr);
    }
    
    /* 修改为每个分类最多显示6个 */
    .list.collapsed .item:nth-child(n+7) {
        display: none;
    }
}

.stat-item:first-child i {
    color: #667eea;
}