.converter-container { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); max-width: 400px; margin: auto; text-align: center; } h2 { color: #333; } input { width: 100%; padding: 10px; margin: 10px 0; border: 1px solid #ccc; border-radius: 5px; font-size: 16px; } button { background: #28a745; color: #fff; padding: 10px; border: none; width: 100%; font-size: 16px; border-radius: 5px; cursor: pointer; } button:hover { background: #218838; } .result { margin-top: 15px; font-size: 18px; font-weight: bold; color: #000; } Rupee to Taka Converter Convert async function convertCurrency() { const rupeeAmount = document.getElementById('rupeeAmount').value; if (!rupeeAmount) { alert('Please enter an amount in INR.'); return; } try { const response = await fetch('https://api.exchangerate-api.com/v4/latest/INR'); const data = await response.json(); const rate = data.rates.BDT; const takaAmount = (rupeeAmount * rate).toFixed(2); document.getElementById('result').innerText = `${rupeeAmount} INR = ${takaAmount} BDT`; } catch (error) { document.getElementById('result').innerText = 'Conversion failed. Please try again.'; } }