@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-body {
  position: relative;
  width: -webkit-fill-available;
  height: -webkit-fill-available;
  max-height: -webkit-fill-available;
  background: #1c1c1c;
  border-radius: 8px;
  overflow: hidden;
  padding: 10px;
  -webkit-box-shadow: 0 11px 34px 0 rgba(0, 0, 0, 0.65);
  box-shadow: 0 11px 34px 0 rgba(0, 0, 0, 0.65);
}

.box::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(0deg, transparent, transparent, #45f3ff, #45f3ff, #45f3ff);
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
}

.box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(0deg, transparent, transparent, #45f3ff, #45f3ff, #45f3ff);
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
  animation-delay: -3s;
}

.borderLine::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(0deg, transparent, transparent, #ff2770, #ff2770, #ff2770);
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
  animation-delay: -1.5s;
}

.borderLine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 380px;
  height: 420px;
  background: linear-gradient(0deg, transparent, transparent, #ff2770, #ff2770, #ff2770);
  z-index: 1;
  transform-origin: bottom right;
  animation: animate 6s linear infinite;
  animation-delay: -4.5s;
}

.borderLine {
  position: absolute;
  inset: 0;
}


@keyframes animate {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }

}

.card-body form {
  position: absolute;
  inset: 4px;
  background: #222;
  padding: 65px 40px 40px;
  border-radius: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Transitions para entrada/saída dos formulários (slide up/down) */
.card-body form {
  transition: transform 0.7s cubic-bezier(.2,.8,.2,1), opacity 0.7s cubic-bezier(.2,.8,.2,1);
  will-change: transform, opacity;
}

.card-body form.hidden {
  opacity: 0;
  transform: translateY(0);
  pointer-events: none;
}

/* Estado quando o formulário entra vindo de cima */
.card-body form.in-from-top {
  opacity: 0;
  transform: translateY(-40px);
}
.card-body form.in-from-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Estado quando o formulário sai para baixo */
.card-body form.out-down {
  opacity: 0;
  transform: translateY(40px);
  pointer-events: none;
}

.card-body form.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Logo posicionado fora dos forms, centralizado no topo da caixa */
.card > .card-header {
  position: relative;
  backdrop-filter: blur(10px);
  z-index: 4;
  display: flex;
  justify-content: center;
  width: -webkit-fill-available;
}
[data-bs-theme="dark"] .card > .card-header {
  background: rgba(28, 28, 28, 0.9);
}
[data-bs-theme="light"] .card > .card-header {
  background: rgba(255, 255, 255, 0.9);
}

.card > .card-header img {
  max-width: 160px;
  height: auto;
  display: block;
}

.card > .card-header .login-logo-light,
.card > .card-header .login-logo-dark {
  display: none;
}

.card > .card-header .login-logo-light {
  display: block;
}

.card > .card-header .login-logo-dark {
  display: none;
}

[data-bs-theme="light"] .card > .card-header .login-logo-light {
  display: none;
}

[data-bs-theme="light"] .card > .card-header .login-logo-dark {
  display: block;
}

[data-bs-theme="dark"] .card > .card-header .login-logo-dark {
  display: none;
}

[data-bs-theme="dark"] .card > .card-header .login-logo-light {
  display: block;
}

@media (prefers-color-scheme: dark) {
  [data-bs-theme="auto"] .card > .card-header .login-logo-dark {
    display: block;
  }

  [data-bs-theme="auto"] .card > .card-header .login-logo-light {
    display: none;
  }
}

.card-body form .card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid;
}



.card-body form .brand-name {
  color: #fff;
  font-size: 1.1em;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-body form h2 {
  color: #fff;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0.1em;
}

.card-body form .input-group {
  position: relative;
  width: 300px;
}

.card-body form .input-group input {
  position: relative;
  width: 100%;
  padding: 20px 10px 10px;
  background: transparent;
  outline: none;
  border: none;
  box-shadow: none;
  color: #000000;
  font-size: 1em;
  letter-spacing: 0.05em;
  transition: 0.5s;
  z-index: 10;
}

.card-body form .input-group span {
  position: absolute;
  left: 0;
  padding: 20px 0px 10px;
  pointer-events: none;
  color: #8f8f8f;
  font-size: 1em;
  letter-spacing: 0.05em;
  transition: 0.5s;
}

.card-body form .input-group input:valid~span,
.card-body form .input-group input:focus~span {
  color: #fff;
  font-size: 0.75em;
  transform: translateY((-34px));
}

.card-body form .input-group i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  transition: 0.5s;
  pointer-events: none;
}

.card-body form .input-group input:valid~i,
.card-body form .input-group input:focus~i {
  height: 44px;
}

.card-body form .links {
  width: -webkit-fill-available;
  display: flex;
  justify-content: space-between;
}

.card-body form .links a {
  margin: 10px 0;
  font-size: 0.75em;
  color: #8f8f8f;
  text-decoration: none;
}

.card-body form .links a:hover,
.card-body form .links a:nth-child(2) {
  color: #57f4ff;
}

.error-message {
  margin-top: 20px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(255, 39, 112, 0.85);
  color: #fff;
  text-align: center;
  font-size: 0.85em;
  letter-spacing: 0.03em;
}

.btn-submit {
  border: none;
  outline: none;
  padding: 9px 25px;
  cursor: pointer;
  font-size: 0.9em;
  border-radius: 4px;
  font-weight: 600;
  width: 200px;
  margin-top: 10px;
  border: 1px solid;
}

.btn-submit:active {
  opacity: 0.8;
}

.btn-submit:hover {
  background: #000000;
}

/* Melhoria no formulário interno */
.card-body form {
  background: rgba(28, 28, 28, 0.9);
  /* Efeito levemente translúcido */
  backdrop-filter: blur(10px);
  /* Desfoque de fundo */
}

.card-body form h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
  text-transform: none;
  /* Menos agressivo que o uppercase total */
}

/* Inputs mais elegantes */
.card-body form .input-group {
  width: 100%;
}


.card-body form .input-group span {
  width: -webkit-fill-available;
  padding: 18px 10px;
  /* Alinhamento melhor */
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* Wrapper para Chec.card-body e Link */
.options-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 25px;
  font-size: 0.8em;
}

.remember {
  color: #8f8f8f;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.remember input {
  accent-color: #45f3ff;
  /* Cor do chec.card-body combina com o glow */
}

.btn-forgot {
  color: #45f3ff;
  text-decoration: none;
  transition: 0.3s;
}

.btn-forgot:hover {
  text-decoration: underline;
  filter: brightness(1.2);
}

/* Botão Moderno com Gradiente e Sombra */
.btn-submit {
  width: 100% !important;
  height: 45px;
  background: linear-gradient(45deg, #45f3ff, #ff2770);
  border: none !important;
  color: #fff !important;
  margin-top: 30px !important;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: 0.5s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-submit:hover {
  background: linear-gradient(45deg, #ff2770, #45f3ff) !important;
  letter-spacing: 0.2em;
  box-shadow: 0 0 20px rgba(69, 243, 255, 0.4);
  transform: translateY(-2px);
}

/* Container dos números */
.code-container {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin: 20px 0;
}

/* Estilo individual de cada quadradinho */
.code-input {
    width: 45px;
    height: 55px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-bottom: 2px solid #45f3ff; /* Cor Ciano do seu Glow */
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Efeito de foco (quando o usuário clica ou digita) */
.code-input:focus {
    outline: none;
    background: rgba(69, 243, 255, 0.1);
    border-bottom: 2px solid #ff2770; /* Muda para o Rosa do seu Glow */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

/* Ajuste para mobile (evita que os quadrados quebrem a linha) */
@media (max-width: 400px) {
    .code-input {
        width: 35px;
        height: 45px;
        font-size: 1.2rem;
    }
}

/* Remove as setinhas de 'number' caso mude o type */
.code-input::-webkit-outer-spin-button,
.code-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Estilo das mensagens dentro do container */
#message-container, .message-container {
    min-height: 35px;
    margin-bottom: 15px;
}

.alert-msg {
    font-size: 0.85rem;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

.alert-msg.error {
    color: #ff2770;
    background: rgba(255, 39, 112, 0.1);
}

.alert-msg.success {
    color: #45f3ff;
    background: rgba(69, 243, 255, 0.1);
}

.alert-msg.info {
  color: #b6b9c6;
  background: rgba(255, 255, 255, 0.08);
}
.links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    padding: 0 5px;
}

.links a {
    color: #8f8f8f; /* Cor discreta inicial */
    text-decoration: none;
    font-size: 0.85em;
    transition: 0.3s;
    font-weight: 500;
}

/* Efeito ao passar o mouse */
.links a:hover {
    color: #45f3ff; /* Ciano para combinar com o brilho do input */
    text-shadow: 0 0 10px #45f3ff, 0 0 20px #45f3ff;
}

/* Destaque para o "Reenviar código" se quiser que ele chame mais atenção */
.links a:last-child {
    color: #8f8f8f;
}

.links a:last-child:hover {
    color: #ff2770; /* Rosa Neon para o reenvio */
    text-shadow: 0 0 10px #ff2770;
}

/* Ajustes para tema claro */
[data-bs-theme="light"] .card-body {
  background: #f7f8fb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

[data-bs-theme="light"] .box::before,
[data-bs-theme="light"] .box::after {
  background: linear-gradient(0deg, transparent, transparent, rgba(69, 243, 255, 0.45), rgba(69, 243, 255, 0.45), rgba(69, 243, 255, 0.45));
}

[data-bs-theme="light"] .borderLine::before,
[data-bs-theme="light"] .borderLine::after {
  background: linear-gradient(0deg, transparent, transparent, rgba(255, 39, 112, 0.45), rgba(255, 39, 112, 0.45), rgba(255, 39, 112, 0.45));
}

[data-bs-theme="light"] .card-body form {
  background: rgba(255, 255, 255, 0.92);
}

[data-bs-theme="light"] .card-body form h2,
[data-bs-theme="light"] .card-body form .brand-name {
  color: #111827;
}

[data-bs-theme="light"] .card-body form .input-group input {
  color: #111827;
}

[data-bs-theme="light"] .card-body form .input-group span {
  color: #6b7280;
}

[data-bs-theme="light"] .card-body form .input-group input:valid~span,
[data-bs-theme="light"] .card-body form .input-group input:focus~span {
  color: #111827;
}

[data-bs-theme="light"] .card-body form .input-group i {
  background: #49f3ff;
}

[data-bs-theme="light"] .links a {
  color: #6b7280;
}

[data-bs-theme="light"] .links a:hover {
  color: #0d6efd;
  text-shadow: none;
}

[data-bs-theme="light"] .code-input {
  background: rgba(15, 23, 42, 0.05);
  color: #111827;
  border-bottom-color: #0d6efd;
}






/* Garante que a transição de altura seja suave */
.card-body {
    overflow: hidden; /* Importante para o slide não vazar a borda */
    transition: height 0.5s ease-in-out;
    min-height: 550px; /* Ajuste para o tamanho médio dos seus forms */
}

/* Remove margens extras que podem causar "pulos" na animação */
.login-form, .form-verify {
    margin: 0;
    padding-bottom: 20px;
}
.card-body form {
  display: block;
    width: 100%; /* Garante que o form ocupe a largura da caixa durante a animação */
}

/* Ajuste de alinhamento do formulário de recuperação */
#form-recover .input-group {
  margin-bottom: 7%;
}

#form-recover .btn-submit {
  margin-top: 18px;
}

#form-recover .links {
  margin-top: 28px;
}