/* Enhanced Visitor Counter Styles */
.visitor-counter {
    display: flex;
    flex-direction: column;
    margin: 30px auto;
    padding: 20px 25px;
    border-radius: 10px;
    background: #1e1e1e;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border-left: 4px solid #FFA900;
    transition: all 0.3s ease;
    width: 100%; /* Take full width */
}

.visitor-counter:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Counter Header */
.counter-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 169, 0, 0.2);
    text-align: center;
}

.counter-icon {
    font-size: 28px;
    color: #FFA900;
    margin-right: 15px;
}

.counter-title {
    font-size: 24px;
    color: #FFA900;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Counter Metrics */
.counter-metrics {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.counter-metric {
    flex: 0 0 calc(33.333% - 20px);
    min-width: 180px;
    text-align: center;
    padding: 15px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.03);
    margin: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.counter-metric:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.counter-metric .counter-icon {
    font-size: 20px;
    margin-bottom: 10px;
    margin-right: 0;
    color: rgba(255, 255, 255, 0.6);
}

.counter-metric:nth-child(1) .counter-icon {
    color: #FFA900;
}

.counter-metric:nth-child(2) .counter-icon {
    color: #4CAF50;
}

.counter-metric:nth-child(3) .counter-icon {
    color: #03A9F4;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.total-value {
    color: #FFA900;
}

.unique-value {
    color: #4CAF50;
}

.duration-value {
    color: #03A9F4;
}

.metric-label {
    font-size: 12px;
    color: #808080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Chart Container */
.chart-container {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    height: 250px; /* Increased height for better proportions on full width */
    position: relative;
    max-width: 900px; /* Limit maximum width for very large screens */
    margin-left: auto;
    margin-right: auto;
}

.chart-legend {
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 5px;
}

.legend-label {
    font-size: 12px;
    color: #aaa;
}

/* Counter Footer */
.counter-footer {
    font-size: 11px;
    color: #666;
    text-align: right;
    margin-top: 5px;
}

.updated-time {
    font-style: italic;
}

/* Animation */
.counter-updated .metric-value {
    animation: counterPulse 1s ease;
}

@keyframes counterPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
        color: #ffffff;
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .visitor-counter {
        padding: 15px;
        margin: 20px auto;
    }
    
    .counter-title {
        font-size: 18px;
    }
    
    .counter-metrics {
        flex-direction: column;
        margin-bottom: 10px;
    }
    
    .counter-metric {
        margin: 5px 0;
        min-width: 100%;
        padding: 12px 10px;
    }
    
    .metric-value {
        font-size: 24px;
    }
    
    .chart-container {
        height: 200px;
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .chart-legend {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .legend-item {
        margin: 0 5px;
    }
}

@media (max-width: 480px) {
    .visitor-counter {
        padding: 12px;
    }
    
    .counter-header {
        flex-direction: column;
        text-align: center;
        padding-bottom: 10px;
        margin-bottom: 15px;
    }
    
    .counter-icon {
        margin-right: 0;
        margin-bottom: 5px;
        font-size: 24px;
    }
    
    .counter-title {
        font-size: 16px;
    }
    
    .metric-value {
        font-size: 22px;
    }
    
    .metric-label {
        font-size: 11px;
    }
    
    .chart-container {
        height: 150px;
        padding: 8px;
    }
    
    .legend-item {
        margin: 2px;
    }
    
    .legend-label {
        font-size: 10px;
    }
    
    .counter-footer {
        font-size: 9px;
    }
}