/* Analytics Dashboard Styles */

.analytics-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.btn-export, .btn-reset, .btn-refresh {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(42, 82, 152, 0.2);
}

.btn-export:hover, .btn-reset:hover, .btn-refresh:hover {
    background: linear-gradient(135deg, #1e3c72 0%, #0f1c3a 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 82, 152, 0.3);
}

.btn-reset {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.btn-reset:hover {
    background: linear-gradient(135deg, #c82333 0%, #a71e2a 100%);
}

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-color: #2a5298;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 900;
    color: #2a5298;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.top-page-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
    transition: all 0.3s ease;
}

.top-page-item:hover {
    background: #f8f9fa;
    border-color: #2a5298;
}

.page-rank {
    background: #2a5298;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: bold;
    margin-right: 1rem;
    min-width: 40px;
    text-align: center;
}

.page-path {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.page-views {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

.browser-item {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.browser-name {
    width: 80px;
    font-weight: 600;
    color: #333;
}

.browser-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    margin: 0 1rem;
    overflow: hidden;
}

.browser-fill {
    height: 100%;
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.browser-count {
    color: #666;
    font-weight: 500;
    min-width: 40px;
    text-align: right;
}

.visitor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.visitor-item:hover {
    background: #f8f9fa;
    border-color: #2a5298;
}

.visitor-time {
    font-weight: 600;
    color: #2a5298;
    font-size: 0.9rem;
}

.visitor-info {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
}

.visitor-pages {
    font-weight: 500;
}

.visitor-referrer {
    color: #888;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.info-label {
    font-weight: 600;
    color: #333;
}

.info-value {
    color: #2a5298;
    font-weight: 500;
}

.no-data {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ddd;
}

/* Compact Stats Styles */
.compact-stats {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(42, 82, 152, 0.2);
}

.live-stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.live-stats-header h4 {
    color: white;
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.live-indicator {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.compact-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.compact-stat-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.compact-stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.compact-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 900;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.compact-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-actions {
        flex-direction: column;
    }
    
    .btn-export, .btn-reset, .btn-refresh {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .top-page-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .page-rank {
        align-self: flex-start;
    }
    
    .visitor-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .visitor-info {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .compact-stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .compact-stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .compact-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .compact-stat-number {
        font-size: 1.3rem;
    }
    
    .live-stats-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}