:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-color: #38bdf8;
    --border-color: #334155;
    --success-color: #4ade80;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 800px;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent-color), #818cf8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Cards */
section {
    background-color: var(--card-bg);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.date-badge {
    background-color: rgba(56, 189, 248, 0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Rates Grid */
.rates-grid {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 0.5rem;
}

.rate-item {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.03);
    padding: 0.75rem;
    border-radius: 0.75rem;
    text-align: center;
    transition: transform 0.2s, background-color 0.2s;
}

.rate-item:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.05);
}

.rate-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rate-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rate-unit {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-left: 0.1rem;
}

/* Chart */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Footer */
footer {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 2rem;
}

/* Skeleton Loading */
.skeleton {
    height: 80px;
    background: linear-gradient(90deg, var(--card-bg) 25%, var(--border-color) 50%, var(--card-bg) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .rate-item {
        padding: 0.5rem;
    }

    .rate-value {
        font-size: 1.25rem;
    }

    .rate-label {
        font-size: 0.75rem;
    }

    .rates-grid {
        flex-wrap: wrap;
    }

    .rate-item {
        flex-basis: 45%;
        flex-grow: 1;
    }
}

/* Chart Controls */
.chart-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.range-btn {
    background: transparent;
    border: 1px solid #334155;
    color: #94a3b8;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.range-btn:hover {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

.range-btn.active {
    background: #38bdf8;
    color: #0f172a;
    border-color: #38bdf8;
}