.currency-converter-page { min-height: 70vh; background: #f3f6f3; }
.converter-hero { position: relative; min-height: 270px; overflow: hidden; color: #fff; background: #071410; }
.converter-grid-lines { position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px); background-size: 46px 46px; mask-image: linear-gradient(90deg, #000, transparent 80%); }
.converter-glow { position: absolute; width: 360px; height: 360px; border-radius: 50%; filter: blur(1px); }
.converter-glow-one { top: -245px; right: 12%; background: radial-gradient(circle, rgba(54,211,153,.24), transparent 68%); }
.converter-glow-two { bottom: -290px; left: 7%; background: radial-gradient(circle, rgba(215,173,85,.16), transparent 68%); }
.converter-hero-inner { position: relative; z-index: 1; min-height: 270px; display: flex; align-items: center; justify-content: space-between; gap: 60px; padding-block: 38px; }
.converter-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid rgba(54,211,153,.23); border-radius: 999px; color: #a8dbc8; background: rgba(54,211,153,.07); font-size: .72rem; font-weight: 700; }
.converter-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #36d399; box-shadow: 0 0 0 5px rgba(54,211,153,.1); }
.converter-hero h1 { margin: 11px 0 8px; font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.17; letter-spacing: -.04em; }
.converter-hero h1 em { color: #e2bd6c; font-style: normal; }
.converter-hero p { max-width: 620px; margin: 0; color: #9eb0a9; font-size: .91rem; }
.converter-hero-stat { min-width: 205px; display: grid; justify-items: center; padding: 18px 24px; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(255,255,255,.045); backdrop-filter: blur(10px); }
.converter-hero-stat span { color: #a9bbb4; font-size: .68rem; }
.converter-hero-stat strong { color: #fff; font-size: 2.15rem; line-height: 1.35; }
.converter-hero-stat small { color: #71867d; font-size: .58rem; }

.converter-content { padding-block: 42px 78px; }
.converter-alert { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 11px 14px; border: 1px solid #efd5a0; border-radius: 11px; color: #74571b; background: #fff9eb; font-size: .74rem; }
.converter-alert span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 7px; color: #fff; background: #c6922f; font-weight: 800; }
.converter-alert p { margin: 0; }
.converter-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: stretch; gap: 18px; }
.converter-card, .currency-market-panel { border: 1px solid #dfe7e2; border-radius: 20px; background: #fff; box-shadow: 0 17px 50px rgba(7,20,16,.055); }
.converter-card { min-width: 0; padding: 24px; }
.converter-card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 1px solid #edf1ee; }
.converter-card-head span, .currency-market-panel header span, .popular-conversions header span, .converter-explainer > div span { color: #0b8f67; font-size: .65rem; font-weight: 750; }
.converter-card-head h2, .currency-market-panel h2, .popular-conversions h2, .converter-explainer h2 { margin: 2px 0 0; font-size: 1.08rem; font-weight: 800; }
.converter-refresh { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #dce5df; border-radius: 9px; color: #5f6e66; background: #fff; font-size: .68rem; cursor: pointer; }
.converter-refresh:hover { color: #087654; border-color: #a9cbbc; background: #f5fbf8; }
.converter-refresh svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.converter-refresh.loading svg { animation: spin .8s linear infinite; }

.converter-fields { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: end; gap: 13px; padding-top: 22px; }
.currency-field { min-width: 0; padding: 16px; border: 1px solid #e0e7e3; border-radius: 15px; background: #f9fbf9; }
.currency-field > label:first-child, .field-label { display: block; margin-bottom: 7px; color: #75827b; font-size: .64rem; }
.amount-input-wrap, .conversion-result { min-height: 54px; display: flex; align-items: center; gap: 9px; padding-bottom: 10px; border-bottom: 1px solid #e1e7e3; direction: ltr; }
.amount-input-wrap input { min-width: 0; width: 100%; padding: 0; border: 0; outline: 0; color: #071410; background: transparent; font-size: 1.65rem; font-weight: 800; direction: ltr; }
.amount-input-wrap span, .conversion-result span { flex: 0 0 auto; padding: 3px 7px; border-radius: 6px; color: #557068; background: #eaf0ec; font-size: .62rem; font-weight: 800; }
.conversion-result strong { min-width: 0; overflow: hidden; color: #087654; font-size: 1.65rem; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.currency-select-wrap { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px; margin-top: 12px; cursor: pointer; }
.currency-select-wrap select { position: absolute; inset: 0; z-index: 2; width: 100%; opacity: 0; cursor: pointer; }
.currency-select-wrap .currency-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #087654; background: #e1f6ed; direction: ltr; font-size: .65rem; font-weight: 800; }
.select-copy { min-width: 0; display: grid; line-height: 1.35; }
.select-copy small { color: #8b9791; font-size: .55rem; }
.select-copy b { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.currency-select-wrap > svg { width: 17px; fill: none; stroke: #839089; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.swap-currencies { width: 39px; height: 39px; display: grid; place-items: center; margin-bottom: 57px; padding: 0; border: 1px solid #cfe0d7; border-radius: 12px; color: #087654; background: #e6f7ef; cursor: pointer; transition: transform .2s, background .2s; }
.swap-currencies:hover { transform: rotate(180deg); background: #d5f2e5; }
.swap-currencies svg { width: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.amount-help { min-height: 19px; margin: 7px 2px 0; color: #8a9690; font-size: .59rem; }
.amount-help.error { color: #c43f4b; }

.conversion-summary { display: grid; grid-template-columns: 1fr 1fr auto; align-items: stretch; gap: 8px; margin-top: 15px; }
.conversion-summary > div { min-width: 0; display: grid; gap: 2px; padding: 9px 11px; border: 1px solid #edf1ee; border-radius: 10px; background: #fbfcfb; }
.conversion-summary small { color: #89958f; font-size: .56rem; }
.conversion-summary b { overflow: hidden; font-size: .67rem; direction: ltr; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.conversion-summary button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; border: 0; border-radius: 10px; color: #d9e7e1; background: #0b211a; font-size: .64rem; cursor: pointer; }
.conversion-summary button:hover { color: #fff; background: #123127; }
.conversion-summary button svg { width: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.converter-source { display: flex; align-items: center; gap: 12px; margin-top: 17px; padding-top: 13px; border-top: 1px dashed #dfe6e2; color: #86928c; font-size: .59rem; }
.converter-source > span:first-child { display: flex; align-items: center; gap: 6px; color: #397660; }
.converter-source i { width: 6px; height: 6px; border-radius: 50%; background: #36d399; box-shadow: 0 0 0 4px rgba(54,211,153,.1); }
.converter-source time { margin-right: auto; direction: ltr; }

.currency-market-panel { display: flex; flex-direction: column; padding: 20px; }
.currency-market-panel header { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 12px; }
.currency-market-panel header i { width: 9px; height: 9px; border-radius: 50%; background: #36d399; box-shadow: 0 0 0 6px rgba(54,211,153,.1); }
.currency-rate-list { display: grid; }
.currency-rate-list button { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 10px 0; border: 0; border-bottom: 1px solid #eef2ef; text-align: right; background: transparent; cursor: pointer; }
.currency-rate-list button:hover b { color: #0b8f67; }
.rate-symbol { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: #0a7d5a; background: #e7f7f0; direction: ltr; font-size: .57rem; font-weight: 800; }
.currency-rate-list button > span:nth-child(2) { min-width: 0; display: grid; line-height: 1.35; }
.currency-rate-list b { overflow: hidden; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; transition: color .15s; }
.currency-rate-list small { color: #96a09b; font-size: .52rem; }
.currency-rate-list strong { display: grid; justify-items: end; font-size: .68rem; white-space: nowrap; }
.currency-rate-list strong small { font-weight: 500; }
.currency-market-panel > p { margin: auto 0 0; padding-top: 14px; color: #89958f; font-size: .59rem; }

.popular-conversions { margin-top: 26px; }
.popular-conversions header { margin-bottom: 11px; }
.popular-conversions > div { display: grid; grid-template-columns: repeat(5,1fr); gap: 9px; }
.popular-conversions button { min-width: 0; display: grid; grid-template-columns: 1fr auto; gap: 1px 7px; padding: 12px 13px; border: 1px solid #dfe7e2; border-radius: 12px; text-align: right; background: #fff; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.popular-conversions button:hover { transform: translateY(-2px); border-color: #b8cec3; box-shadow: 0 10px 24px rgba(7,20,16,.05); }
.popular-conversions button[hidden] { display: none; }
.popular-conversions b { font-size: .72rem; }
.popular-conversions span { color: #88948e; font-size: .57rem; }
.popular-conversions i { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #0b8f67; font-style: normal; }
.converter-explainer { display: grid; grid-template-columns: 270px 1fr; gap: 12px 30px; margin-top: 46px; padding: 27px 30px; border: 1px solid #dce5df; border-radius: 17px; background: #edf3ef; }
.converter-explainer > div { grid-row: 1 / 3; }
.converter-explainer p { margin: 0; color: #65736c; font-size: .73rem; }
.converter-explainer .converter-disclaimer { padding-top: 9px; border-top: 1px solid #d5dfd9; color: #7e8983; font-size: .64rem; }

@media (max-width: 960px) {
  .converter-layout { grid-template-columns: 1fr; }
  .currency-market-panel { min-height: auto; }
  .currency-rate-list { grid-template-columns: 1fr 1fr; gap: 0 18px; }
  .popular-conversions > div { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 700px) {
  .converter-hero-inner { min-height: 285px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 20px; }
  .converter-hero-stat { min-width: 0; width: 100%; grid-template-columns: 1fr auto; justify-items: start; align-items: center; padding: 11px 14px; }
  .converter-hero-stat strong { grid-column: 2; grid-row: 1 / 3; font-size: 1.65rem; }
  .converter-content { padding-block: 24px 55px; }
  .converter-card { padding: 17px; border-radius: 16px; }
  .converter-card-head { align-items: flex-start; }
  .converter-refresh span { display: none; }
  .converter-refresh { width: 36px; height: 36px; justify-content: center; padding: 0; }
  .converter-fields { grid-template-columns: 1fr; }
  .swap-currencies { position: relative; z-index: 2; margin: -24px auto; transform: rotate(90deg); border: 4px solid #fff; }
  .swap-currencies:hover { transform: rotate(270deg); }
  .conversion-summary { grid-template-columns: 1fr 1fr; }
  .conversion-summary button { min-height: 39px; grid-column: 1 / -1; }
  .converter-source { align-items: flex-start; flex-wrap: wrap; }
  .converter-source time { margin-right: 0; margin-left: auto; }
  .currency-rate-list { grid-template-columns: 1fr; }
  .popular-conversions > div { display: flex; overflow-x: auto; padding-bottom: 7px; scrollbar-width: none; }
  .popular-conversions button { min-width: 145px; }
  .converter-explainer { grid-template-columns: 1fr; padding: 20px; }
  .converter-explainer > div { grid-row: auto; }
}

@media (max-width: 420px) {
  .page-shell { width: min(100% - 28px, 1180px); }
  .converter-hero h1 { font-size: 2.15rem; }
  .converter-hero p { font-size: .8rem; }
  .conversion-result strong, .amount-input-wrap input { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .swap-currencies, .popular-conversions button { transition: none; }
}
