/* =========================
   GLOBAL / BASE
========================= */

body {
  font-family: Arial, sans-serif;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;

  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.45), transparent 30%),
    radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.45), transparent 30%),
    linear-gradient(135deg, #009739, #facc15, #002776);

  background-size: 200% 200%;
  animation: brazilBg 8s ease-in-out infinite;
}

/* =========================
   BACKGROUND ANIMATIONS
========================= */

@keyframes brazilBg {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

body::before,
body::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  animation: blobMove 10s ease-in-out infinite;
}

body::before {
  width: 420px;
  height: 420px;
  border-radius: 45% 55% 60% 40%;
  top: -120px;
  left: -100px;
}

body::after {
  width: 360px;
  height: 360px;
  border-radius: 60% 40% 45% 55%;
  bottom: -100px;
  right: -90px;
  animation-duration: 12s;
  animation-direction: reverse;
}

@keyframes blobMove {

  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    transform: translate(30px, 20px) rotate(12deg);
  }
}


/* =========================
   CARD / CONTAINER
========================= */

.card {
  position: relative;
  z-index: 2;
  width: min(620px, 94%);
  padding: 36px 28px;
  text-align: center;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(14px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}

/* =========================
   TYPOGRAPHY
========================= */

h2 {
  color: white;
}

a {
  color: #38bdf8;
}

.hidden {
  display: none;
}


/* =========================
   FORM ELEMENTS
========================= */

input,
select {
  width: 100%;
  padding: 12px;
  margin: 8px 0;

  border: none;
  border-radius: 14px;
  box-sizing: border-box;
  outline: none;
}

input:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.45);
}


/* =========================
   BUTTONS
========================= */

button {
  width: 100%;
  padding: 13px;
  margin-top: 8px;

  color: white;
  font-weight: bold;

  background: linear-gradient(135deg, #22c55e, #16a34a);

  border: none;
  border-radius: 16px;
  cursor: pointer;
}

button:hover {
  background: #16a34a;
}


/* =========================
   LOGIN BUTTON INTERACTION
========================= */

#loginBtn {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 5px 0 #15803d;
}

#loginBtn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 #15803d;
}

#loginBtn.loading {
  animation: pulseBtn 0.8s infinite alternate;
}

@keyframes pulseBtn {
  from {
    transform: scale(1);
  }

  to {
    transform: scale(1.03);
  }
}


/* =========================
   MASCOT
========================= */

.mascot {
  width: 100px;
  margin-bottom: 10px;
  animation: float 2s ease-in-out infinite;
}

.mascot.celebrate {
  animation: mascotCelebrate 0.7s ease-in-out;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes mascotCelebrate {
  0% {
    transform: scale(1) rotate(0deg);
  }

  35% {
    transform: scale(1.15) rotate(-6deg);
  }

  70% {
    transform: scale(1.1) rotate(6deg);
  }

  100% {
    transform: scale(1) rotate(0deg);
  }
}


/* =========================
   LOGIN MESSAGES
========================= */

.welcome {
  color: #22c55e;
  font-weight: bold;
  margin-bottom: 10px;
  opacity: 0;
  transition: 0.5s;
}

.welcome.show {
  opacity: 1;
}


/* =========================
   DASHBOARD
========================= */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
  color: white;
}

.stats p {
  margin: 0;
  padding: 14px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.stats span {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
  font-weight: 900;
  color: #ffdf00;
}

.actions button {
  margin-top: 10px;
}

/* =========================
   RECOVERY PAGES
========================= */

.card-subtitle {
  color: #e5e7eb;
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 18px;
}

.message {
  min-height: 22px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: bold;
}

.message.success {
  color: #22c55e;
}

.message.error {
  color: #f87171;
}

.back-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  text-decoration: none;
}

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

.recovery-icon {
  width: 115px;
  margin-bottom: 8px;
  animation: float 2s ease-in-out infinite;
}

.password-hint {
  color: #d1d5db;
  font-size: 12px;
  margin-top: 6px;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/***********************footer******************/
.app-footer {
  margin-top: 40px;
  padding: 20px 10px;
  background: linear-gradient(90deg, var(--br-green), var(--br-blue));
  color: white;
  text-align: center;
}

.footer-copy p {
  margin: 4px 0;
  font-size: 0.9rem;
}

.dev-credit a {
  color: var(--br-yellow);
  text-decoration: none;
  font-weight: 600;
}

.dev-credit a:hover {
  text-decoration: underline;
}

.footer-description {
  max-width: 620px;
  margin: 0 auto 28px;
  text-align: center;
  line-height: 1.7;
}

/* =========================
   PAGE LAYOUT
========================= */

.page-container {
  width: 100%;
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* =========================
   GLOBAL BUTTON STATES
========================= */

button.loading {
  opacity: 0.8;
  cursor: wait;
  pointer-events: none;
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}


/* =========================
   TOAST MESSAGES
========================= */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;

  padding: 14px 18px;
  border-radius: 14px;

  color: white;
  font-weight: bold;
  font-size: 14px;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);

  opacity: 0;
  transform: translateY(-10px);
  transition: 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  background: #16a34a;
}

.toast.error {
  background: #dc2626;
}

.toast.info {
  background: #2563eb;
}

/* =========================
   GLOBAL APP LOADER
========================= */

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(10px);

  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.app-loader.show {
  opacity: 1;
  pointer-events: all;
}

.loader-mascot {
  width: 130px;
  animation: loaderFloat 2s ease-in-out infinite;
}

.loader-text {
  margin-top: 18px;

  color: white;
  font-size: 18px;
  font-weight: bold;
}

.loader-subtext {
  margin-top: 8px;

  color: #cbd5e1;
  font-size: 14px;
}

.loader-spinner {
  width: 44px;
  height: 44px;

  margin-top: 22px;

  border: 4px solid rgba(255, 255, 255, 0.15);
  border-top: 4px solid #22c55e;
  border-radius: 50%;

  animation: spin 1s linear infinite;
}

@keyframes loaderFloat {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

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

/* =========================
   LOGIN LINKS
========================= */

.forgot-link {
  margin: 12px 0 4px;
  font-size: 0.9rem;
}

.forgot-link a {
  color: #facc15;
  font-weight: 600;
  text-decoration: none;
}

.forgot-link a:hover {
  text-decoration: underline;
}

/* =========================
   AUTH MOBILE FIX
========================= */

* {
  box-sizing: border-box;
}




/**************** retention message ****************/
.retention-message {
  margin: 18px 0 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background:
    linear-gradient(135deg,
      rgba(255, 223, 0, 0.18),
      rgba(0, 156, 59, 0.10));
  border: 1px solid rgba(255, 223, 0, 0.55);
  text-align: center;
}

.retention-message p {
  margin: 0;
  color: hsl(160, 9%, 87%);
  font-weight: 700;
  line-height: 1.5;
}

/**************** premium status ****************/
.premium-status {
  margin-top: 14px;
  text-align: center;
}

.premium-status p {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255, 223, 0, 0.22);
  color: #b0e6a0;
  font-weight: 800;
  border: 1px solid rgba(255, 223, 0, 0.55);
}

/**************** dashboard mascot ****************/
.dashboard-mascot {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.dashboard-mascot img {
  width: 95px;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.18));
  animation: floatMascot 3s ease-in-out infinite;
}

@keyframes floatMascot {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-6px);
  }

  100% {
    transform: translateY(0px);
  }
}

.trophy-highlight {
  margin: 14px 0 8px;
  padding: 12px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 223, 0, 0.26), rgba(0, 156, 59, 0.12));
  border: 1px solid rgba(255, 223, 0, 0.65);
  text-align: center;
}

.trophy-highlight p {
  margin: 0;
  color: #173b22;
  font-weight: 800;
}

.hidden {
  display: none;
}

.mini-flag {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 50%;
  vertical-align: middle;
  margin-left: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}


/***************boton de pago***********************/
.upgrade-cta {
  margin: 16px 0 10px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 223, 0, 0.24), rgba(0, 156, 59, 0.14));
  border: 1px solid rgba(255, 223, 0, 0.65);
  text-align: center;
}

.upgrade-cta p {
  margin: 0 0 12px;
  color: #f8fafc;
  font-weight: 700;
  line-height: 1.5;
}

.upgrade-cta button {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 12px 16px;
  background: linear-gradient(90deg, #ffdf00, #facc15);
  color: #002776;
  font-weight: 900;
  cursor: pointer;
}


@media (max-width: 768px) {

  html,
  body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
  }

  body {
    background-size: cover;
  }

  .page-container {
    min-height: 100vh;
    padding: 24px 16px;
  }

  .card {
    width: 100%;
    max-width: 768px;
    padding: 28px 22px;
    margin: 0 auto;
    border-radius: 22px;
    backdrop-filter: none;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  }

  body,
  body::before,
  body::after {
    animation: none;
  }

  input,
  select,
  textarea,
  button {
    font-size: 16px;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  h2 {
    font-size: clamp(1.4rem, 6vw, 2rem);
  }

  p {
    font-size: 0.95rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stats span {
    font-size: 1.35rem;
  }
}

.next-action {
  margin: 20px 0;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #009c3b, #ffdf00);
  color: #102a43;
  text-align: left;
}

.next-action span {
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 0.85;
}

.next-action h3 {
  margin: 8px 0;
  font-size: 1.25rem;
}

.next-action p {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.next-action button {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}