/**
 * 统计面板样式
 */

/* 统计面板模态框 */
.stats-modal-content {
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    background-color: #0f1623;
    color: #e2e8f0;
    border: 1px solid #2d3748;
}

.stats-modal-content h2 {
    color: #f7fafc;
    border-bottom: 1px solid #2d3748;
    padding-bottom: 10px;
    margin-top: 0;
}

.stats-modal-content .modal-close-btn {
    color: #a0aec0;
    background-color: transparent;
    border: none;
}

.stats-modal-content .modal-close-btn:hover {
    color: #f7fafc;
}

/* 空数据提示 */
.empty-list {
    text-align: center;
    padding: 20px 0;
    color: #a0aec0;
    font-style: italic;
}

/* 标签导航 */
.stats-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 1px solid #2d3748;
    padding-bottom: 10px;
    position: relative;
}

.stats-tab-btn {
    padding: 8px 15px;
    background-color: #1a202c;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    color: #a0aec0;
}

.stats-tab-btn:hover {
    background-color: #2d3748;
}

.stats-tab-btn.active {
    background-color: #3182ce;
    color: white;
}

.refresh-stats-btn {
    position: absolute;
    right: 0;
    padding: 8px 12px;
    background-color: transparent;
    border: 1px solid #2d3748;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    color: #a0aec0;
}

.refresh-stats-btn:hover {
    background-color: #2d3748;
}

/* 日期范围选择器 */
.date-range-selector {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.date-input-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.date-input-group label {
    font-size: 14px;
    color: #a0aec0;
}

.date-input-group input {
    padding: 8px;
    border: 1px solid #2d3748;
    border-radius: 4px;
    background-color: #171a23;
    color: #e2e8f0;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background-color: #171a23;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    border: 1px solid #2d3748;
}

.stats-card-title {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 5px;
}

.stats-card-value {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
    margin-bottom: 5px;
}

.stats-card-subtitle {
    font-size: 12px;
    color: #718096;
}

/* 图表容器 */
.stats-charts-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.stats-chart-wrapper {
    background-color: #171a23;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3748;
}

.stats-chart-wrapper h3 {
    margin-top: 0;
    font-size: 16px;
    color: #e2e8f0;
    margin-bottom: 15px;
}

.stats-chart-container {
    width: 100%;
    height: 400px;
    margin-top: 20px;
    background-color: #171a23;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3748;
}

/* 表格样式 */
.stats-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    background-color: #171a23;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3748;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    color: #e2e8f0;
}

.stats-table th,
.stats-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #2d3748;
}

.stats-table th {
    background-color: #1a202c;
    font-weight: 600;
    color: #a0aec0;
}

.stats-table tbody tr:hover {
    background-color: #1a202c;
}

/* 年份选择器 */
.stats-year-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-year-selector label {
    font-size: 14px;
    color: #a0aec0;
}

.stats-year-selector select {
    padding: 8px;
    border: 1px solid #2d3748;
    border-radius: 4px;
    background-color: #171a23;
    color: #e2e8f0;
}

/* 在线用户统计 */
.online-users-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.online-count-card {
    flex: 1;
    background-color: #171a23;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    margin: 0 10px;
    border: 1px solid #2d3748;
}

.online-count-card:first-child {
    margin-left: 0;
}

.online-count-card:last-child {
    margin-right: 0;
}

.online-count-card .card-label {
    font-size: 14px;
    color: #a0aec0;
    margin-bottom: 5px;
}

.online-count-card .card-value {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
}

/* 最活跃用户列表 */
.top-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.top-user-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #2d3748;
    align-items: center;
}

.top-user-item:last-child {
    border-bottom: none;
}

.top-user-name {
    font-weight: 500;
    color: #e2e8f0;
}

.top-user-count {
    background-color: #3182ce;
    color: white;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: bold;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .stats-charts-container {
        grid-template-columns: 1fr;
    }
    
    .stats-card {
        padding: 15px;
    }
    
    .stats-card-value {
        font-size: 24px;
    }
    
    .stats-modal-content {
        padding: 15px;
    }
}

/* 在线用户表格 */
.stats-table-container h3 {
    margin-top: 0;
    font-size: 16px;
    color: #e2e8f0;
    margin-bottom: 15px;
}

.stats-table tr.empty-row td {
    text-align: center;
    padding: 20px;
    color: #a0aec0;
}

.stats-table .loading-message {
    text-align: center;
    padding: 20px;
    color: #a0aec0;
    font-style: italic;
}

/* 确保内容区域在标签切换时保持一致高度 */
.stats-content {
    min-height: 400px;
} 