:root {
    --primary-color: #3B82F6;
    --text-color: #333;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    background-color: #f8f9fa;
    color: var(--text-color);
}

.current {
    background: white;
    padding: 15px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.current a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.current a:hover {
    opacity: 0.8;
}

.channel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.channel-tab {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    border: 1px solid #eee;
}

.channel-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hot-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin: 0 auto;
    padding: 10px;
}

.hot-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    position: relative;
}

.hot-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hot-item .img-wrapper {
    position: relative;
    padding-top: 140%;
    overflow: hidden;
}

.hot-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hot-item:hover img {
    transform: scale(1.08);
}

.hot-item .info {
    padding: 15px;
}

.hot-item .title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 44px;
}

.hot-item .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
}

.hot-item .img-wrapper::before {
    content: attr(data-rank);
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
    font-weight: bold;
    padding: 5px 12px;
    border-radius: 20px;
    z-index: 1;
}

.pagelist {
    margin: 40px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 15px;
    max-width: 100%;
}

.pagelist .btn {
    min-width: 40px;
    height: 40px;
    line-height: 38px;
    padding: 0 15px;
    border-radius: 8px;
    background: white;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #eee;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    position: relative;
    overflow: hidden;
}

.pagelist .btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.pagelist .btn-c {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 500;
}

.pagelist .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 平板端优化 */
@media (max-width: 768px) {
    .pagelist {
        margin: 30px auto;
        gap: 6px;
    }

    .pagelist .btn {
        min-width: 36px;
        height: 36px;
        line-height: 34px;
        padding: 0 12px;
        font-size: 13px;
    }
    
    /* 隐藏部分页码，只显示当前页附近的 */
    .pagelist .btn:not(.btn-c):not(.next):not(.prev):not(:nth-child(-n+3)):not(:nth-last-child(-n+3)) {
        display: none;
    }
}

/* 手机端优化 */
@media (max-width: 480px) {
    .pagelist {
        margin: 20px auto;
        gap: 4px;
    }

    .pagelist .btn {
        min-width: 32px;
        height: 32px;
        line-height: 30px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 6px;
    }

    /* 极小屏幕下的精简显示 */
    .pagelist .btn:not(.btn-c):not(.next):not(.prev) {
        display: none;
    }

    .pagelist .btn.next,
    .pagelist .btn.prev {
        min-width: 60px;
    }
}

/* 添加活跃状态反馈 */
.pagelist .btn:active {
    transform: translateY(1px);
}

@media (max-width: 1200px) {
    .hot-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .hot-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 8px;
    }

    .channel-tabs {
        padding: 8px;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .channel-tabs::-webkit-scrollbar {
        display: none;
    }

    .channel-tab {
        padding: 6px 12px;
        font-size: 13px;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .current {
        padding: 10px;
        font-size: 13px;
        margin-bottom: 15px;
    }

    .hot-item {
        margin-bottom: 0;
    }

    .hot-item .info {
        padding: 10px;
    }

    .hot-item .title {
        font-size: 14px;
        height: auto;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
    }

    .hot-item .meta {
        font-size: 12px;
    }

    .hot-item .img-wrapper::before {
        font-size: 12px;
        padding: 4px 8px;
        top: 8px;
        left: 8px;
    }

    .pagelist {
        margin: 20px 0;
        padding: 0 8px;
    }

    .pagelist .btn {
        padding: 6px 10px;
        font-size: 12px;
        margin: 2px;
    }
}

@media (max-width: 480px) {
    .hot-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 5px;
    }

    .channel-tab {
        padding: 5px 10px;
        font-size: 12px;
    }

    .hot-item .img-wrapper {
        padding-top: 140%;
    }

    .hot-item .title {
        font-size: 13px;
        -webkit-line-clamp: 2;
        margin-bottom: 6px;
    }

    .hot-item .meta {
        font-size: 11px;
    }

    .current {
        padding: 8px;
        font-size: 12px;
    }

    .stats-right {
        display: none;
    }

    .pagelist .btn {
        padding: 5px 8px;
        font-size: 11px;
    }

    /* Hide some pagination elements on very small screens */
    .pagelist .btn:not(.btn-c):not(.next):not(.prev) {
        display: none;
    }
}

/* Add smooth transitions */
.hot-item, .channel-tab, .btn {
    transition: all 0.2s ease-in-out;
}

/* Improve touch targets */
@media (hover: none) {
    .channel-tab, .pagelist .btn {
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
} 