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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', system-ui, sans-serif;
    background: #f8fafc;
    min-height: 100vh;
    color: #1e293b;
    line-height: 1.6;
}

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

header {
    text-align: center;
    margin-bottom: 48px;
    padding: 0 0 32px 0;
    border-bottom: 1px solid #e2e8f0;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    letter-spacing: -0.025em;
}

header p {
    color: #64748b;
    font-size: 1.125rem;
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

.rate-display {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
}

.rate-card {
    margin-bottom: 24px;
}

.rate-value {
    font-size: 3rem;
    font-weight: 800;
    color: #059669;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.rate-label {
    font-size: 1rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rate-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

.rate-detail {
    text-align: left;
}

.rate-detail span:first-child {
    display: block;
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rate-detail span:last-child {
    display: block;
    font-weight: 600;
    color: #0f172a;
    font-size: 1rem;
}

.converter {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.converter-section {
    flex: 1 1 40%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 150px;
    max-width: 50%;
}

.converter-section label {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.converter-section input {
    padding: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1.125rem;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: #f9fafb;
    font-variant-numeric: tabular-nums;
}

.converter-section input:focus {
    outline: none;
    border-color: #059669;
    background: white;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.currency-label {
    text-align: center;
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.converter-arrow {
    font-size: 1.5rem;
    color: #64748b;
    font-weight: 600;
    flex: 0 0 auto;
    width: 48px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-item {
    text-align: center;
    border-right: 1px solid #e2e8f0;
}

.stat-item:last-child {
    border-right: none;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #059669;
    margin-bottom: 8px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.fees-info {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.fees-info h3 {
    color: #0f172a;
    margin-bottom: 24px;
    text-align: left;
    font-size: 1.25rem;
    font-weight: 700;
}

.fee-breakdown {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.fee-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.fee-item:last-child {
    border-bottom: none;
}

.fee-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.fee-value {
    font-weight: 600;
    color: #0f172a;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.fee-note {
    background: #f1f5f9;
    padding: 16px;
    border-radius: 8px;
    margin: 0;
    text-align: left;
    color: #64748b;
    border-left: 3px solid #3b82f6;
    font-size: 0.875rem;
    line-height: 1.5;
}

footer {
    text-align: center;
    color: #64748b;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.875rem;
}

footer p {
    margin-bottom: 10px;
}

.chart-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-section h3 {
    color: #0f172a;
    margin-bottom: 24px;
    text-align: left;
    font-size: 1.25rem;
    font-weight: 700;
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 16px;
}

.chart-info {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
}

.error-message {
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-top: 16px;
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 24px 16px;
    }
    
    header h1 {
        font-size: 1.875rem;
    }
    
    .converter {
        flex-direction: column;
        gap: 20px;
        padding: 24px;
    }
    
    .converter-section {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .converter-arrow {
        transform: rotate(90deg);
        width: auto;
        font-size: 1.25rem;
    }
    
    .stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-item {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-bottom: 16px;
    }
    
    .stat-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .rate-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .rate-value {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 16px 12px;
    }
    
    .rate-display,
    .converter,
    .stats,
    .fees-info,
    .chart-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .chart-container {
        height: 300px;
    }
    
    .converter-section input {
        padding: 12px;
        font-size: 1rem;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .rate-value {
        font-size: 2rem;
    }
}