:root {
  --primary: #111111;
  --primary-dark: #000000;
  --primary-light: #2a2a2a;
  --secondary: #333333;
  --accent: #555555;
  --success: #555555;
  --warning: #888888;
  --danger: #999999;
  --text: #111111;
  --text-medium: #444444;
  --text-light: #777777;
  --border: #e5e5e5;
  --bg: #f9fafb;
  --bg-input: #ffffff;
  --white: #ffffff;
  --shadow: 0 12px 35px -12px rgba(0, 0, 0, 0.08), 0 0 0 0.5px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 24px 48px -18px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', 'SF Pro Display', 'Helvetica Neue', sans-serif;
}

body {
  background-color: var(--bg);
  background-image: radial-gradient(circle at 25% 40%, rgba(0, 0, 0, 0.008) 0%, transparent 50%),
                    repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.008) 0px, rgba(0, 0, 0, 0.008) 2px, transparent 2px, transparent 8px);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 20px;
}

.register-container {
  width: 100%;
  max-width: 520px;
  padding: 20px;
}

.register-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 48px;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.register-card:hover {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.register-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #111111, #555555);
}

.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.02);
}

.register-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 10px;
}

.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: 16px;
  margin-bottom: 14px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-left: 3px solid;
  animation: fadeIn 0.4s ease-out;
  background: rgba(0, 0, 0, 0.02);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-success {
  color: #2c2c2c;
  border-left-color: #2c2c2c;
}

.alert-error {
  color: #555555;
  border-left-color: #555555;
}

.alert-info {
  color: #111111;
  border-left-color: #111111;
}

.alert-warning {
  color: #777777;
  border-left-color: #777777;
}

/* 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(0, 0, 0, 0.02);
}

.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: 16px;
  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.02);
}

.input-container input:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05), inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.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 16px 16px;
}

.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.05);
}

/* Password Strength */
.password-strength {
  margin-top: 10px;
  height: 4px;
  width: 100%;
  background-color: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.strength-bar {
  height: 100%;
  width: 0;
  transition: var(--transition);
  background-color: var(--primary);
}

.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-light);
}

.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: #111111;
  color: white;
  border: none;
  border-radius: 60px;
  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(0, 0, 0, 0.1);
  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.1), transparent);
  transition: 0.5s;
  z-index: -1;
}

.register-btn:hover {
  background: #2a2a2a;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.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: #cccccc;
  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-light);
}

.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;
  }
}