body {
    font-family: 'Arial', sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

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

.header h1 {
    color: #333;
    margin-bottom: 10px;
}

.main-tabs {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-bottom: 20px;
}

.main-tab-btn {
    background: #374151;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.2s;
    min-width: 80px;
}

.main-tab-btn:hover {
    background: #4b5563;
}

.main-tab-btn.active {
    background: #2563eb;
}

.navigation {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.nav-btn {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s;
}

.nav-btn:hover {
    background: #1d4ed8;
}

.nav-btn.active {
    background: #1e40af;
    font-weight: bold;
}

.last-update {
    color: #666;
    font-size: 14px;
    margin: 10px 0;
    font-weight: 500;
}

.last-update::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 8px;
    background-color: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.rate-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
}

.rate-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.currency-info {
    display: flex;
    align-items: center;
}

.currency-flag {
    width: 24px;
    height: 18px;
    margin-right: 10px;
    border-radius: 2px;
}

.currency-name {
    font-weight: bold;
    color: #333;
}

.rate-value {
    font-size: 18px;
    font-weight: bold;
    color: #2563eb;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Add error styling */
.error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.error {
    text-align: center;
    padding: 40px;
    color: #dc2626;
    background: #fef2f2;
    border-radius: 8px;
    margin: 20px 0;
}

.refresh-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    margin: 20px auto;
    display: block;
}

.refresh-btn:hover {
    background: #059669;
}

.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #1e40af;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.main-tab {
    display: none;
}

.main-tab.active {
    display: block;
}

.page-title {
    text-align: center;
    color: #374151;
    margin: 20px 0;
    font-size: 20px;
}
