:root {
  --bg-main: #0c0226;
  --bg-main-alt: #190a4a;
  --card-bg: #ffffff;
  --card-border-radius: 26px;

  --primary: #4ee3ff;
  --primary-alt: #75ff7a;

  --input-bg: #f5f6fb;
  --input-border: #dde0f0;

  --text-main: #1d1b33;
  --text-muted: #8a8ea3;
  --button-disabled-bg: #dde0e8;
  --button-disabled-text: #9ba0b2;

  --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  background: radial-gradient(circle at top, var(--bg-main-alt), var(--bg-main) 55%), #000;
  color: #fff;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 14px 24px;
}

.content {
  width: 100%;
  max-width: 480px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* HERO */
.hero {
  text-align: center;
  margin-top: 24px;
  margin-bottom: 20px;
  animation: fade-down 0.5s ease-out;
  position: relative;
}

.hero__logo-img {
  width: min(280px, 80vw);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.5));
}

.hero__decor {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(117, 255, 122, 0.9);
  opacity: 0.85;
  filter: blur(0.2px);
  animation: float 4s ease-in-out infinite alternate;
}

.hero__decor--1 { top: 10px; left: 12%; }
.hero__decor--2 {
  top: -6px; right: 18%;
  width: 18px; height: 18px;
  background: rgba(78, 227, 255, 0.95);
  animation-delay: 0.7s;
}
.hero__decor--3 {
  bottom: -6px; right: 5%;
  width: 10px; height: 10px;
  background: rgba(165, 132, 255, 0.95);
  animation-delay: 1.1s;
}

.hero__subtitle {
  font-size: 0.9rem;
  line-height: 1.35rem;
  max-width: 330px;
  margin: 14px auto 0;
  color: rgba(255, 255, 255, 0.82);
}

/* CARD */
.card {
  background: var(--card-bg);
  border-radius: var(--card-border-radius);
  box-shadow: var(--shadow-soft);
  padding: 24px 20px 26px;
  margin-top: 24px;
  color: var(--text-main);
  animation: fade-up 0.6s ease-out 0.1s both;
}

@media (min-height: 720px) {
  .hero { margin-top: 40px; }
  .card { margin-top: 28px; }
}

.footer {
  width: 100%;
  max-width: 480px;
  margin-top: 18px;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.7);
}

/* VISTA 1 */
.card__title {
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 4px;
}

.card__subtitle {
  font-size: 0.86rem;
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-main);
}

.field-input {
  width: 100%;
  padding: 13px 14px;
  border-radius: 999px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.field-input::placeholder { color: #b3b6c7; }

.field-input:focus {
  border-color: var(--primary);
  background-color: #ffffff;
  box-shadow: 0 0 0 1px rgba(79, 227, 255, 0.7);
}

.field-hint {
  font-size: 0.72rem;
  color: #b0b3c6;
  margin-top: 2px;
}

.field-hint--error { color: #d43c3c; }

.button {
  width: 100%;
  border-radius: 999px;
  padding: 13px 14px;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.18s ease, color 0.18s ease, filter 0.18s ease;
}

.button:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: none;
}

.button--primary:disabled {
  background: linear-gradient(90deg, #dfe4f0, #e7f3e3);
  color: var(--button-disabled-text);
  cursor: not-allowed;
}

.button--primary:not(:disabled) {
  background: linear-gradient(90deg, var(--primary), var(--primary-alt));
  color: #020315;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.button--primary:not(:disabled):hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.button--secondary {
  background: #f2f3f8;
  color: #4b4f63;
  margin-top: 8px;
  cursor: pointer;
}

.button--secondary:hover {
  background: #e5e6f0;
}

.card__legal {
  margin-top: 14px;
  font-size: 0.75rem;
  text-align: center;
  color: var(--text-muted);
}

.card__legal a {
  color: #5b5eea;
  text-decoration: none;
  font-weight: 500;
}

.card__legal a:hover { text-decoration: underline; }

/* ERROR FORM */
.form-error {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(212, 60, 60, 0.06);
  border: 1px solid rgba(212, 60, 60, 0.6);
  color: #d43c3c;
  font-size: 0.8rem;
  align-items: flex-start;
  gap: 8px;
  animation: fade-up 0.18s ease-out;
  display: none;
}

.form-error--visible { display: flex; }

.form-error__icon {
  font-size: 1rem;
  line-height: 1;
  margin-top: 1px;
}

/* CAPTCHA */
.captcha-simple {
  margin-top: 4px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #d4d7e5;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.captcha-main {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.captcha-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid #c4c8d8;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.captcha-spinner {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid #c4c8d8;
  border-top-color: #555;
  animation: spin 0.8s linear infinite;
  display: none;
}

.captcha-check-icon {
  width: 16px;
  height: 16px;
  color: #24a148;
  display: none;
}

.captcha-checkbox--verificando { border-color: #9fa3b8; }

.captcha-checkbox--checked {
  background: #2b8a3e;
  border-color: #2b8a3e;
}

.captcha-checkbox--checked .captcha-check-icon { color: #ffffff; }

.captcha-text {
  font-size: 0.9rem;
  color: #3b3f55;
  user-select: none;
  flex: 1;
}

.captcha-logo { height: 26px; }

.captcha-hint {
  margin-top: 4px;
  font-size: 0.7rem;
  color: #9ca0b5;
}

/* VISTA 2 */
#view-2 .card { text-align: center; }

.v2-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: #ffffff;
  text-align: center;
  line-height: 1.5;
  text-transform: uppercase;
  margin-top: 18px;
  letter-spacing: 0.08em;
}

.v2-heading span { display: block; }

.v2-heading__name { margin: 10px 0 6px; }

.v2-heading__name strong {
  display: inline-block;
  padding: 5px 16px;
  border-radius: 999px;
  background: rgba(5, 229, 182, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  font-size: 1.1rem;
  letter-spacing: 0.05em;
}

.v2-heading__highlight {
  margin-top: 4px;
  font-size: 1rem;
  letter-spacing: 0.10em;
  color: #ffffff;
}

.v2-card-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.v2-amount-box {
  border-radius: 22px;
  padding: 16px 16px 18px;
  background: linear-gradient(90deg, #048ac8, #00c28b);
  color: #ffffff;
  margin-bottom: 18px;
  text-align: center;
}

.v2-amount-label {
  font-size: 0.92rem;
  opacity: 0.95;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.v2-amount-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.v2-button {
  background: #5b2ce8;
  color: #ffffff;
  border-radius: 999px;
  font-size: 0.98rem;
  padding-block: 13px;
  box-shadow: 0 10px 22px rgba(59, 44, 232, 0.45);
  cursor: pointer;
}

.v2-button:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

/* EMAIL EN VISTA 2 */
.v2-email-box {
  border-radius: 16px;
  background: #f4f6ff;
  padding: 10px 14px;
  text-align: left;
  margin-bottom: 12px;
}

.v2-email-label {
  font-size: 0.78rem;
  color: #7b7fa0;
  margin-bottom: 3px;
}

.v2-email-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #292b4d;
  word-break: break-all;
}

.v2-email-confirm {
  margin-bottom: 16px;
  text-align: left;
  transition: all 0.18s ease;
}

.v2-email-confirm-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #292b4d;
  margin-bottom: 6px;
  display: block;
}

.v2-email-confirm-field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.v2-email-input {
  flex: 1;
  font-size: 0.88rem;
  background: #f5f6fb;
}

.v2-email-btn {
  width: auto;
  padding-inline: 14px;
  font-size: 0.8rem;
  border-radius: 999px;
  background: #211b3f;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.v2-email-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.v2-email-confirm-hint {
  display: block;
  font-size: 0.72rem;
  margin-top: 4px;
  color: #a0a4bc;
}

.v2-email-confirm--ok .v2-email-input {
  border-color: #2b8a3e;
  box-shadow: 0 0 0 1px rgba(43, 138, 62, 0.24);
}

.v2-email-confirm--ok .v2-email-btn { background: #2b8a3e; }

.v2-email-confirm--ok .v2-email-confirm-hint { color: #2b8a3e; }

.v2-email-confirm--error .v2-email-input {
  border-color: #d43c3c;
  box-shadow: 0 0 0 1px rgba(212, 60, 60, 0.24);
}

.v2-email-confirm--error .v2-email-confirm-hint { color: #d43c3c; }

/* VISTA 3 */
#view-3 {
  margin-top: 12px;
  animation: fade-up 0.4s ease-out;
}

.sheet {
  background: #ffffff;
  color: var(--text-main);
  border-radius: 24px 24px 0 0;
  padding: 18px 18px 26px;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.45);
  min-height: 60vh;
}

.sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 16px;
}

.sheet__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #211b3f;
}

.sheet__close {
  border-radius: 999px;
  border: none;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  background: #f2f3fb;
  color: #4b4f63;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.sheet__close:hover {
  background: #e5e6f4;
  transform: translateY(-1px);
}

.sheet__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.bank-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 18px 16px;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
}

.bank-card__logo {
  width: 110px;
  max-width: 80%;
  height: auto;
  display: block;
  object-fit: contain;
}

.bank-card:hover {
  transform: translateY(-2px);
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

/* LOADER */
.loader-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 0, 16, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 9999;
  backdrop-filter: blur(4px);
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 4px solid rgba(117, 255, 122, 0.14);
  border-top-color: #75ff7a;
  animation: spin 0.8s linear infinite;
}

.loader-text {
  font-size: 13px;
  color: #d4d6ff;
}

/* ANIMACIONES */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(4px, -10px, 0); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@media (min-width: 768px) {
  .page { justify-content: center; }
  .hero { margin-top: 0; }
}