* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #6c5ce7;
  --secondary-color: #a29bfe;
  --dark-bg: #1a1a2e;
  --card-bg: #16213e;
  --text-primary: #ffffff;
  --text-secondary: #b8b9c3;
  --accent: #00d2d3;
  --gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --success: #2ecc71;
  --error: #e74c3c;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #0f0c29 0%, #1a1a2e 50%, #16213e 100%);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-container {
  width: 100%;
  max-width: 500px;
}

.auth-card {
  background: rgba(22, 33, 62, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 3rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.highlight {
  color: var(--accent);
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.auth-form {
  display: none;
}

.auth-form.active {
  display: block;
}

.auth-form h2 {
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.08);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.checkbox input {
  width: auto;
  cursor: pointer;
}

.checkbox span {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Form group with checkbox and forgot password link */
.form-group.checkbox-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

/* Default form group for single inputs */
.form-group {
  margin-bottom: 1.5rem;
}

.forgot-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.3s;
}

.forgot-link:hover {
  opacity: 0.8;
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background: var(--gradient);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 1.5rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.switch-form {
  text-align: center;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

.switch-form a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.3s;
}

.switch-form a:hover {
  opacity: 0.8;
}

.back-link {
  display: block;
  text-align: center;
  color: var(--text-secondary);
  text-decoration: none;
  margin-top: 2rem;
  transition: color 0.3s;
}

.back-link:hover {
  color: var(--accent);
}

/* Forgot Password Specific Styles */
#forgot-password-form .form-group {
  display: block;
  margin-bottom: 1.5rem;
}

#forgot-password-form .form-group:last-of-type {
  margin-bottom: 2rem;
}

/* Override the flex layout for forgot password form specifically */
#forgot-password-form .form-group:not(.checkbox-group) {
  display: block;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-form.active {
  animation: fadeIn 0.3s ease-in-out;
}

/* Success Message */
.success-message {
  background: rgba(46, 204, 113, 0.2);
  border: 2px solid var(--success);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  color: var(--success);
  text-align: center;
  display: none;
}

.success-message.show {
  display: block;
  animation: fadeIn 0.3s;
}

/* Error Message */
.error-message {
  background: rgba(231, 76, 60, 0.2);
  border: 2px solid #e74c3c;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  color: #e74c3c;
  text-align: center;
  display: none;
}

.error-message.show {
  display: block;
  animation: fadeIn 0.3s;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  text-align: center;
  border-radius: 60px;
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  z-index: 999;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s;
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(37, 211, 102, 0.6);
}

.whatsapp-float span:first-child {
  font-size: 1.5rem;
}

.whatsapp-text {
  font-size: 1rem;
}

@keyframes pulse {
  0% {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.7);
  }
  100% {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
  }
}

@media (max-width: 600px) {
  .auth-card {
    padding: 2rem;
  }

  .auth-header h1 {
    font-size: 1.5rem;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    padding: 0.8rem 1rem;
  }

  .whatsapp-text {
    display: none;
  }

  .whatsapp-float span:first-child {
    font-size: 1.8rem;
  }
}
