.visitor-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
    border: 1px solid rgba(102, 126, 234, 0.6);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.visitor-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
}

.visitor-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.visitor-badge:hover::before {
    left: 100%;
}

#visitorCount {
    font-weight: 700;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease;
}

.visitor-badge svg {
    width: 16px;
    height: 16px;
}

/* Visitor counter animation */
@keyframes countUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.visitor-count-animate {
    animation: countUp 0.3s ease;
}

/* Pulse effect for new visitors */
@keyframes pulse {
    0% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2); }
    50% { box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4); }
    100% { box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2); }
}

.visitor-badge.new-visitor {
    animation: pulse 2s ease-in-out 3;
}

/* Visitor stats tooltip */
.visitor-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.visitor-badge:hover .visitor-tooltip {
    opacity: 1;
}

@media (max-width: 768px) {
    .visitor-badge {
        font-size: 0.8rem;
        padding: 0.2rem 0.6rem;
    }
    
    .visitor-badge svg {
        width: 14px;
        height: 14px;
    }
    
    .visitor-tooltip {
        font-size: 0.7rem;
        padding: 0.4rem;
    }
}

@media (max-width: 480px) {
    .visitor-badge {
        font-size: 0.75rem;
        padding: 0.15rem 0.5rem;
    }
    
    .visitor-badge svg {
        width: 12px;
        height: 12px;
    }
    
    .visitor-tooltip {
        font-size: 0.65rem;
        padding: 0.3rem;
    }
}

/* Visitor Statistics Modal */
.visitor-stats-modal {
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.visitor-stats-modal .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.visitor-stats-modal .stat-item {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border-radius: 0.5rem;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.visitor-stats-modal .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.25rem;
}

.visitor-stats-modal .stat-label {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
}

.chart-container {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    height: 120px;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.chart-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar {
    width: 100%;
    background: linear-gradient(to top, #667eea, #764ba2);
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    margin-bottom: auto;
}

.bar-label {
    font-size: 0.75rem;
    color: #666;
    margin-top: 0.25rem;
}

.page-list {
    background: #f8f9fa;
    border-radius: 0.5rem;
    overflow: hidden;
}

.page-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
}

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

.page-name {
    font-weight: 500;
    color: #333;
}

.page-views {
    font-weight: 600;
    color: #667eea;
}