:root {
  --bg-top: #0d2b78;
  --bg-bottom: #041437;
  --panel-blue: #08225f;
  --panel-blue-soft: rgba(15, 55, 145, 0.72);
  --card-bg: rgba(255, 255, 255, 0.98);
  --card-border: rgba(217, 225, 239, 0.78);
  --text-main: #102147;
  --text-soft: #5f6f92;
  --text-faint: #8995b1;
  --line-soft: rgba(214, 220, 234, 0.78);
  --blue-accent: #006be0;
  --green: #11845b;
  --red: #cb3752;
  --shadow: 0 30px 80px rgba(6, 22, 62, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Plus Jakarta Sans", sans-serif;
  color: #fff;
  background:
    radial-gradient(circle at top left, rgba(64, 122, 255, 0.26), transparent 28%),
    radial-gradient(circle at top right, rgba(110, 178, 255, 0.12), transparent 22%),
    linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
}

.page-shell {
  min-height: 100vh;
  padding: 52px 24px 72px;
}

.hero-panel {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

.hero-copy {
  padding: 26px 6px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow:
    0 12px 24px rgba(11, 29, 76, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.brand-text {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(224, 235, 255, 0.78);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 10ch;
}

.subcopy {
  margin: 22px 0 0;
  max-width: 34ch;
  font-size: 1.02rem;
  line-height: 1.72;
  color: rgba(225, 235, 255, 0.8);
}

.rates-card {
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: var(--text-main);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 30px 18px;
}

.card-head h2 {
  margin: 0 0 8px;
  font-size: 2rem;
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.card-head p {
  margin: 0;
  max-width: 42ch;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-soft);
}

.inverse-button {
  border: 0;
  border-radius: 14px;
  background: #edf4ff;
  color: #0e4bc2;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.inverse-button:hover {
  background: #e3eeff;
  transform: translateY(-1px);
}

.table-head,
.rate-row {
  display: grid;
  grid-template-columns: minmax(260px, 2.5fr) minmax(110px, 1fr) minmax(120px, 0.95fr) minmax(160px, 1fr);
  gap: 18px;
  align-items: center;
}

.table-head {
  padding: 0 30px 14px;
  color: var(--text-faint);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.table-body {
  padding: 0 18px 12px;
}

.rate-row {
  padding: 16px 12px;
  border-top: 1px solid var(--line-soft);
}

.rate-row:first-child {
  border-top: 0;
}

.pair-cell {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.pair-badge {
  position: relative;
  width: 68px;
  height: 48px;
  flex-shrink: 0;
}

.flag-orb {
  position: absolute;
  top: 1px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: block;
  box-shadow:
    0 14px 24px rgba(19, 44, 96, 0.12),
    inset 0 0 0 1px rgba(219, 228, 243, 0.92);
  overflow: hidden;
}

.flag-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.flag-orb.from {
  left: 0;
  z-index: 2;
}

.flag-orb.to {
  right: 0;
  z-index: 1;
}

.pair-arrow {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #5f78b9;
  font-size: 0.95rem;
  font-weight: 800;
}

.pair-text {
  min-width: 0;
}

.pair-label {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pair-subtitle {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.amount-cell {
  font-variant-numeric: tabular-nums;
}

.amount-value {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.amount-meta {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.82rem;
}

.change-cell {
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  font-weight: 700;
}

.change-up {
  color: var(--green);
}

.change-down {
  color: var(--red);
}

.change-flat {
  color: var(--text-faint);
}

.sparkline {
  width: 100%;
  height: 40px;
}

.sparkline path.line {
  fill: none;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline path.fill {
  opacity: 0.12;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  padding: 18px 30px 30px;
}

.meta-block {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.meta-block span:first-child {
  color: var(--text-main);
  font-weight: 800;
}

.loading-state,
.error-state {
  padding: 28px 16px 20px;
  color: var(--text-soft);
  text-align: center;
}

@media (max-width: 1024px) {
  .hero-panel {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-top: 0;
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 24px 14px 48px;
  }

  .card-head,
  .table-head,
  .card-foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .table-head {
    display: none;
  }

  .rate-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 8px;
  }

  .card-foot {
    justify-content: flex-start;
  }
}
