/* styles.css */

body {
    background-color: #f3f4f6;
    color: #111827;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.container {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

header {
    margin-bottom: 2rem;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    color: #2563eb;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #3b82f6;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #60a5fa;
}

#latest-data {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#latest-rate {
    font-size: 2.25rem;
    font-weight: 700;
    color: #059669;
}

#chart-section {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#chart {
    width: 100%;
    height: 16rem;
}

#filter {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

#year-select, #filter-button {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    border: 1px solid #d1d5db;
}

#year-select:focus, #filter-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

#filter-button {
    background-color: #3b82f6;
    color: white;
    transition: background-color 0.2s;
}

#filter-button:hover {
    background-color: #2563eb;
}

#content-areas {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.5rem;
}

.content-area {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    cursor: pointer;
    transition: box-shadow 0.2s;
}

.content-area:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.content-area.expanded {
    grid-column: 1 / -1;
}

.content-area p {
    margin-top: 0.5rem;
    color: #4b5563;
}

#error-message {
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    color: #b91c1c;
    padding: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 1.5rem;
    display: none;
}

footer {
    margin-top: 2rem;
    text-align: center;
    color: #6b7280;
}

@media (min-width: 640px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.875rem;
    }

    #latest-rate {
        font-size: 3rem;
    }

    #chart {
        height: 24rem;
    }

    #content-areas {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    #filter {
        flex-direction: column;
    }

    #year-select, #filter-button {
        width: 100%;
    }
}