/* 数据分析标签页专用样式 */

/* 筛选器样式 */
#time-range {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
}

#time-range:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* 概览统计卡片样式 */
#data-overview {
    margin-bottom: 2rem;
}

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.overview-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.overview-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.overview-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.overview-icon {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.overview-icon.total-visits {
    background-color: rgba(54, 162, 235, 0.1);
    color: #36a2eb;
}

.overview-icon.click-count {
    background-color: rgba(255, 99, 132, 0.1);
    color: #ff6384;
}

.overview-icon.unique-domains {
    background-color: rgba(255, 206, 86, 0.1);
    color: #ffce56;
}

.overview-icon.active-clients {
    background-color: rgba(75, 192, 192, 0.1);
    color: #4bc0c0;
}

.overview-card-title {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.overview-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

/* 图表容器样式 */
.chart-section {
    margin-bottom: 3rem;
}

.chart-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.chart-section-title i {
    margin-right: 0.75rem;
    color: #4299e1;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.chart-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 1rem;
}

/* 图表画布容器 */
.canvas-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* 响应式图表容器 */
@media (max-width: 768px) {
    .canvas-container {
        height: 300px;
    }
    
    .overview-cards {
        grid-template-columns: 1fr;
    }
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
}

.stats-table thead {
    background-color: #f7fafc;
}

.stats-table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 1px solid #e2e8f0;
}

.stats-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    color: #2d3748;
}

.stats-table tbody tr:hover {
    background-color: #f7fafc;
}

/* 网格布局 */
.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

/* 加载状态样式 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    z-index: 10;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 数据可视化展示介绍 */
.data-intro {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.data-intro h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
}

.data-intro p {
    color: #666;
    margin-top: 0.5rem;
}

/* 分页组件响应式样式 */
.flex-1.flex.items-center.justify-between {
    flex-wrap: wrap;
    gap: 12px;
}

/* 小屏幕响应式调整 */
@media (max-width: 768px) {
    .flex-1.flex.items-center.justify-between {
        flex-direction: column;
        align-items: center;
    }
    
    .flex-1.flex.items-center.justify-between > div {
        width: 100%;
        text-align: center;
    }
    
    .inline-flex {
        justify-content: center;
    }
}

/* 超小屏幕进一步调整 */
@media (max-width: 480px) {
    .flex-1.flex.items-center.justify-between {
        gap: 8px;
    }
    
    .w-8.h-8 {
        width: 24px;
        height: 24px;
        font-size: 10px;
    }
}