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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    color: #f7931a;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(247, 147, 26, 0.3);
}

.logo h1 {
    color: #f7931a;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover {
    color: #f7931a;
}

/* Main Content */
.main {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.converter-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Breadcrumb */
.breadcrumb {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumb span {
    margin: 0 0.5rem;
}

/* Converter Header */
.converter-header {
    text-align: center;
    margin-bottom: 2rem;
}

#main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

#subtitle {
    color: #666;
    font-size: 1.1rem;
}

/* Converter Card */
.converter-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.input-section {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

#amount-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
}

#amount-input:focus {
    outline: none;
    border-color: #f7931a;
}

.currency-selectors {
    display: flex;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.currency-select {
    flex: 1;
    min-width: 200px;
}

.currency-select label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
}

.currency-select select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.swap-btn {
    background: #f7931a;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s;
    flex-shrink: 0;
}

.swap-btn:hover {
    background: #e8851f;
    transform: rotate(180deg);
}

/* Result Section */
.result-section {
    text-align: center;
}

.conversion-result {
    background: linear-gradient(135deg, #f7931a, #ff6b35);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.result-amount {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.exchange-rate {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.last-updated {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.realtime-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffc107; /* Yellow for loading */
    transition: background-color 0.5s;
}

.status-indicator.live {
    background-color: #28a745; /* Green for live */
}

.status-indicator.error {
    background-color: #dc3545; /* Red for error */
}

.refresh-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: transform 0.3s;
}

.refresh-btn:hover {
    transform: rotate(180deg);
}

.next-update {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Market Info */
.market-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.market-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.stat-value.positive {
    color: #28a745;
}

.stat-value.negative {
    color: #dc3545;
}

/* Popular Amounts */
.popular-amounts {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem; /* Added margin */
}

.popular-amounts h3 {
    margin-bottom: 1rem;
    color: #333;
}

.amount-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.amount-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: white;
    color: #f7931a;
    text-decoration: none;
    border-radius: 20px;
    border: 2px solid #f7931a;
    transition: all 0.3s;
    font-weight: 500;
}

.amount-link:hover {
    background: #f7931a;
    color: white;
}

/* Conversion Tables */
.conversion-tables-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.conversion-table {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.conversion-table h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.table-body .table-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid #e9ecef;
}

.table-body .table-row:last-child {
    border-bottom: none;
}

.table-body .table-row:nth-child(odd) {
    background-color: #f8f9fa;
}

.table-from {
    font-weight: 500;
    color: #333;
}

.table-to {
    font-weight: 500;
    color: #007bff;
}


/* Footer */
.footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer p {
    margin-bottom: 0.5rem;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    #main-title {
        font-size: 2rem;
    }

    .currency-selectors {
        flex-direction: column;
    }

    .swap-btn {
        align-self: center;
        transform: rotate(90deg);
    }

    .result-amount {
        font-size: 2rem;
    }

    .market-stats {
        grid-template-columns: 1fr;
    }

    .conversion-tables-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .converter-section {
        padding: 1.5rem;
    }

    .converter-card {
        padding: 1.5rem;
    }

    #main-title {
        font-size: 1.5rem;
    }

    .result-amount {
        font-size: 1.8rem;
    }
}