/* CSS files add styling rules to your content */

body {
    font-family: "Benton Sans", "Helvetica Neue", helvetica, arial, sans-serif;
    margin: 2em auto;
    text-align: center;
    max-width: 1200px;
}

h1 {
    font-style: italic;
    color: #373fff;
    font-size: 2.5em;
}

p {
    font-size: 1.1em;
    margin-bottom: 2em;
}

.footer {
    margin-top: 60px;
}

.shareLink {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1vw;
    padding: 1vw;
}

.shareLink a {
    text-align: center;
    padding: 0.8vw 1.5vw; /* Reduced padding to fit text */
    margin: 0.5vw 0;
    text-decoration: none;
    font-size: 1em; /* Reduced for better fit */
    background-color: #373fff;
    color: white;
    border-radius: 8px;
    transition: background-color 0.3s, transform 0.2s;
    box-sizing: border-box;
    min-width: 110px; /* Adjusted for longest text */
    max-width: 180px; /* Increased to accommodate longer labels */
    flex: 1 1 auto;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: normal; /* Allows text to wrap if needed */
    line-height: 1.2; /* Improves text alignment */
    text-overflow: ellipsis; /* Truncates with ellipsis if still too long */
    overflow: hidden; /* Prevents overflow */
}

.shareLink a:hover {
    background-color: #2a2fd1;
    transform: translateY(-2px);
}

#source {
    text-align: right;
    display: block;
    background-color: transparent;
    color: #373fff;
    font-size: 1em;
}

#myChart {
    max-height: 500px;
}

.language-toggle {
    margin-bottom: 1em;
    text-align: right;
}

.lang-btn {
    padding: 8px 16px;
    margin: 0 5px;
    border: 1px solid #373fff;
    background-color: #fff;
    color: #373fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s, color 0.3s;
}

.lang-btn.active, .lang-btn:hover {
    background-color: #373fff;
    color: white;
}

.year-input {
    margin: 1em 0;
}

.year-input label {
    font-size: 1.1em;
    margin-right: 10px;
}

.year-input input {
    padding: 8px;
    font-size: 1em;
    border: 1px solid #373fff;
    border-radius: 5px;
    width: 100px;
}

.year-input button {
    padding: 8px 16px;
    margin-left: 10px;
    background-color: #373fff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.year-input button:hover {
    background-color: #2a2fd1;
}

#year-result {
    margin-top: 1em;
    font-weight: bold;
}

/* Media query for mobile devices (below 480px) */
@media (max-width: 480px) {
    .shareLink {
        gap: 2vw;
        padding: 2vw;
    }
    .shareLink a {
        padding: 2vw 3vw; /* Adjusted for mobile touch targets */
        font-size: 0.9em; /* Slightly smaller for mobile */
        min-width: 90px; /* Reduced but sufficient */
        max-width: 160px; /* Increased for longer text */
        margin: 1vw 0;
        line-height: 1.3; /* Adjusted for mobile text fit */
    }
}