* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 15px;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #2c3e50;
}

.header p {
    font-size: 14px;
    color: #7f8c8d;
}

.counter-container {
    background-color: #3498db;
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.counter {
    font-size: 28px;
    font-weight: bold;
}

.map-container {
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-color: #e0e0e0;
    position: relative;
}

.stats-container {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    flex-grow: 1;
    max-height: 400px;
    overflow-y: auto;
}

.stats-container h2 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.country-list {
    list-style-type: none;
    background-color: white;
}

.country-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #000;
    color: #000;
}

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

.country-name {
    font-weight: normal;
    display: flex;
    align-items: center;
}

.country-flag {
    margin-right: 8px;
    font-size: 18px;
}

.country-count {
    font-weight: normal;
    font-size: 16px;
}

.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px 0;
    color: #7f8c8d;
    font-size: 14px;
}

.flash {
    animation: flash 0.5s ease-in-out;
}

@keyframes flash {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

/* Custom popup styling */
.country-popup {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.country-popup .popup-title {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
}

.country-popup .popup-flag {
    margin-right: 8px;
    font-size: 18px;
}

.country-popup .popup-births {
    font-size: 14px;
    color: #555;
}

/* Loading indicator */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #666;
}

.loading-spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid #3498db;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

/* Responsive adjustments */
@media (min-width: 768px) {
    .map-container {
        height: 400px;
    }
    
    .header h1 {
        font-size: 28px;
    }
    
    .counter {
        font-size: 32px;
    }
    
    .stats-container {
        max-height: 500px;
    }
}
