/* Visitor Counter Styles */
.visitor-stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 3rem 2rem;
    margin: 3rem auto;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    max-width: 1200px;
    position: relative;
    overflow: hidden;
}

.visitor-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.visitor-stats-section h4 {
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
    font-weight: 300;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2rem;
    position: relative;
    z-index: 1;
}

.visitor-stats-section h4 i {
    margin-right: 15px;
    font-size: 2.5rem;
}

.visitor-cards-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.visitor-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 200px;
    flex: 1;
    max-width: 250px;
}

.visitor-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    background: rgba(255, 255, 255, 1);
}

.visitor-card .card-body {
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
}

.visitor-card .fa-2x {
    transition: all 0.4s ease;
    margin-bottom: 1rem;
    display: block;
}

.visitor-card:hover .fa-2x {
    transform: scale(1.15) rotate(5deg);
}

.visitor-count {
    font-size: 2.8rem;
    font-weight: 800;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
    display: block;
}

.visitor-label {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666 !important;
    margin: 0;
}

/* Chart container */
.hourly-chart-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 2rem auto;
    max-width: 900px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hourly-chart-container .card-header {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    padding: 1.5rem 2rem;
    text-align: center;
}

.hourly-chart-container .card-header h5 {
    margin: 0;
    font-weight: 500;
    color: white;
    font-size: 1.3rem;
    letter-spacing: 1px;
}

.hourly-chart-container .card-header i {
    margin-right: 10px;
    font-size: 1.5rem;
}

.hourly-chart-container .card-body {
    padding: 2rem;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Refresh button */
.refresh-btn {
    transition: all 0.3s ease;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.refresh-btn:hover {
    transform: rotate(180deg);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.refresh-btn:active {
    transform: scale(0.95);
}

/* Status section */
.visitor-status {
    text-align: center;
    margin-top: 2rem;
    position: relative;
    z-index: 1;
}

.visitor-status small {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 400;
}

.visitor-status i {
    margin-right: 8px;
    opacity: 0.8;
}

/* Loading animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animation for number updates */
.count-update {
    animation: countPulse 0.6s ease-in-out;
}

@keyframes countPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* Status indicators */
.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #28a745;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.5);
}

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

/* Chart customization */
#hourlyChart {
    max-height: 300px;
    width: 100% !important;
}

/* Tooltip customization */
.chartjs-tooltip {
    background: rgba(0,0,0,0.9);
    color: white;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .visitor-stats-section {
        margin: 2rem 1rem;
        padding: 2rem 1.5rem;
    }
    
    .visitor-cards-container {
        gap: 1rem;
    }
    
    .visitor-card {
        min-width: 180px;
        max-width: 220px;
    }
}

@media (max-width: 768px) {
    .visitor-stats-section {
        padding: 1.5rem 1rem;
        margin: 1rem 0.5rem;
        border-radius: 15px;
    }
    
    .visitor-stats-section h4 {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }
    
    .visitor-cards-container {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .visitor-card {
        min-width: 100%;
        max-width: 300px;
    }
    
    .visitor-card .card-body {
        padding: 1.5rem 1rem;
    }
    
    .visitor-count {
        font-size: 2.2rem;
    }
    
    .hourly-chart-container .card-body {
        min-height: 250px;
        padding: 1rem;
    }
    
    .hourly-chart-container .card-header {
        padding: 1rem;
    }
    
    .hourly-chart-container .card-header h5 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .visitor-stats-section {
        padding: 1rem 0.5rem;
        margin: 0.5rem;
    }
    
    .visitor-stats-section h4 {
        font-size: 1.5rem;
    }
    
    .visitor-count {
        font-size: 2rem;
    }
    
    .visitor-label {
        font-size: 0.8rem;
    }
}

/* Additional decorative elements */
.visitor-stats-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
} 