/* PostViews 插件样式 */

/* 热门文章列表样式 */
.hot-posts-widget .widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hot-posts-widget .hot-post-item {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.hot-posts-widget .hot-post-item:hover {
    background-color: rgba(0, 124, 186, 0.05);
}

.hot-posts-widget .hot-post-item:last-child {
    border-bottom: none;
}

.hot-posts-widget .postviews-rank {
    width: 24px;
    height: 24px;
    background: #f8f9fa;
    color: #666;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    margin-right: 12px;
    flex-shrink: 0;
}

.hot-posts-widget .hot-post-item.rank-1 .postviews-rank {
    background: #ff6b6b;
    color: white;
}

.hot-posts-widget .hot-post-item.rank-2 .postviews-rank {
    background: #4ecdc4;
    color: white;
}

.hot-posts-widget .hot-post-item.rank-3 .postviews-rank {
    background: #45b7d1;
    color: white;
}

.hot-posts-widget .postviews-info {
    flex: 1;
    min-width: 0;
}

.hot-posts-widget .postviews-title {
    color: #333;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    display: block;
    margin-bottom: 4px;
    word-break: break-word;
}

.hot-posts-widget .postviews-title:hover {
    color: #007cba;
}

.hot-posts-widget .postviews-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 8px;
}

.hot-posts-widget .postviews-views {
    color: #28a745;
    font-weight: 500;
}

.hot-posts-widget .postviews-date {
    color: #6c757d;
}

/* 文章页面访问量显示 */
.postviews-display {
    color: #999;
    font-size: inherit;
    text-decoration: none;
}

.postviews-display:hover {
    color: #444;
}

/* 热门文章标题样式 */
.hot-posts-widget .widget-title {
    position: relative;
    padding-left: 20px;
}

.hot-posts-widget .widget-title::before {
    content: "🔥";
    position: absolute;
    left: 0;
    top: 0;
}

/* 时间范围选择器 */
.hot-posts-widget .time-range-selector {
    margin-bottom: 15px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.hot-posts-widget .time-range-btn {
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.hot-posts-widget .time-range-btn:hover,
.hot-posts-widget .time-range-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .hot-posts-widget .hot-post-item {
        padding: 10px 0;
    }
    
    .hot-posts-widget .postviews-rank {
        width: 20px;
        height: 20px;
        font-size: 11px;
        margin-right: 8px;
    }
    
    .hot-posts-widget .postviews-title {
        font-size: 13px;
    }
    
    .hot-posts-widget .postviews-meta {
        font-size: 11px;
    }
}

/* 后台样式增强 */
.postviews-admin {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    border-left: 4px solid #007cba;
}

.stats-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.stats-card .number {
    font-size: 28px;
    font-weight: bold;
    color: #007cba;
    margin: 0;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-controls {
    margin-bottom: 20px;
}

.chart-controls button {
    margin-right: 10px;
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-controls button:hover,
.chart-controls button.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}
