/* CrewAI Registration Page - Beautiful Modern Design */

/* CSS Custom Properties for CrewAI Brand Colors */
:root {
  /* Primary Colors */
  --primary-50: #fff2f1;
  --primary-100: #ffe3e1;
  --primary-200: #ffcac7;
  --primary-300: #ffa5a0;
  --primary-400: #ff5a50;
  --primary-500: #f8463b;
  --primary-600: #e5281d;
  --primary-700: #c11e14;
  --primary-800: #a01c14;
  --primary-900: #841e18;
  --primary-950: #480b07;
  --primary-default: #FF5A50;

  /* Secondary Colors */
  --secondary-lightest: #737373;
  --secondary-lighter: #595959;
  --secondary-light: #404040;
  --secondary-default: #262626;
  --secondary-dark: #1A1A1A;

  /* Tertiary Colors */
  --tertiary-50: #eefdfC;
  --tertiary-100: #d5f8f7;
  --tertiary-200: #b0f1f0;
  --tertiary-300: #79a7e6;
  --tertiary-400: #3cd3d4;
  --tertiary-500: #20b7ba;
  --tertiary-600: #1d949d;
  --tertiary-700: #1f7982;
  --tertiary-800: #216169;
  --tertiary-900: #205159;
  --tertiary-950: #10353c;
  --tertiary-default: #1F7982;

  /* CrewAI Brand Colors */
  --crewai-primary: #FF5A50;
  --crewai-secondary: #1F7982;
  --crewai-background-grey: #AAAAAA;
  --crewai-white: #FFFFFF;
  --crewai-dark-black: #131313;
  --crewai-text: #333333;
}

/* Global Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, var(--tertiary-50) 0%, var(--primary-100) 100%);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Animated Background Pattern */
.background-pattern {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 50%, rgba(255, 90, 80, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(31, 121, 130, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(255, 202, 199, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(-10px) rotate(-1deg); }
}

/* Main Container */
.main-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* Registration Card */
.registration-card {
  background: var(--crewai-white);
  border-radius: 24px;
  box-shadow:
    0 20px 70px rgba(0, 0, 0, 0.1),
    0 10px 24px rgba(0, 0, 0, 0.05),
    0 1px 4px rgba(0, 0, 0, 0.05);
  max-width: 480px;
  width: 100%;
  padding: 30px 25px;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: slideUp 0.8s ease-out;
}

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

/* Header Section */
.header-section {
  text-align: center;
  margin-bottom: 45px;
}

.logo-container {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.logo {
  width: 120px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

/* Partnership Badge */
.partnership-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, rgba(255, 90, 80, 0.05), rgba(31, 121, 130, 0.05));
  border: 1px solid rgba(255, 90, 80, 0.1);
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-default);
  max-width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.partnership-text,
.marketplace-text {
  color: var(--secondary-lighter);
  font-weight: 400;
}

.aws-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
  filter: saturate(0.8);
  transition: filter 0.3s ease;
}

.partnership-badge:hover .aws-logo {
  filter: saturate(1);
}

.title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-default);
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--crewai-primary), var(--crewai-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 0.875rem;
  color: var(--secondary-lighter);
  font-weight: 400;
  margin-bottom: 0;
}

/* Form Styling */
.registration-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 25px;
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.form-group:nth-child(1) { animation-delay: 0.1s; }
.form-group:nth-child(2) { animation-delay: 0.2s; }
.form-group:nth-child(3) { animation-delay: 0.3s; }
.form-group:nth-child(4) { animation-delay: 0.4s; }

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

@keyframes borderPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 90, 80, 0.8);
  }
  70% {
    box-shadow: 0 0 0 5px rgba(255, 90, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 80, 0);
  }
}

.form-label {
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--secondary-default);
  margin-bottom: 3px;
  margin-left:10px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-label i {
  color: var(--crewai-primary);
  margin-right: 0.5rem;
  font-size: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  font-size: 0.875rem;
  font-family: inherit;
  background: var(--crewai-white);
  color: var(--secondary-default);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.form-input:focus {
  outline: none;
  border-color: var(--crewai-primary);
  animation: borderPulse 1s ease-out;
}

.form-input::placeholder {
  color: var(--secondary-lightest);
  font-weight: 400;
}

.form-input:hover:not(:focus) {
  border-color: #c3c8cd;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Submit Button */
.submit-btn {
  width: 100%;
  padding: 1rem 1.75rem;
  background: linear-gradient(135deg, var(--crewai-primary) 0%, var(--primary-600) 100%);
  border: none;
  border-radius: 12px;
  color: var(--crewai-white);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow:
    0 4px 12px rgba(255, 90, 80, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2rem;
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.5s;
  opacity: 0;
}

.submit-btn:hover {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  transform: translateY(-2px);
  box-shadow:
    0 8px 20px rgba(255, 90, 80, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.15);
}

.submit-btn:active {
  transform: translateY(0);
  box-shadow:
    0 2px 8px rgba(255, 90, 80, 0.3),
    0 1px 4px rgba(0, 0, 0, 0.1);
}

.submit-btn i {
  transition: transform 0.3s ease;
}

.submit-btn:hover i {
  transform: translateX(4px);
}

/* Alert Container */
.alert-container {
  margin-bottom: 1.5rem;
  border-radius: 16px;
  display: none;
  animation: alertSlideIn 0.4s ease-out;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes alertSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.alert-container.error {
  background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
  border: 1px solid var(--primary-200);
  display: block;
}

.alert-container.success {
  background: linear-gradient(135deg, var(--tertiary-100), var(--tertiary-50));
  border: 1px solid var(--tertiary-200);
  display: block;
}

.alert-content {
  padding: 1.25rem;
}

.alert-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.alert-icon-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.alert-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
}

.alert-container.error .alert-icon {
  color: var(--primary-600);
}

.alert-container.success .alert-icon {
  color: var(--tertiary-600);
}

.alert-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.alert-container.error .alert-title {
  color: var(--primary-800);
}

.alert-container.success .alert-title {
  color: var(--tertiary-800);
}

.alert-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.alert-close i {
  font-size: 0.875rem;
  opacity: 0.6;
}

.alert-container.error .alert-close:hover {
  background: var(--primary-200);
}

.alert-container.error .alert-close i {
  color: var(--primary-700);
}

.alert-container.success .alert-close:hover {
  background: var(--tertiary-200);
}

.alert-container.success .alert-close i {
  color: var(--tertiary-700);
}

.alert-close:hover i {
  opacity: 1;
}

.alert-message {
  font-size: 0.875rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.alert-container.error .alert-message {
  color: var(--primary-700);
}

.alert-container.success .alert-message {
  color: var(--tertiary-700);
}

.alert-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.alert-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, var(--crewai-primary), var(--primary-600));
  color: var(--crewai-white);
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 90, 80, 0.25);
  text-transform: none;
  letter-spacing: 0;
}

.alert-cta-btn:hover {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 90, 80, 0.35);
  color: var(--crewai-white);
  text-decoration: none;
}

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

.alert-cta-btn i {
  font-size: 0.75rem;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.alert-cta-btn:hover i {
  opacity: 1;
}

/* Footer */
.footer {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid #f0f0f0;
  animation: fadeInUp 0.6s ease-out forwards;
  animation-delay: 0.6s;
  opacity: 0;
}

.footer p {
  font-size: 0.75rem;
  color: var(--secondary-lightest);
  margin: 0;
}

/* Loading Animation for Form Submission */
.submit-btn.loading {
  pointer-events: none;
  background: linear-gradient(135deg, var(--secondary-lightest), var(--secondary-lighter));
}

.submit-btn.loading::after {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid var(--crewai-white);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-container {
    padding: 1rem;
  }

  .registration-card {
    padding: 30px 20px;
    margin: 1rem 0;
  }

  .title {
    font-size: 1.25rem;
  }

  .logo {
    width: 100px;
    height: 100px;
  }

  .form-input {
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
  }

  .submit-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.85rem;
  }

  .partnership-badge {
    font-size: 0.7rem;
    padding: 0.4rem 0.8rem;
    gap: 0.4rem;
  }

  .aws-logo {
    height: 16px;
  }

  /* Mobile Alert Styles */
  .alert-content {
    padding: 1rem;
  }

  .alert-header {
    margin-bottom: 0.5rem;
  }

  .alert-icon-title {
    gap: 0.5rem;
  }

  .alert-title {
    font-size: 0.9rem;
  }

  .alert-message {
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
  }

  .alert-cta-btn {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .registration-card {
    padding: 15px 10px;
    border-radius: 16px;
  }

  .title {
    font-size: 1.125rem;
  }

  .form-input {
    padding: 0.625rem;
    font-size: 0.8rem;
  }

  .submit-btn {
    padding: 0.75rem 0.875rem;
    font-size: 0.8rem;
  }

  .partnership-badge {
    font-size: 0.65rem;
    padding: 0.3rem 0.7rem;
    gap: 0.3rem;
  }

  .aws-logo {
    height: 14px;
  }

  /* Extra Small Mobile Alert Styles */
  .alert-content {
    padding: 0.875rem;
  }

  .alert-title {
    font-size: 0.85rem;
  }

  .alert-message {
    font-size: 0.75rem;
  }

  .alert-cta-btn {
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    gap: 0.375rem;
  }

  .alert-close {
    width: 24px;
    height: 24px;
  }

  .alert-close i {
    font-size: 0.75rem;
  }
}

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .registration-card {
    border: 2px solid var(--secondary-default);
  }

  .form-input {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .background-pattern {
    animation: none;
  }
}

/* Print styles */
@media print {
  .background-pattern {
    display: none;
  }

  .registration-card {
    box-shadow: none;
    border: 1px solid var(--secondary-default);
  }
}
