/* ====================================
   REGISTRATION PAGE - PROFESSIONAL DESIGN
   PARTSFORM Color Scheme: #2B5278 (primary), #3B82F6 (accent)
   ==================================== */

/* ====================================
   BASE STYLES
   ==================================== */
.register-section {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafb 0%, #e8f1f8 100%);
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}

/* Background Elements */
.register-bg-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
}

.register-gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: orbPopIn 0.8s ease-out forwards;
}

.register-gradient-orb.orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(43, 82, 120, 0.25));
  top: -150px;
  left: -150px;
  animation: orbPopIn 0.8s ease-out forwards, orbFloat 18s ease-in-out infinite;
  animation-delay: 0.2s, 1s;
}

.register-gradient-orb.orb-2 {
  width: 400px;
  height: 400px;
  background: linear-gradient(135deg, rgba(43, 82, 120, 0.25), rgba(59, 130, 246, 0.35));
  bottom: -100px;
  right: -100px;
  animation: orbPopIn 0.8s ease-out forwards, orbFloat 22s ease-in-out infinite reverse;
  animation-delay: 0.4s, 1.2s;
}

.register-grid-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(43, 82, 120, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 82, 120, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0;
  animation: gridFadeIn 1s ease-out 0.6s forwards;
}

/* Floating Bubbles */
.register-bg-elements::before,
.register-bg-elements::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  opacity: 0;
}

.register-bg-elements::before {
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  top: 20%;
  right: 15%;
  animation: bubblePopUp 0.6s ease-out 0.8s forwards, bubbleFloat 15s ease-in-out infinite;
  animation-delay: 0.8s, 1.4s;
}

.register-bg-elements::after {
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(43, 82, 120, 0.12) 0%, transparent 70%);
  bottom: 25%;
  left: 10%;
  animation: bubblePopUp 0.6s ease-out 1s forwards, bubbleFloat 18s ease-in-out infinite reverse;
  animation-delay: 1s, 1.6s;
}

@keyframes orbPopIn {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.1);
  }
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.08); }
  50% { transform: translate(-15px, 25px) scale(0.92); }
  75% { transform: translate(-25px, -15px) scale(1.05); }
}

@keyframes gridFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bubblePopUp {
  0% {
    opacity: 0;
    transform: scale(0) translateY(50px);
  }
  60% {
    opacity: 0.8;
    transform: scale(1.2) translateY(-10px);
  }
  100% {
    opacity: 0.6;
    transform: scale(1) translateY(0);
  }
}

@keyframes bubbleFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -25px); }
  66% { transform: translate(-15px, 15px); }
}

/* Floating Particles */
.register-particle {
  position: absolute;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.register-particle.particle-1 {
  width: 12px;
  height: 12px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  top: 15%;
  left: 20%;
  animation: particlePopUp 0.5s ease-out 0.3s forwards, particleDrift 12s ease-in-out infinite;
  animation-delay: 0.3s, 0.8s;
}

.register-particle.particle-2 {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #2b5278, #3b82f6);
  top: 25%;
  right: 25%;
  animation: particlePopUp 0.5s ease-out 0.5s forwards, particleDrift 14s ease-in-out infinite reverse;
  animation-delay: 0.5s, 1s;
}

.register-particle.particle-3 {
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #60a5fa, #93c5fd);
  bottom: 30%;
  left: 15%;
  animation: particlePopUp 0.5s ease-out 0.7s forwards, particleDrift 16s ease-in-out infinite;
  animation-delay: 0.7s, 1.2s;
}

.register-particle.particle-4 {
  width: 10px;
  height: 10px;
  background: linear-gradient(135deg, #2b5278, #4b7399);
  top: 40%;
  right: 12%;
  animation: particlePopUp 0.5s ease-out 0.9s forwards, particleDrift 10s ease-in-out infinite reverse;
  animation-delay: 0.9s, 1.4s;
}

.register-particle.particle-5 {
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #93c5fd, #bfdbfe);
  bottom: 20%;
  right: 30%;
  animation: particlePopUp 0.5s ease-out 1.1s forwards, particleDrift 18s ease-in-out infinite;
  animation-delay: 1.1s, 1.6s;
}

.register-particle.particle-6 {
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #3b82f6, #2b5278);
  top: 60%;
  left: 8%;
  animation: particlePopUp 0.5s ease-out 1.3s forwards, particleDrift 20s ease-in-out infinite reverse;
  animation-delay: 1.3s, 1.8s;
}

@keyframes particlePopUp {
  0% {
    opacity: 0;
    transform: scale(0) rotate(0deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.3) rotate(180deg);
  }
  100% {
    opacity: 0.7;
    transform: scale(1) rotate(360deg);
  }
}

@keyframes particleDrift {
  0%, 100% { 
    transform: translate(0, 0) rotate(0deg); 
  }
  25% { 
    transform: translate(15px, -20px) rotate(90deg); 
  }
  50% { 
    transform: translate(-10px, 15px) rotate(180deg); 
  }
  75% { 
    transform: translate(-20px, -10px) rotate(270deg); 
  }
}

/* ====================================
   CONTAINER LAYOUT
   ==================================== */
.register-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 12rem);
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* ====================================
   FORM WRAPPER - CENTERED
   ==================================== */
.register-form-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 620px;
}

.register-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 1.5rem 2rem;
  width: 100%;
  max-width: 620px;
  box-shadow: 
    0 20px 60px rgba(43, 82, 120, 0.12),
    0 8px 24px rgba(43, 82, 120, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(43, 82, 120, 0.08);
}

.register-card-header {
  text-align: center;
  margin-bottom: 1rem;
}

.register-card-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a2b3d;
  margin: 0 0 0.25rem;
}

.register-card-header p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

/* ====================================
   FORM SECTIONS
   ==================================== */
.form-section {
  margin-bottom: 0.875rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid rgba(43, 82, 120, 0.08);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0.75rem;
  padding-bottom: 0;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  color: #2b5278;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-section-title svg {
  width: 14px;
  height: 14px;
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Form Groups */
.form-group {
  margin-bottom: 0.5rem;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: #1a2b3d;
  margin-bottom: 0.25rem;
}

.form-group label .required {
  color: #dc2626;
}

/* Input Wrapper */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 0.75rem;
  width: 14px;
  height: 14px;
  color: #94a3b8;
  transition: color 0.3s ease;
  pointer-events: none;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  color: #1a2b3d;
  background: #f8fafb;
  border: 1px solid rgba(43, 82, 120, 0.12);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.input-wrapper textarea {
  resize: vertical;
  min-height: 100px;
  padding-top: 0.875rem;
}

.textarea-wrapper .textarea-icon {
  top: 1rem;
  align-self: flex-start;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.input-wrapper:focus-within .input-icon {
  color: #3b82f6;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
  color: #94a3b8;
}

/* Select Styling */
.select-wrapper select {
  appearance: none;
  cursor: pointer;
  padding-right: 3rem;
}

.select-wrapper .select-arrow {
  position: absolute;
  right: 1rem;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  transition: transform 0.3s ease, color 0.3s ease;
}

.select-wrapper select:focus + .select-arrow {
  color: #3b82f6;
  transform: rotate(180deg);
}

/* Password Field */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
  transition: color 0.3s ease;
}

.password-toggle:hover svg {
  color: #3b82f6;
}

/* Password Strength */
.password-strength {
  margin-top: 0.5rem;
}

.strength-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.strength-text {
  font-size: 0.75rem;
  color: #64748b;
  margin: 0;
}

/* Password Match */
.password-match-text {
  font-size: 0.75rem;
  margin: 0.5rem 0 0;
  min-height: 1rem;
}

.input-wrapper input.success {
  border-color: #10b981;
}

.input-wrapper input.error {
  border-color: #dc2626;
}

/* ====================================
   TERMS & CHECKBOXES
   ==================================== */
.terms-section {
  border-bottom: none !important;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: #3b82f6;
  cursor: pointer;
  flex-shrink: 0;
}

.form-checkbox label {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
  cursor: pointer;
}

.form-checkbox label a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.form-checkbox label a:hover {
  color: #2b5278;
  text-decoration: underline;
}

/* ====================================
   SUBMIT BUTTON
   ==================================== */
.register-submit-btn {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: 'Space Grotesk', sans-serif;
  color: #ffffff;
  background: linear-gradient(135deg, #2b5278, #3b82f6);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(43, 82, 120, 0.25);
}

.register-submit-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: left 0.5s ease;
}

.register-submit-btn:hover::before {
  left: 100%;
}

.register-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(43, 82, 120, 0.3);
}

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

.register-submit-btn .btn-icon {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

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

.register-submit-btn.loading {
  pointer-events: none;
  opacity: 0.9;
}

/* Spinner */
.btn-loader {
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner {
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

.spinner-circle {
  stroke: #ffffff;
  stroke-linecap: round;
  stroke-dasharray: 40, 60;
  stroke-dashoffset: 0;
}

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

/* ====================================
   LOGIN LINK
   ==================================== */
.register-login-link {
  text-align: center;
  margin-top: 1.5rem;
}

.register-login-link p {
  font-size: 0.9375rem;
  color: #64748b;
  margin: 0;
}

.register-login-link a {
  color: #3b82f6;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.register-login-link a:hover {
  color: #2b5278;
  text-decoration: underline;
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */
@media (max-width: 1200px) {
  .register-container {
    gap: 3rem;
  }
  
  .register-branding-title {
    font-size: 2.25rem;
  }
}

@media (max-width: 992px) {
  .register-section {
    padding: 6rem 0 3rem;
  }
  
  .register-container {
    padding: 0 1.5rem;
  }
}

@media (max-width: 768px) {
  .register-section {
    padding: 5rem 0 2rem;
  }
  
  .register-card {
    padding: 2rem;
    border-radius: 20px;
  }
  
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .form-group.full-width {
    grid-column: span 1;
  }
}

@media (max-width: 480px) {
  .register-section {
    padding: 4.5rem 0 1.5rem;
  }
  
  .register-container {
    padding: 0 1rem;
  }
  
  .register-card {
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .register-card-header h2 {
    font-size: 1.5rem;
  }
  
  .form-section-title {
    font-size: 0.8rem;
  }
  
  .register-submit-btn {
    padding: 0.875rem 1.5rem;
    font-size: 0.9375rem;
  }
}

/* ====================================
   ANIMATIONS
   ==================================== */
.register-card {
  animation: fadeInUp 0.6s ease-out;
  animation-fill-mode: both;
}

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

/* Form sections staggered animation */
.form-section {
  animation: fadeIn 0.5s ease-out;
  animation-fill-mode: both;
}

.form-section:nth-child(1) { animation-delay: 0.3s; }
.form-section:nth-child(2) { animation-delay: 0.4s; }
.form-section:nth-child(3) { animation-delay: 0.5s; }
.form-section:nth-child(4) { animation-delay: 0.6s; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ====================================
   ERROR & SUCCESS MESSAGES
   ==================================== */
.form-message {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-error {
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

.form-success {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #10b981;
}

.form-message i,
.form-message svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.field-error {
  color: #dc2626;
  font-size: 0.75rem;
  margin-top: 0.375rem;
  min-height: 1rem;
  display: block;
}

.input-wrapper.error {
  border-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.03);
}

.input-wrapper.error:focus-within {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
}

.input-wrapper.success {
  border-color: #10b981 !important;
}

.input-wrapper.success:focus-within {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
  border-color: #10b981;
}

