/* ========================================
   Visitor Counter Styles
   ======================================== */

.visitor-counter-section {
    margin-bottom: 20px;
}

/* Main Counter Card */
.main-counter-card {
    background: var(--primary-color);
    border-radius: 20px;
    padding: 50px 30px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.main-counter-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 70%
    );
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.counter-icon {
    font-size: 60px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.counter-value {
    font-size: 72px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 15px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.counter-label {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats Cards */
.stat-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: var(--primary-color);
    color: #ffffff;
}

.stat-card:nth-child(2) .stat-icon {
    background: var(--primary-color);
    color: #ffffff;
}

.stat-card:nth-child(3) .stat-icon {
    background: var(--primary-color);
    color: #ffffff;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Geolocation Cards */
.geo-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
}

.geo-card h5 {
    color: #2d3748;
    font-weight: 600;
    font-size: 18px;
}

/* Country List */
.country-list {
    max-height: 400px;
    overflow-y: auto;
}

.country-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: #f7fafc;
    transition: all 0.3s ease;
}

.country-item:hover {
    background: #edf2f7;
    transform: translateX(5px);
}

.country-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.country-flag {
    font-size: 32px;
    line-height: 1;
}

.country-name {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.country-count {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.country-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-top: 8px;
    overflow: hidden;
}

.country-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
    transition: width 1s ease;
}

/* World Map Container */
.world-map-container {
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
}

#geoChart {
    max-height: 360px;
}

/* Scrollbar Styling */
.country-list::-webkit-scrollbar {
    width: 6px;
}

.country-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.country-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.country-list::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Responsive Design */
@media (max-width: 991px) {
    .counter-value {
        font-size: 56px;
    }

    .counter-label {
        font-size: 18px;
    }

    .stat-value {
        font-size: 28px;
    }

    .world-map-container {
        height: 300px;
    }
}

@media (max-width: 767px) {
    .visitor-counter-section {
        padding: 40px 0;
    }

    .main-counter-card {
        padding: 40px 20px;
    }

    .counter-value {
        font-size: 48px;
    }

    .counter-label {
        font-size: 16px;
    }

    .counter-icon {
        font-size: 48px;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .geo-card {
        padding: 20px;
    }

    .country-list {
        max-height: 300px;
    }

    .world-map-container {
        height: 250px;
    }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .visitor-counter-section {
        /* background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); */
    }

    .stat-card,
    .geo-card {
        background: #2d3748;
    }

    .stat-value,
    .geo-card h5,
    .country-name {
        color: #e2e8f0;
    }

    .stat-label {
        color: #a0aec0;
    }

    .country-item {
        background: #1a202c;
    }

    .country-item:hover {
        background: #4a5568;
    }

    .world-map-container {
        background: #1a202c;
    }
}

/* Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Animation for stats on load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card,
.geo-card {
    animation: fadeInUp 0.6s ease-out;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}
