body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #dbe2ee;
  color: #20232a;
}

header {
  background: #283e78;
  color: #ffffff;
  padding: 1.5rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

header p {
  font-size: 0.95rem;
  opacity: 0.9;
}

a {
  text-decoration: none;
  color: #ffffff;
}

a:hover {
  text-decoration: underline;
}

main {
  max-width: 480px;
  margin: 2.5rem auto;
  padding: 0 1rem;
}

/* ── Card ── */
.card {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.top-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.rate-label {
  font-size: 10.5px;
  font-weight: 600;
  color: #5a6272;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 4px;
}

.rate-big {
  font-size: 28px;
  font-weight: 700;
  color: #20232a;
  line-height: 1;
  font-family: 'Courier New', monospace;
}

.rate-sub {
  font-size: 12px;
  color: #5a6272;
  margin-top: 5px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #eef1f8;
  border: 1px solid #c8d0e0;
  border-radius: 20px;
  padding: 4px 11px;
  font-size: 11px;
  color: #283e78;
  font-weight: 600;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3a9e5f;
  flex-shrink: 0;
}

.bulletin {
  font-size: 11px;
  color: #5a6272;
  text-align: right;
}

.divider {
  border: none;
  border-top: 1px solid #e4e8f0;
  margin: 1.1rem 0;
}

/* ── Currency rows ── */
.currency-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag {
  font-size: 22px;
  width: 30px;
  text-align: center;
}

.cinfo { flex: 1; }

.cname {
  font-size: 13.5px;
  font-weight: 600;
  color: #20232a;
}

.ccode {
  font-size: 11px;
  color: #5a6272;
  margin-top: 1px;
}

.inp {
  width: 130px;
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  border: 1.5px solid #c8d0e0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #f4f6fb;
  color: #20232a;
  font-family: 'Courier New', monospace;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.inp:focus {
  border-color: #283e78;
  box-shadow: 0 0 0 3px rgba(40, 62, 120, 0.12);
}

.inp::-webkit-inner-spin-button,
.inp::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Swap button ── */
.swap-wrap {
  display: flex;
  justify-content: center;
  margin: 7px 0;
}

.swap {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid #c8d0e0;
  background: #eef1f8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  color: #283e78;
  transition: all 0.2s;
}

.swap:hover {
  background: #dbe2ee;
  border-color: #283e78;
}

.swap:active {
  transform: rotate(180deg) scale(0.95);
}

/* ── Action buttons ── */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 1.1rem;
}

.btn {
  flex: 1;
  padding: 9px 8px;
  border-radius: 8px;
  border: 1.5px solid #c8d0e0;
  background: #eef1f8;
  color: #283e78;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-family: Arial, sans-serif;
  transition: all 0.15s;
}

.btn:hover {
  background: #dbe2ee;
  border-color: #283e78;
  color: #20232a;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; pointer-events: none; }

/* ── Footer meta ── */
.meta {
  font-size: 11px;
  color: #5a6272;
  text-align: center;
  margin-top: 1rem;
}

/* ── Spinner ── */
.spin {
  display: inline-block;
  animation: sp 1s linear infinite;
}

@keyframes sp {
  to { transform: rotate(360deg); }
}
