/* ============================================
   MODERN REGISTRATION PAGE STYLES
   ============================================ */

/* Modern Background with sophisticated gradient */
.bg-login {
  background: linear-gradient(165deg, 
      #b66413 0%, 
      #1a3547 25%, 
      #64462c 45%, 
      #ff6b35 75%, 
      #ff8c42 100%
  );
  min-height: 130vh;
  position: relative;
  overflow: hidden;
}

/* Animated decorative background elements */
.bg-login::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(255, 140, 66, 0.12) 0%, transparent 65%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
  z-index: 0;
}

.bg-login::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(26, 53, 71, 0.15) 0%, transparent 65%);
  border-radius: 50%;
  animation: float 15s ease-in-out infinite reverse;
  z-index: 0;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.05); }
}

/* Logo Styling */
.bg-login .logo {
  position: relative;
  margin-left: 20px;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-login .logo img {
  height: auto;
  max-width: 90px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
  transition: all 0.3s ease;
}

.bg-login .logo:hover img {
  transform: scale(1.05);
  filter: drop-shadow(0 6px 16px rgba(255, 140, 66, 0.4));
}

@media screen and (max-width: 768px) {
  .bg-login .logo {
      opacity: 0;
      pointer-events: none;
  }
}

/* SVG Wave Styling */
.bg-login svg {
  margin-top: -28px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

@media screen and (max-width: 768px) {
  .bg-login svg {
      margin-top: 0px;
  }
}

/* Back Button */
.back-button {
  color: white;
  margin-top: 40px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.back-button:hover {
  transform: translateX(-5px);
  color: #ff8c42;
}

@media screen and (max-width: 768px) {
  .back-button {
      color: rgb(14, 14, 14);
      margin-top: -10px;
      position: relative;
      text-shadow: none;
  }
}

/* Spacing Utility */
.g-5 {
  gap: 24px;
}

/* ============================================
 MODERN FORM CONTAINER
 ============================================ */

.form-container {
  margin-top: -180px;
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  padding: 30px 25px;
  border-radius: 28px;
  box-shadow: 
      0 25px 70px rgba(0, 0, 0, 0.18),
      0 10px 30px rgba(255, 107, 53, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 0 0 1px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from {
      opacity: 0;
      transform: translateY(30px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

@media screen and (max-width: 768px) {
  .form-container {
      margin-top: -20px;
      padding: 35px 28px;
      border-radius: 24px;
  }
  
  .bg-login::before,
  .bg-login::after {
      opacity: 0.5;
  }
}

@media screen and (max-width: 576px) {
  .form-container {
      padding: 28px 20px;
      border-radius: 20px;
  }
}

/* ============================================
 FORM HEADING
 ============================================ */

.form-container h2 {
  color: #0f2027;
  margin-bottom: 10px;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  background: linear-gradient(135deg, #0f2027 0%, #2c5364 50%, #ff6b35 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
}

.form-container h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #ff6b35, #ff8c42);
  border-radius: 2px;
}

@media screen and (max-width: 576px) {
  .form-container h2 {
      font-size: 2rem;
  }
}

/* ============================================
 MODERN INPUT FIELDS
 ============================================ */

.form-container input,
.form-container select {
  border: none;
  border-bottom: 2.5px solid #e5e7eb;
  font-size: 15px;
  background-color: transparent;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0 10px;
  font-weight: 500;
  color: #1f2937;
  width: 100%;
}

.form-container input::placeholder {
  color: #9ca3af;
  font-weight: 400;
  font-size: 14px;
}

.form-container input:hover,
.form-container select:hover {
  border-bottom-color: #ff8c42;
  background: linear-gradient(to top, rgba(255, 140, 66, 0.03) 0%, transparent 100%);
}

.form-container input:focus,
.form-container select:focus {
  border-bottom: 2.5px solid #ff6b35;
  outline: none;
  background: linear-gradient(to top, rgba(255, 140, 66, 0.05) 0%, transparent 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(255, 107, 53, 0.1);
}

/* Textarea Styling */
.form-container textarea {
  border: 2.5px solid #e5e7eb;
  border-radius: 16px;
  font-size: 15px;
  padding: 16px 18px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  resize: vertical;
  min-height: 110px;
  width: 100%;
  font-family: inherit;
}

.form-container textarea::placeholder {
  color: #9ca3af;
  font-weight: 400;
  font-size: 14px;
}

.form-container textarea:hover {
  border-color: #ff8c42;
  background: linear-gradient(to bottom, rgba(255, 140, 66, 0.02) 0%, transparent 50%);
}

.form-container textarea:focus {
  border-color: #ff6b35;
  outline: none;
  background: linear-gradient(to bottom, rgba(255, 140, 66, 0.04) 0%, transparent 50%);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
  transform: translateY(-2px);
}

/* ============================================
 MODERN LABELS
 ============================================ */

.form-container label {
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  color: #6b7280;
  font-weight: 800;
  text-transform: uppercase;
  display: block;
  position: relative;
}

/* ============================================
 FORM STRUCTURE
 ============================================ */

.hide {
  display: none;
  flex-direction: column;
}

.first-form {
  display: flex;
  flex-direction: column;
}

/* ============================================
 MODERN CONTINUE BUTTON
 ============================================ */

.btn-default {
  font-size: 15px;
  background: linear-gradient(135deg, #ff6b35 0%, #ff8c42 50%, #ffaa66 100%);
  border: none;
  color: white;
  font-weight: 800;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 16px 40px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 
      0 6px 20px rgba(255, 107, 53, 0.35),
      0 3px 10px rgba(255, 140, 66, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
  overflow: hidden;
}

.btn-default::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-default:hover::before {
  left: 100%;
}

.btn-default:hover {
  background: linear-gradient(135deg, #ff5722 0%, #ff6b35 50%, #ff8c42 100%);
  transform: translateY(-3px);
  box-shadow: 
      0 10px 30px rgba(255, 107, 53, 0.45),
      0 5px 15px rgba(255, 140, 66, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-default:active {
  transform: translateY(-1px);
  box-shadow: 
      0 4px 15px rgba(255, 107, 53, 0.3),
      0 2px 8px rgba(255, 140, 66, 0.2);
}

/* ============================================
 MODERN BACK BUTTON
 ============================================ */

.btn-back {
  background: linear-gradient(135deg, #0f2027 0%, #1a3547 50%, #2c5364 100%);
  border: none;
  color: white;
  font-weight: 800;
  padding: 16px 40px;
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 
      0 6px 20px rgba(15, 32, 39, 0.35),
      0 3px 10px rgba(26, 53, 71, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 15px;
}

.btn-back:hover {
  background: linear-gradient(135deg, #0a1519 0%, #152937 50%, #203a43 100%);
  transform: translateY(-3px);
  box-shadow: 
      0 10px 30px rgba(15, 32, 39, 0.45),
      0 5px 15px rgba(26, 53, 71, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-back:active {
  transform: translateY(-1px);
}

.btn-back i {
  margin-right: 10px;
  font-size: 14px;
}

/* ============================================
 MODERN REGISTER BUTTON
 ============================================ */

#btn-register {
  background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
  border: none;
  color: white;
  width: 100%;
  padding: 18px;
  font-weight: 800;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 15px;
  box-shadow: 
      0 6px 20px rgba(15, 32, 39, 0.35),
      0 3px 10px rgba(32, 58, 67, 0.25),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  overflow: hidden;
}

#btn-register::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

#btn-register:hover::before {
  left: 100%;
}

#btn-register:hover {
  background: linear-gradient(135deg, #152937 0%, #2c5364 50%, #3d6a7a 100%);
  transform: translateY(-3px);
  box-shadow: 
      0 10px 30px rgba(15, 32, 39, 0.45),
      0 5px 15px rgba(32, 58, 67, 0.35),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#btn-register:active {
  transform: translateY(-1px);
}

#btn-register:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: 
      0 4px 12px rgba(15, 32, 39, 0.25),
      0 2px 6px rgba(32, 58, 67, 0.15);
}

/* ============================================
 SPINNER
 ============================================ */

.spinner-border {
  width: 22px;
  height: 22px;
  border-width: 2.5px;
  vertical-align: middle;
  margin-left: 10px;
  border-color: rgba(255, 255, 255, 0.3);
  border-top-color: white;
}

/* ============================================
 MODERN LINK STYLING
 ============================================ */

.form-container a {
  color: #ff6b35;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700;
  position: relative;
}

.form-container a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2.5px;
  background: linear-gradient(90deg, #ff6b35, #ff8c42);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-container a:hover {
  color: #ff5722;
  transform: translateX(2px);
}

.form-container a:hover::after {
  width: 100%;
}

.text-decoration-underline {
  text-decoration: none !important;
}

/* ============================================
 MODERN SELECT DROPDOWN
 ============================================ */

.form-container select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath fill='%23ff6b35' d='M9 12L4 7h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  cursor: pointer;
  font-weight: 500;
}

.form-container select option {
  padding: 12px;
  font-weight: 500;
  background: white;
  color: #1f2937;
}

.form-container select option:hover {
  background: #fff5f0;
}

/* Speciality Select Styling */
.speciality select {
  border: 2.5px solid #e5e7eb !important;
  border-radius: 16px !important;
  padding: 14px 40px 14px 18px !important;
  margin-top: 10px;
  width: 100%;
  font-size: 15px;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: white;
}

.speciality select:hover {
  border-color: #ff8c42 !important;
  background: linear-gradient(to bottom, rgba(255, 140, 66, 0.02) 0%, transparent 50%);
}

.speciality select:focus {
  border-color: #ff6b35 !important;
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
  background: linear-gradient(to bottom, rgba(255, 140, 66, 0.04) 0%, transparent 50%);
  transform: translateY(-2px);
}

/* ============================================
 SMOOTH TRANSITIONS FOR FORM STEPS
 ============================================ */

.first-form,
.hide {
  animation: fadeInUp 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(25px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* ============================================
 TEXT STYLING
 ============================================ */

.text-right {
  text-align: right;
  margin-top: 20px;
  margin-bottom: 6px;
}

.text-right span {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* ============================================
 INPUT VALIDATION STATES
 ============================================ */

.form-container input.error,
.form-container select.error,
.form-container textarea.error {
  border-color: #ef4444 !important;
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.form-container input.success,
.form-container select.success {
  border-bottom-color: #10b981 !important;
}

/* ============================================
 ENHANCED FOCUS RING
 ============================================ */

.form-container input:focus-visible,
.form-container select:focus-visible,
.form-container textarea:focus-visible {
  outline: none;
}

/* ============================================
 DISABLED STATE
 ============================================ */

.form-container input:disabled,
.form-container select:disabled,
.form-container textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f9fafb;
}

/* ============================================
 LOADING STATE FOR FORM
 ============================================ */

.form-container.loading {
  pointer-events: none;
  opacity: 0.8;
}

.form-container.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  border-radius: 28px;
  z-index: 999;
}

/* ============================================
 NUMBER INPUT CLEAN UP
 ============================================ */

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
}

/* ============================================
 MOBILE RESPONSIVENESS
 ============================================ */

@media screen and (max-width: 576px) {
  .bg-login {
      background: linear-gradient(180deg, 
          #0a1828 0%, 
          #1a3547 20%, 
          #2c5364 40%,
          #ff6b35 70%, 
          #ff8c42 100%
      );
  }
  
  .form-container label {
      margin-top: 20px;
      font-size: 11px;
  }
  
  .btn-default,
  .btn-back,
  #btn-register {
      padding: 14px 30px;
      font-size: 14px;
      letter-spacing: 0.8px;
  }
  
  .form-container input,
  .form-container select,
  .form-container textarea {
      font-size: 14px;
  }
}

/* ============================================
 ADDITIONAL POLISH
 ============================================ */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection color */
::selection {
  background: rgba(255, 107, 53, 0.3);
  color: #0f2027;
}

::-moz-selection {
  background: rgba(255, 107, 53, 0.3);
  color: #0f2027;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid #ff6b35;
  outline-offset: 3px;
}