:root {
  --bg-1: #0d1b2a;
  --bg-2: #1b263b;
  --panel: rgba(17, 24, 39, 0.82);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #22c55e;
  --primary-dark: #15803d;
  --stroke: rgba(148, 163, 184, 0.28);
  --danger: #f87171;
  --card-icon-size: 27px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 20%, #1d4ed8, transparent 45%),
    radial-gradient(circle at 90% 0%, #0f766e, transparent 40%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.layout {
  width: min(1100px, 100% - 2rem);
  margin: 2.5rem auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.product-tabs {
  width: min(1100px, 100% - 2rem);
  margin: 1.25rem auto -0.75rem;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.product-tab-button {
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  border-radius: 999px;
  padding: 0.65rem 1rem;
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.product-tab-button:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.75);
}

.product-tab-button.active {
  border-color: rgba(34, 197, 94, 0.95);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
  background: rgba(20, 184, 166, 0.15);
}

.product-panel[hidden] {
  display: none;
}

.cards-layout {
  align-items: stretch;
}

.cards-layout > .panel {
  height: 100%;
}

.product-headline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cards-headline {
  display: block;
}

.cards-headline-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.lang-switcher-inline {
  position: static;
  margin: 0.95rem 0 1rem;
}

.cards-lang-switcher {
  position: static;
  top: auto;
  right: auto;
  z-index: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.4rem;
  margin: 0.35rem 0 1rem;
  transform: translateX(-4rem);
}

.help-button {
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
  color: #f8fafc;
  font-weight: 700;
  cursor: pointer;
}

.help-button:hover {
  border-color: rgba(34, 211, 238, 0.85);
}

.help-button:focus-visible,
.lang-btn:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.9);
  outline-offset: 2px;
}

.cards-info-block,
.cards-warning,
.card-status-result,
.card-result-text {
  margin-top: 0.9rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
}

.cards-warning {
  border-color: rgba(251, 191, 36, 0.4);
  color: #fde68a;
}

.cards-country-list {
  margin: 0.55rem 0 0;
  color: #fff7cc;
}

.card-result-box.card-result-flash {
  animation: cardResultFlash 1.1s ease-in-out 3;
}

@keyframes cardResultFlash {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.18);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.38), 0 0 22px rgba(34, 197, 94, 0.18);
    transform: translateY(-1px);
  }
}

.card-result-text p,
.card-status-result p {
  margin: 0.4rem 0;
}

.card-status-block {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.card-status-block h3 {
  margin: 0 0 0.6rem;
  font-size: 1rem;
}

.cta-secondary {
  background: linear-gradient(145deg, #0f766e, #0d9488);
}

.help-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.help-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(2px);
}

.help-modal-card {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: min(80vh, 800px);
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  padding: 1rem;
}

.help-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.help-modal-close {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.help-modal-body {
  color: var(--text);
  line-height: 1.5;
}

.help-modal-body p {
  margin: 0 0 0.75rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  backdrop-filter: blur(7px);
  padding: 1.25rem;
  opacity: 0;
  transform: translateY(18px);
  animation: panelReveal 720ms cubic-bezier(0.18, 0.84, 0.28, 1) forwards;
}

.panel-right {
  animation-delay: 140ms;
}

.panel-left {
  position: relative;
}

.lang-switcher {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  display: grid;
  grid-template-columns: repeat(4, 30px);
  gap: 0.36rem;
  z-index: 5;
}

.lang-btn {
  width: 30px;
  height: 22px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.78);
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.lang-btn img {
  width: 22px;
  height: 14px;
  display: block;
  border-radius: 2px;
}

.lang-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(56, 189, 248, 0.9);
}

.lang-btn.active {
  border-color: #22d3ee;
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.35);
}

.lang-btn:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 1px;
}

@keyframes panelReveal {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(160deg, #14b8a6, #22c55e);
  color: #03220d;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.brand-overline {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

h1,
h2 {
  margin: 0;
}

h2 {
  font-size: 1.2rem;
}

.muted {
  color: var(--muted);
  margin: 0.4rem 0 1rem;
}

.purchase-intro {
  color: #22c55e;
  font-size: 17px;
  margin: 0.4rem 0 1rem;
}

.wallet-destino-red {
  color: #ef4444;
  font-size: 18px;
}

.purchase-intro .wallet-destino-red {
  color: inherit;
}

.wallet-focus-icon {
  cursor: pointer;
  user-select: none;
  display: inline-block;
  font-size: 24px;
  line-height: 1;
  vertical-align: -2px;
}

.wallet-focus-icon:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 2px;
  border-radius: 6px;
}

input.field-flash,
select.field-flash,
#wallet.wallet-flash {
  animation: walletFluorescent 0.95s ease-in-out infinite;
}

@keyframes walletFluorescent {
  0%,
  100% {
    border-color: #facc15;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.15), 0 0 10px rgba(250, 204, 21, 0.25);
  }
  50% {
    border-color: #fde047;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.4), 0 0 16px rgba(250, 204, 21, 0.6);
  }
}

.coin-list {
  display: grid;
  gap: 0.45rem;
  max-height: 60vh;
  overflow: auto;
  padding-right: 0.2rem;
}

.coin-item {
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  border-radius: 12px;
  padding: 0.7rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.coin-item:hover {
  transform: translateY(-1px);
  border-color: rgba(34, 197, 94, 0.8);
}

.coin-item.active {
  border-color: var(--primary);
  background: rgba(20, 184, 166, 0.15);
}

.coin-item.disabled {
  background: rgba(71, 85, 105, 0.25);
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
  cursor: not-allowed;
  opacity: 0.65;
}

.coin-item.disabled:hover {
  transform: none;
  border-color: rgba(148, 163, 184, 0.2);
}

.coin-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.coin-symbol {
  font-weight: 700;
}

.stable-tag {
  font-size: 0.76rem;
  color: #03220d;
  background: #86efac;
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  align-self: start;
}

.coin-network {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.8rem;
}

.field-label {
  font-size: 0.92rem;
  color: var(--muted);
}

.card-commission-group {
  display: grid;
  gap: 0.45rem;
}

.card-commission-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--text);
}

.card-commission-option input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  flex: 0 0 auto;
}

.field-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.provider-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
  white-space: pre-line;
}

.provider-meta.provider-flash {
  animation: providerMetaPulse 900ms ease-in-out 3;
}

.provider-meta-line {
  display: block;
  margin-bottom: 0.15rem;
}

.provider-meta-label {
  color: #cbd5e1;
}

.provider-meta-value {
  display: inline-block;
  padding: 0 0.25rem;
  border-radius: 0.35rem;
  color: #fef08a;
}

.provider-value-flash {
  animation: providerValuePulse 900ms ease-in-out 4;
}

.provider-meta-note {
  color: #94a3b8;
}

@keyframes providerMetaPulse {
  0%,
  100% {
    color: var(--muted);
    text-shadow: none;
    filter: saturate(1);
  }
  50% {
    color: #f8fafc;
    text-shadow: 0 0 10px rgba(250, 204, 21, 0.35), 0 0 18px rgba(34, 197, 94, 0.18);
    filter: saturate(1.15);
    background: rgba(250, 204, 21, 0.08);
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.1), 0 0 18px rgba(250, 204, 21, 0.08);
  }
}

@keyframes providerValuePulse {
  0%,
  100% {
    background: rgba(250, 204, 21, 0);
    color: #fef08a;
    box-shadow: none;
  }
  50% {
    background: rgba(250, 204, 21, 0.18);
    color: #fff7b0;
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.2), 0 0 12px rgba(250, 204, 21, 0.45);
  }
}

.payment-description {
  margin-top: 0.9rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.55), rgba(15, 23, 42, 0.7));
}

.payment-description-title {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7dd3fc;
}

.payment-led {
  display: inline-block;
  width: 0.56rem;
  height: 0.56rem;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.16), 0 0 5px rgba(34, 197, 94, 0.22);
  animation: paymentLedBreath 1300ms ease-in-out infinite;
  vertical-align: middle;
}

@keyframes paymentLedBreath {
  0%,
  100% {
    opacity: 0.35;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.12), 0 0 4px rgba(34, 197, 94, 0.18);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.3), 0 0 11px rgba(34, 197, 94, 0.6);
  }
}

.payment-description-text {
  margin: 0.4rem 0 0;
  color: #e2e8f0;
  line-height: 1.38;
  font-size: 0.92rem;
  word-break: break-word;
}

.card-result-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.55rem;
}

.card-reset-button {
  width: auto;
  min-width: 10rem;
  margin-top: 0;
}

.card-send-box {
  margin-top: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background: linear-gradient(145deg, rgba(15, 118, 110, 0.18), rgba(15, 23, 42, 0.62));
}

.card-send-label {
  margin: 0;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.74rem;
  font-weight: 700;
}

.card-send-amount {
  margin: 0.25rem 0 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  animation: cardAmountGlow 2.9s ease-in-out infinite;
}

.card-send-text {
  margin: 0;
  color: #e2e8f0;
  line-height: 1.42;
  font-size: 0.98rem;
}

.card-network-warning {
  margin: 0.75rem 0 0;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  background: rgba(120, 53, 15, 0.22);
  color: #fde68a;
  line-height: 1.45;
  font-size: 0.95rem;
}

@keyframes cardAmountGlow {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.12), 0 0 8px rgba(250, 204, 21, 0.18);
    transform: translateY(0);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.28), 0 0 16px rgba(250, 204, 21, 0.42);
    transform: translateY(-1px);
  }
}

.field-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 0.7rem;
}

.field-row-actions {
  grid-template-columns: 1fr auto;
  align-items: end;
}

label {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
.cta {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: rgba(15, 23, 42, 0.76);
  color: var(--text);
  padding: 0.72rem;
  font: inherit;
}

input.locked,
select.locked {
  background: rgba(100, 116, 139, 0.35);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.45);
  cursor: not-allowed;
}

input:focus,
select:focus {
  outline: none;
  border-color: #38bdf8;
}

.cta {
  margin-top: 1rem;
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
  color: #05200d;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.cta:hover {
  filter: brightness(1.05);
}

.cta:disabled {
  opacity: 0.82;
  cursor: not-allowed;
}

.cta.is-loading {
  position: relative;
  padding-left: 2.8rem;
}

.cta.is-loading::before {
  content: "";
  position: absolute;
  left: 1rem;
  top: 50%;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: -0.475rem;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-right-color: transparent;
  border-radius: 999px;
  animation: ctaSpin 0.8s linear infinite;
  box-sizing: border-box;
}

.cta.is-loading:disabled {
  cursor: wait;
}

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

.copy-button {
  margin-top: 0;
  white-space: nowrap;
  min-width: 7.5rem;
}

.card-qr {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 0.5rem auto 0;
}

.cta.cta-ready:not(:disabled) {
  animation: ctaReadyPulse 2100ms ease-in-out infinite;
}

@keyframes ctaReadyPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.34);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
}

.help {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.flow-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  margin-top: 0.35rem;
}

.flow-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.48rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.flow-pill-card {
  color: #0f172a;
  background: linear-gradient(145deg, #93c5fd, #38bdf8);
}

.flow-icon-card {
  font-size: var(--card-icon-size);
  line-height: 1;
  margin-right: 0.2rem;
}

#coin {
  font-size: var(--card-icon-size);
}

.flow-pill-usdc {
  color: #052e16;
  background: linear-gradient(145deg, #86efac, #4ade80);
}

.flow-arrow {
  color: #e2e8f0;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-block;
  animation: flowArrowTrace 3200ms ease-in-out infinite;
}

@keyframes flowArrowTrace {
  0%,
  55%,
  100% {
    opacity: 0.62;
    transform: translateX(0);
    text-shadow: none;
  }
  72% {
    opacity: 1;
    transform: translateX(3px);
    text-shadow: 0 0 10px rgba(147, 197, 253, 0.8);
  }
  84% {
    opacity: 0.9;
    transform: translateX(0);
    text-shadow: 0 0 4px rgba(147, 197, 253, 0.35);
  }
}

.message {
  margin: 0.7rem 0 0;
  min-height: 1.2rem;
  font-size: 0.9rem;
}

.message.error {
  color: var(--danger);
}

.message.ok {
  color: #4ade80;
}

.commission-panel {
  margin-top: 1.6rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.85);
}

.commission-panel p {
  margin: 0;
  color: #e2e8f0;
  font-size: 0.95rem;
}

.commission-panel small {
  color: #94a3b8;
}

.commission-panel input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  margin-top: 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(15, 20, 30, 0.65);
  color: #f8fafc;
  font-size: 1rem;
}

.simulation-result {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #e5e7eb;
}

.support-footer {
  width: min(1100px, 100% - 2rem);
  margin: 0 auto 2.5rem;
}

.support-footer-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.84), rgba(8, 47, 73, 0.55));
  backdrop-filter: blur(7px);
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.18);
}

.support-footer-title {
  margin: 0;
  color: #e0f2fe;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.support-footer-text {
  margin: 0.35rem 0 0;
  color: #cbd5e1;
  font-size: 0.94rem;
  line-height: 1.45;
}

.support-footer-text a {
  color: #7dd3fc;
  font-weight: 700;
  text-decoration: none;
}

.support-footer-text a:hover,
.support-footer-text a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    width: min(740px, 100% - 1.2rem);
    margin: 1rem auto;
  }

  .lang-switcher {
    top: 0.8rem;
    right: 0.8rem;
    grid-template-columns: repeat(4, 28px);
    gap: 0.28rem;
  }

  .lang-btn {
    width: 28px;
    height: 20px;
  }

  .coin-list {
    max-height: 38vh;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .field-row-actions {
    grid-template-columns: 1fr;
  }

  .copy-button {
    min-width: 0;
  }

  .card-qr {
    width: min(100%, 190px);
  }

  .support-footer {
    width: min(740px, 100% - 1.2rem);
    margin-bottom: 1.1rem;
  }
}
.brand-logo {
  width: 56px;
  height: 56px;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(34, 197, 94, 0.3));
}
.coin-group-title {
  margin: 0.7rem 0 0.25rem;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

.coin-group-title:first-child {
  margin-top: 0;
}

@media (prefers-reduced-motion: reduce) {
  .panel,
  .panel-right,
  .cta.cta-ready:not(:disabled),
  .flow-arrow {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
