:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --primary-light: #4cc9f0;
  --secondary: #3f37c9;
  --accent: #f72585;
  --success: #4cc9f0;
  --warning: #f8961e;
  --danger: #f72585;
  --text: #1e293b;
  --text-medium: #475569;
  --text-light: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --bg-input: #f1f5f9;
  --white: #ffffff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 15px 40px rgba(67, 97, 238, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", sans-serif;
}

body {
  background-color: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
  background-image: radial-gradient(
      circle at 10% 20%,
      rgba(67, 97, 238, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 90% 80%,
      rgba(63, 55, 201, 0.05) 0%,
      transparent 50%
    );
}

.register-container {
  width: 100%;
  max-width: 520px;
  padding: 20px;
}

.register-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 48px;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.register-card:hover {
  box-shadow: var(--shadow-hover);
}

.register-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
}

.register-header {
  text-align: center;
  margin-bottom: 36px;
}

.logo {
  height: 70px;
  margin-bottom: 24px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.register-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.register-header p {
  font-size: 16px;
  color: var(--text-medium);
  font-weight: 400;
  line-height: 1.5;
}

/* Messages Container */
.messages-container {
  margin-bottom: 24px;
}

.alert {
  padding: 14px 18px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 4px solid;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  background-color: rgba(76, 201, 240, 0.1);
  color: #0e7490;
  border-left-color: var(--success);
}

.alert-error {
  background-color: rgba(247, 37, 133, 0.1);
  color: #9d174d;
  border-left-color: var(--danger);
}

.alert-info {
  background-color: rgba(67, 97, 238, 0.1);
  color: #1e40af;
  border-left-color: var(--primary);
}

.alert-warning {
  background-color: rgba(248, 150, 30, 0.1);
  color: #92400e;
  border-left-color: var(--warning);
}

/* Form Inputs */
.register-form {
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.input-container {
  position: relative;
  margin-bottom: 8px;
}

.input-container.error {
  margin-bottom: 24px;
}

.input-container.error input {
  border-color: var(--danger);
  background-color: rgba(247, 37, 133, 0.05);
}

.input-container.error .input-border {
  background-color: var(--danger);
}

.input-container.error .input-icon {
  color: var(--danger);
}

.input-container.error label {
  color: var(--danger);
}

.error-message {
  color: var(--danger);
  font-size: 13px;
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.error-message p {
  margin: 4px 0;
}

.input-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 20px;
  transition: var(--transition);
  z-index: 2;
}

.input-container input {
  width: 100%;
  height: 58px;
  padding: 0 18px 0 52px;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  color: var(--text);
  background-color: var(--bg-input);
  transition: var(--transition);
  position: relative;
  z-index: 1;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.input-container input:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.03);
}

.input-container label {
  position: absolute;
  left: 44px;
  top: -10px;
  font-size: 13px;
  background: var(--white);
  padding: 0 8px;
  color: var(--text-medium);
  font-weight: 600;
  transition: var(--transition);
  pointer-events: none;
  z-index: 3;
}

.input-container input:focus + label,
.input-container.filled label {
  color: var(--primary);
}

.input-container input:focus ~ .input-icon {
  color: var(--primary);
}

.input-border {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
  border-radius: 0 0 12px 12px;
}

.input-container input:focus ~ .input-border {
  width: 100%;
}

.toggle-password {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
  background: none;
  border: none;
  padding: 8px;
}

.toggle-password:hover {
  color: var(--primary);
  transform: translateY(-50%) scale(1.1);
}

/* Password Strength */
.password-strength {
  margin-top: 10px;
  height: 6px;
  width: 100%;
  background-color: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: var(--transition);
}

.strength-text {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-light);
}

.strength-text span {
  font-weight: 500;
}

/* Password Info */
.password-info {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-medium);
}

.password-info p {
  margin-bottom: 6px;
}

.password-info ul {
  list-style: none;
  padding-left: 20px;
}

.password-info li {
  position: relative;
  margin-bottom: 4px;
}

.password-info li::before {
  content: "•";
  position: absolute;
  left: -14px;
  color: var(--primary);
}

/* Password Match */
.password-match {
  display: none;
  align-items: center;
  margin-top: 10px;
  font-size: 13px;
  gap: 8px;
  transition: var(--transition);
  animation: fadeIn 0.3s ease;
}

.match-icon {
  font-size: 16px;
}

/* Terms Checkbox */
.form-terms {
  margin: 28px 0;
}

.checkbox-container {
  display: block;
  position: relative;
  padding-left: 32px;
  cursor: pointer;
  font-size: 15px;
  color: var(--text-medium);
  user-select: none;
  line-height: 1.6;
}

.checkbox-container a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.checkbox-container a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary);
  transition: var(--transition);
}

.checkbox-container a:hover {
  color: var(--primary-dark);
}

.checkbox-container a:hover::after {
  width: 100%;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 22px;
  width: 22px;
  background-color: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: var(--transition);
}

.checkbox-container:hover input ~ .checkmark {
  border-color: var(--primary-light);
}

.checkbox-container input:checked ~ .checkmark {
  background-color: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Register Button */
.register-btn {
  width: 100%;
  padding: 17px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  margin-top: 10px;
  box-shadow: 0 5px 15px rgba(67, 97, 238, 0.25);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.register-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
  z-index: -1;
}

.register-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.35);
}

.register-btn:hover::before {
  left: 100%;
}

.register-btn i {
  font-size: 20px;
  transition: var(--transition);
}

.register-btn:hover i {
  transform: translateX(4px);
}

.register-btn:disabled {
  background: #e2e8f0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none !important;
}

.register-btn:disabled::before {
  opacity: 0;
}

.register-btn:disabled i {
  transform: none !important;
}

/* Footer */
.register-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-size: 15px;
  color: var(--text-medium);
}

.login-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
  display: inline-block;
}

.login-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--primary);
  transition: var(--transition);
}

.login-link:hover {
  color: var(--primary-dark);
}

.login-link:hover::after {
  width: 100%;
}

/* Responsividade */
@media (max-width: 520px) {
  .register-card {
    padding: 36px 28px;
  }

  .logo {
    height: 64px;
    margin-bottom: 20px;
  }

  .register-header h1 {
    font-size: 24px;
  }

  .register-header p {
    font-size: 15px;
  }

  .input-container input {
    height: 54px;
    font-size: 15px;
  }
}