:root {
  --primary-gradient: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
  --secondary-color: #ff6b6b;
  --success-color: #4CAF50;
  --error-color: #ff5252;
  --card-bg: rgba(255, 255, 255, 0.1);
  --text-primary: #fff;
  --text-secondary: rgba(255, 255, 255, 0.8);
  --border-radius: 15px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--primary-gradient);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

@keyframes gradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.container {
  width: min(90%, 450px);
  padding: 20px;
}

.auth-card {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--border-radius);
  padding: clamp(20px, 5vw, 40px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.auth-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.logo {
  text-align: center;
  font-size: clamp(2rem, 8vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(45deg, #fff, #ff6b6b);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tagline {
  text-align: center;
  font-size: clamp(1rem, 4vw, 1.2rem);
  margin-bottom: 30px;
  opacity: 0.9;
}

.auth-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 15px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  font-weight: 500;
}

.auth-tab.active {
  border-bottom: 3px solid var(--secondary-color);
  font-weight: 600;
}

.auth-form {
  display: none;
  animation: fadeIn 0.3s ease;
}

.auth-form.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.841);
  color: var(--text-primary);
  font-size: 1rem;
  transition: var(--transition);
  border: 1px solid transparent;
}

.form-control:focus {
  outline: none;
  background: rgba(151, 151, 151, 0.84);
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 10px;
  background: var(--secondary-color);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(255, 107, 107, 0.3);
}

.btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn-google {
  background: #4285F4;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.btn-google:hover {
  background: #357ae8;
}

.divider {
  display: flex;
  align-items: center;
  margin: 25px 0;
  color: var(--text-secondary);
}

.divider-line {
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.821);
}

.divider-text {
  padding: 0 15px;
  font-size: 0.9rem;
}

.message {
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
  display: none;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.message.success {
  background: rgba(76, 175, 80, 0.2);
  border: 1px solid rgba(76, 175, 80, 0.5);
  display: block;
}

.message.error {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.5);
  display: block;
}

/* ==========================
   ✅ MEDIDOR DE FORÇA DA SENHA
========================== */
.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 6px;
  border-radius: 3px;
  background: #ffffff;
  overflow: hidden;
  margin-bottom: 5px;
}

.strength-fill {
  height: 100%;
  width: 0%;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.strength-text {
  font-size: 0.8rem;
  text-align: right;
  font-weight: 500;
}

/* Cores para diferentes níveis de força */
.strength-0 { width: 0%; background: #ff5252; } /* Muito fraca */
.strength-1 { width: 25%; background: #ff5252; } /* Fraca */
.strength-2 { width: 50%; background: #ff9800; } /* Regular */
.strength-3 { width: 75%; background: #ffeb3b; } /* Boa */
.strength-4 { width: 100%; background: #4caf50; } /* Forte */

.strength-label-0 { color: #ff5252; }
.strength-label-1 { color: #ff5252; }
.strength-label-2 { color: #ff9800; }
.strength-label-3 { color: #ffeb3b; }
.strength-label-4 { color: #4caf50; }

/* ==========================
   ✅ REQUISITOS DA SENHA (INICIALMENTE OCULTOS)
========================== */
.password-requirements {
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: none; /* Inicialmente oculto */
  animation: fadeIn 0.3s ease;
}

.password-requirements.show {
  display: block; /* Mostrar quando tiver classe 'show' */
}

.requirement {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.requirement.valid {
  color: #ffffff;
}

.requirement.invalid {
  color: #ffffff;
}

.requirement::before {
  content: "●";
  margin-right: 6px;
  font-size: 0.6rem;
}

.requirement.valid::before {
  content: "✓";
  color: #ffffff;
}

.requirement.invalid::before {
  content: "✗";
  color: #ffffff;
}