:root {
  --primary: #F9B000;
  --primary-dark: #d99300;
  --dark: #2b1510;
  --light: #ffffff;
  --gray: #f5f5f5;
  --text: #222222;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  background-color: #ffffff;
  color: var(--text);
}

/* ==== HEADER ==== */
.header {
  width: 100%;
  padding: 15px 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.logo {
  cursor: pointer;
}

.logo img {
  height: 130px;
  width: auto;
  display: block;
}

/* ==== MAIN ==== */
.register-main {
  min-height: calc(100vh - 130px);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 3rem 1.5rem;
}

/* ==== CONTAINER DE REGISTRO ==== */
.registro-container {
  max-width: 980px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.98);
  padding: 2.6rem 2.4rem 2.2rem;
  border-radius: 22px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.18);
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: floatUp 0.6s ease-out;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.registro-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.22);
}

/* Badge + Ícone */
.icon-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #ffe9a8, #f9b000);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4d1818;
  font-size: 1.7rem;
  box-shadow: 0 16px 35px rgba(249, 176, 0, 0.6);
  animation: pulseSoft 2.6s ease-in-out infinite;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: rgba(249, 176, 0, 0.12);
  color: var(--primary-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.badge::before {
  content: "★";
  font-size: 0.85rem;
}

/* Título & Subtítulo */
.registro-container h2 {
  font-size: 2rem;
  color: var(--dark);
  margin-bottom: 0.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.subtitle {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 2rem;
  line-height: 1.5;
}

/* ==== FORMULÁRIO 2 COLUNAS ==== */
form.form-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2.2rem;
  text-align: left;
}

form.form-columns .column {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

form.form-columns > button {
  grid-column: 1 / -1;
  margin-top: 0.5rem;
}

/* ==== FORM-GROUP / CAMPOS ==== */
.form-group {
  position: relative;
}

/* inputs + select padrão */
.form-group input,
.form-group select {
  width: 100%;
  padding: 14px 18px;
  border: 1.9px solid #e0e0e0;
  border-radius: 999px;
  outline: none;
  font-size: 0.96rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    transform 0.08s ease;
  background-color: #ffffff;
  appearance: none;
}

.form-group select {
  padding-right: 40px;
  cursor: pointer;
}

/* seta customizada do select */
.form-group select::-ms-expand {
  display: none;
}

.form-group::after {
  /* seta para SELECT apenas (via JS você não depende disso) */
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #c2c2c2;
  pointer-events: none;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--primary);
  background: #fffdf6;
  box-shadow:
    0 0 0 1px rgba(249, 176, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}


/* ==== LABELS FLUTUANTES ==== */
.form-group label {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  background-color: var(--light);
  padding: 0 6px;
  color: #999;
  font-size: 0.86rem;
  pointer-events: none;
  transition: all 0.23s ease;
  z-index: 1;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:not([value=""]):not(:focus) + label {
  top: -8px;
  font-size: 0.74rem;
  color: var(--primary);
}

/* Campo de data com label fixa estilo "inline" */
.form-group-inline-label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group-inline-label .label-static {
  position: static;
  transform: none;
  padding: 0;
  font-size: 0.85rem;
  color: #777;
}

.form-group-inline-label input {
  border-radius: 16px;
}

/* ===== Senha ===== */
.senha-group {
  margin-bottom: 0.4rem;
}

.senha-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.senha-wrapper input {
  flex: 1;
  padding: 14px 44px 14px 18px;
  border-radius: 999px;
}

.senha-wrapper input:focus {
  border-color: var(--primary);
  background: #fffdf6;
  box-shadow:
    0 0 0 1px rgba(249, 176, 0, 0.4),
    0 10px 24px rgba(0, 0, 0, 0.06);
  transform: translateY(-1px);
}

.senha-wrapper label {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  background-color: var(--light);
  padding: 0 6px;
  color: #999;
  font-size: 0.86rem;
  pointer-events: none;
  transition: all 0.23s ease;
  z-index: 1;
}

.senha-wrapper input:focus + label,
.senha-wrapper input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 0.74rem;
  color: var(--primary);
}

/* Ícone de olho */
.senha-wrapper img.toggle-senha {
  position: absolute;
  right: 12px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  z-index: 2;
}

.senha-wrapper img.toggle-senha.animar {
  transform: scale(1.2);
  opacity: 0.7;
}

/* Requisitos de senha */
.senha-requisitos {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
  color: #888;
  transition: color 0.3s;
}

.senha-requisitos.fraca {
  color: #e74c3c;
}

.senha-requisitos.media {
  color: #f39c12;
}

.senha-requisitos.forte {
  color: #27ae60;
}

/* ===== Required / Opcional ===== */
label .required {
  color: #e53935;
  font-weight: 600;
}

label .opcional {
  font-size: 0.8rem;
  color: #777;
  font-weight: 400;
}

/* ===== Erros de validação ===== */
.erro-msg {
  color: #e53935;
  font-size: 0.78rem;
  margin-top: 4px;
  display: block;
  opacity: 0;
  animation: aparecer 0.3s forwards;
}

input.erro,
select.erro {
  border-color: #e53935 !important;
  animation: tremer 0.2s ease-in-out 3;
}

@keyframes tremer {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==== BOTÃO DE CADASTRO ==== */
button {
  padding: 0.95rem 1.2rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--light);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 26px rgba(249, 176, 0, 0.6);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

button span {
  position: relative;
  z-index: 1;
}

button i {
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.22) 40%,
    transparent 80%
  );
  transform: translateX(-140%);
  opacity: 0;
  pointer-events: none;
}

button:hover {
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.03);
  box-shadow: 0 18px 40px rgba(249, 176, 0, 0.7);
}

button:hover::after {
  animation: buttonShine 0.7s ease-out forwards;
  opacity: 1;
}

button:hover i {
  animation: arrowMove 0.7s ease-in-out infinite;
}

button:active {
  transform: translateY(0);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.32);
}

/* ==== LINK PARA LOGIN ==== */
.login-link {
  margin-top: 1.6rem;
  font-size: 0.92rem;
  color: #555;
}

.login-link a {
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  position: relative;
}

.login-link a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.25s ease;
}

.login-link a:hover::after {
  width: 100%;
}

/* ==== TOAST ==== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(90deg, #4BB543, #2E8B57);
  color: var(--light);
  padding: 15px 25px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.5s ease;
  z-index: 2000;
}

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

/* ===== Modal de Termos de Uso ===== */
.modal-termos {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
  background: rgba(0, 0, 0, 0.45);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.modal-termos.show {
  display: flex;
  opacity: 1;
}

/* ===== Container do conteúdo ===== */
.modal-content-termos {
  background: rgb(255, 255, 255);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 35px 30px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  animation: slideUp 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.modal-content-termos h2 {
  font-size: 1.8rem;
  color: #2c2c2c;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ===== Texto ===== */
.termos-texto {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #333;
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

.termos-texto p {
  margin-bottom: 12px;
}

.termos-texto ul {
  list-style: disc;
  margin: 10px 0 10px 20px;
}

.termos-texto a {
  color: #f9b000;
  text-decoration: none;
  font-weight: 600;
}

.termos-texto a:hover {
  text-decoration: underline;
}

.termos-texto h3 {
  color: #222;
  font-size: 1.1rem;
  margin-top: 18px;
  margin-bottom: 6px;
  border-left: 4px solid #f9b000;
  padding-left: 8px;
  font-weight: 700;
}

.termos-texto p,
.termos-texto li {
  color: #444;
  line-height: 1.7;
}

.termos-texto strong {
  color: #d89a00;
}

/* ===== Botões Modal ===== */
.modal-actions {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 10;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.modal-actions button {
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.btn-modal-login {
  background: linear-gradient(135deg, #f9b000, #ffca28);
  color: #fff;
  box-shadow: 0 3px 10px rgba(249, 176, 0, 0.3);
}

.btn-modal-login:hover {
  background: linear-gradient(135deg, #ffb300, #f7a800);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(249, 176, 0, 0.5);
}

.btn-modal-fechar {
  background: #e0e0e0;
  color: #444;
}

.btn-modal-fechar:hover {
  background: #d5d5d5;
  transform: translateY(-1px);
}

/* ===== Scrollbar ===== */
.modal-content-termos::-webkit-scrollbar {
  width: 6px;
}
.modal-content-termos::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

/* ===== Animações ===== */
@keyframes slideUp {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

@keyframes pulseSoft {
  0% {
    transform: scale(1);
    box-shadow: 0 14px 30px rgba(249, 176, 0, 0.48);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 20px 45px rgba(249, 176, 0, 0.72);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 14px 30px rgba(249, 176, 0, 0.48);
  }
}

@keyframes arrowMove {
  0% { transform: translateX(0); }
  50% { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

@keyframes buttonShine {
  0% { transform: translateX(-140%); }
  100% { transform: translateX(140%); }
}

/* ==== RESPONSIVIDADE ==== */
@media (max-width: 900px) {
  .register-main {
    padding: 2.5rem 1rem;
  }

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

  .registro-container {
    padding: 2.3rem 1.7rem 2rem;
  }
}

@media (max-width: 600px) {
  .logo img {
    height: 90px;
  }

  .registro-container h2 {
    font-size: 1.7rem;
  }

  .subtitle {
    font-size: 0.9rem;
  }
}
