/* General Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    margin: 0;
    font-size: 2rem;
}

header p {
    margin: 0.5rem 0 0;
}

/* Chart Container */
.chart-container {
    width: 80%;
    margin: 0 auto 2rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    text-align: center; /* Center-align all child elements */
}

.chart-container h2 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-align: center; /* Ensure text is centered */
    line-height: 1.2; /* Adjust line height for better spacing */
}

.chart-container p {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: #666;
    text-align: center; /* Explicitly center-align descriptions */
    line-height: 1.4; /* Better readability */
}


canvas {
    display: block;
    margin: 0 auto;
}

/* Universal Country Key */
#universal-country-key {
    margin: 1rem auto;
    padding: 1rem;
    width: 80%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#universal-country-key h2 {
    text-align: center;
    margin-bottom: 1rem;
}

#universal-country-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

#universal-country-list li {
    margin: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

#universal-country-list li:hover {
    background-color: #f0f0f0;
    transform: scale(1.05);
}

#universal-country-list li.active {
    text-decoration: line-through;
    color: #bbb;
}

/* Footer */
footer {
    text-align: center;
    background-color: #333;
    color: #fff;
    padding: 1rem 0;
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Media Queries */
@media (max-width: 768px) {
    .chart-container {
        width: 95%;
    }

    #universal-country-key {
        width: 95%;
    }
}
