:root {
  --bg: #f9f7f2;
  --header: #1a4d2e;
  --text: #222;
  --muted: #6b6b6b;

  --card: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  --old-bg: #fde9ea;
  --old-br: rgba(226, 107, 107, 0.55);

  --new-bg: #e9f7ee;
  --new-br: rgba(73, 165, 107, 0.55);

  --line: #2e7d4f;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Arial, sans-serif;
}

/* Skip link (accessibility) */
.skip-link {
  position: absolute;
  top: -50px;
  right: 12px;
  background: #fff;
  color: var(--header);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  font-weight: 900;
  z-index: 9999;
}

.skip-link:focus {
  top: 12px;
}

.header {
  background: var(--header);
  color: #fff;
  padding: 18px 16px;
}

.header-inner {
  max-width: 920px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}

.logo {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.brand-text p {
  margin: 6px 0 0;
  font-size: 14px;
  opacity: 0.9;
}

.container {
  max-width: 920px;
  margin: 18px auto 44px;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0, 0, 0, 0.05);
  padding: 18px 16px;
}

.converter .field label {
  display: block;
  font-weight: 800;
  margin-bottom: 10px;
  font-size: 14px;
  color: #2a2a2a;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 14px;
  padding: 12px 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  position: relative;
}

.input-row::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 2px;
  background: var(--line);
  opacity: 0.9;
  border-radius: 2px;
}

.currency {
  color: var(--muted);
  font-weight: 800;
  font-size: 14px;
  min-width: 40px;
  text-align: center;
}

.amount-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 28px;
  font-weight: 800;
  padding: 6px 0 10px;
  background: transparent;
  direction: ltr;
  text-align: right;
}

.amount-input::placeholder {
  color: rgba(0, 0, 0, 0.25);
  font-weight: 800;
}

.note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}

/* NEW: options row */
.options {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
}

.option {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 220px;
}

.option-label {
  font-weight: 900;
  font-size: 13px;
  color: #2a2a2a;
}

.select {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  background: #fff;
  outline: none;
}

.trust-pill {
  font-size: 12px;
  font-weight: 900;
  color: #2a2a2a;
  background: rgba(26, 77, 46, 0.08);
  border: 1px solid rgba(26, 77, 46, 0.14);
  padding: 10px 12px;
  border-radius: 12px;
}

.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.result-box {
  border-radius: 16px;
  padding: 14px;
  border: 2px solid transparent;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-title {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.65);
  font-weight: 800;
  margin-bottom: 8px;
}

.result-value {
  font-size: 22px;
  font-weight: 900;
  direction: ltr;
  text-align: right;
}

.result-box.old {
  background: var(--old-bg);
  border-color: var(--old-br);
}

.result-box.now {
  background: var(--new-bg);
  border-color: var(--new-br);
}

/* NEW: remainder */
.remainder {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(0, 0, 0, 0.18);
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
}

.remainder-title {
  font-weight: 900;
  color: #333;
}

.remainder-value {
  font-weight: 900;
  direction: ltr;
  text-align: right;
  color: #111;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  background: var(--header);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn:active {
  transform: translateY(1px);
}

.btn-outline {
  background: transparent;
  color: var(--header);
  border: 2px solid rgba(26, 77, 46, 0.35);
}

.tiny {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 900;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.disclaimer {
  margin-top: 14px;
  padding: 12px 12px;
  background: rgba(26, 77, 46, 0.06);
  border: 1px solid rgba(26, 77, 46, 0.12);
  border-radius: 14px;
  font-size: 13px;
  color: #2a2a2a;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding-bottom: 8px;
}

@media (max-width: 720px) {
  .results {
    grid-template-columns: 1fr;
  }

  .option {
    min-width: 100%;
  }
}

@media (max-width: 520px) {
  .amount-input {
    font-size: 26px;
  }

  .footer-wrap {
    gap: 10px;
  }
}

/* Replace SVG with image */
.eagle-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.25));
}

/* Breakdown list (payment method) */
.breakdown {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.break-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.break-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.note-thumb {
  width: 120px;
  height: 64px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid rgba(0, 0, 0, 0.05);
  object-fit: contain;
  padding: 6px;
}

.break-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.break-title {
  font-weight: 900;
  font-size: 14px;
}

.break-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.break-count {
  font-weight: 900;
  font-size: 14px;
  color: #1f1f1f;
  background: rgba(26, 77, 46, 0.08);
  border: 1px solid rgba(26, 77, 46, 0.12);
  padding: 8px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.placeholder {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
  background: rgba(0, 0, 0, 0.03);
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  padding: 16px;
}

.footer-link {
  color: var(--header);
  font-weight: 900;
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

.footer-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.footer-social {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}

.linkedin-link {
  color: #0A66C2;
  font-weight: 900;
  text-decoration: none;
}

.linkedin-link:hover {
  text-decoration: underline;
}

/* QR Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 9999;
}

.modal.is-open {
  display: flex;
}

.modal-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: rgba(26, 77, 46, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-title {
  font-weight: 900;
}

.modal-close {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  color: #333;
}

.modal-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.qr-img {
  width: 260px;
  height: 260px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 10px;
  object-fit: contain;
}

.modal-url {
  font-size: 12px;
  color: var(--muted);
  direction: ltr;
  text-align: center;
  word-break: break-all;
}

.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}