/* 仪表板页面样式 */

/* 统计卡片动画 */
.stat-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.2);
}

.stat-card .icon {
    transition: all 0.3s ease;
}

.stat-card:hover .icon {
    transform: scale(1.1);
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* 最近活动卡片对齐 */
.recent-activities {
    display: flex;
    align-items: stretch;
}

.recent-activities .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.recent-activities .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 600px;  /* 限制最大高度，超出时显示滚动条 */
}

.recent-activities .card-body > div {
    flex: 1;
}

/* 列表项样式调整，确保内容紧凑 */
.recent-activities .list-group-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #dee2e6;
}

.recent-activities .list-group-item:last-child {
    border-bottom: none;
}

/* 最近活动列表 */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.activity-item:hover {
    background-color: #f8f9fa;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.activity-icon.article {
    background-color: #e3f2fd;
    color: #1976d2;
}

.activity-icon.digest {
    background-color: #e8f5e8;
    color: #388e3c;
}

.activity-icon.rss {
    background-color: #fff3e0;
    color: #f57c00;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #333;
}

.activity-meta {
    font-size: 0.875rem;
    color: #666;
}

.activity-time {
    font-size: 0.75rem;
    color: #999;
    white-space: nowrap;
}

/* 系统状态指示器 */
.system-status {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 0.5rem;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.status-item:hover {
    border-color: #0d6efd;
    box-shadow: 0 0.25rem 0.5rem rgba(13, 110, 253, 0.1);
}

.status-indicator {
    margin-right: 1rem;
}

.status-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
    color: #333;
}

.status-info small {
    color: #666;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-card .number {
        font-size: 1.5rem;
    }
    
    .activity-item {
        padding: 0.5rem 0;
    }
    
    .activity-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
        margin-right: 0.75rem;
    }
    
    .system-status {
        grid-template-columns: 1fr;
    }
    
    /* 移动端取消卡片对齐 */
    .recent-activities {
        display: block;
    }
    
    .recent-activities .card {
        height: auto;
        display: block;
    }
    
    .recent-activities .card-body {
        flex: none;
        display: block;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* 加载状态 */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 120px;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.skeleton-text {
    height: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

/* 数据更新提示 */
.data-updated {
    position: relative;
}

.data-updated::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background-color: #28a745;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
