@import url('https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;600&display=swap');
*{
  margin: 0;
  padding: 0;
  outline: none;
  font-family: 'Poppins', sans-serif;
}
body{
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  background: url("bg.png"), -webkit-linear-gradient(bottom, #0250c5, #F59331);
  font-family: 'Tajawal', sans-serif;
}
::selection{
  color: #fff;
  background: #F59331;
}
.container{
  width: 330px;
  background: #fff;
  text-align: center;
  border-radius: 5px;
  padding: 50px 35px 10px 35px;
}
.container header{
  font-size: 35px;
  font-weight: 600;
  margin: 0 0 30px 0;
}
.container .form-outer{
  width: 100%;
  overflow: hidden;
}
.container .form-outer form{
  display: flex;
  width: 400%;
}
.form-outer form .page{
  width: 25%;
  transition: margin-left 0.3s ease-in-out;
}
.form-outer form .page .title{
  text-align: left;
  font-size: 25px;
  font-weight: 500;
}
.form-outer form .page .field{
  width: 330px;
  height: 45px;
  margin: 45px 0;
  display: flex;
  position: relative;
}
form .page .field .label{
  position: absolute;
  top: -30px;
  font-weight: 500;
}
form .page .field input{
  height: 100%;
  width: 100%;
  border: 1px solid lightgrey;
  border-radius: 5px;
  padding-left: 15px;
  font-size: 18px;
}
form .page .field select{
  width: 100%;
  padding-left: 10px;
  font-size: 17px;
  font-weight: 500;
}
form .page .field button{
  width: 100%;
  height: calc(100% + 5px);
  border: none;
  background: #F59331;
  margin-top: -20px;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: 0.5s ease;
}
form .page .field button:hover{
  background: #000;
}
form .page .btns button{
  margin-top: -20px!important;
}
form .page .btns button.prev{
  margin-right: 3px;
  font-size: 17px;
}
form .page .btns button.next{
  margin-left: 3px;
}
.container .progress-bar{
  display: flex;
  margin: 40px 0;
  user-select: none;
}
.container .progress-bar .step{
  text-align: center;
  width: 100%;
  position: relative;
}
.container .progress-bar .step p{
  font-weight: 500;
  font-size: 18px;
  color: #000;
  margin-bottom: 8px;
}
.progress-bar .step .bullet{
  height: 25px;
  width: 25px;
  border: 2px solid #000;
  display: inline-block;
  border-radius: 50%;
  position: relative;
  transition: 0.2s;
  font-weight: 500;
  font-size: 17px;
  line-height: 25px;
}
.progress-bar .step .bullet.active{
  border-color: #F59331;
  background: #F59331;
}
.progress-bar .step .bullet span{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.progress-bar .step .bullet.active span{
  display: none;
}
.progress-bar .step .bullet:before,
.progress-bar .step .bullet:after{
  position: absolute;
  content: '';
  bottom: 11px;
  right: -51px;
  height: 3px;
  width: 44px;
  background: #262626;
}
.progress-bar .step .bullet.active:after{
  background: #F59331;
  transform: scaleX(0);
  transform-origin: left;
  animation: animate 0.3s linear forwards;
}
@keyframes animate {
  100%{
    transform: scaleX(1);
  }
}
.progress-bar .step:last-child .bullet:before,
.progress-bar .step:last-child .bullet:after{
  display: none;
}
.progress-bar .step p.active{
  color: #F59331;
  transition: 0.2s linear;
}
.progress-bar .step .check{
  position: absolute;
  left: 50%;
  top: 70%;
  font-size: 15px;
  transform: translate(-50%, -50%);
  display: none;
}
.progress-bar .step .check.active{
  display: block;
  color: #fff;
}
p {
  font-weight: bold;
}

/* Success overlay */
.success-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}
.success-box{
  background: #fff;
  width: 90%;
  max-width: 360px;
  padding: 24px 20px;
  border-radius: 8px;
  text-align: center;
}
.success-box .icon{ font-size: 56px; color: #2ecc71; margin-bottom: 12px; }
.success-box p{ margin: 0 0 16px 0; }
.success-box .close-btn{
  width: 100%;
  height: 50px;
  border: none;
  background: #F59331;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 1px;
}
.success-box .close-btn:hover{ background: #000; }

/* Loading overlay */
.loading-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.loading-spinner{
  background: #fff;
  width: 90%;
  max-width: 300px;
  padding: 40px 20px;
  border-radius: 8px;
  text-align: center;
}
.spinner{
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #F59331;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.loading-spinner p{
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

/* Media Queries للهاتف */
@media screen and (max-width: 480px) {
  .container {
    width: 90%;
    max-width: 350px;
    padding: 30px 20px 10px 20px;
    margin: 10px;
  }
  
  .container header {
    font-size: 28px;
    margin: 0 0 20px 0;
  }
  
  .form-outer form .page .field {
    width: 100%;
    margin: 35px 0;
  }
  
  .form-outer form .page .title {
    font-size: 20px;
    text-align: center;
  }
  
  form .page .field input,
  form .page .field select {
    font-size: 16px;
  }
  
  form .page .field button {
    font-size: 16px;
    height: 50px;
  }
  
  .container .progress-bar .step p {
    font-size: 14px;
  }
  
  .progress-bar .step .bullet {
    height: 20px;
    width: 20px;
    font-size: 14px;
    line-height: 20px;
  }
  
  .progress-bar .step .bullet:before,
  .progress-bar .step .bullet:after {
    bottom: 8px;
    right: -45px;
    width: 38px;
  }
  
  .success-box {
    width: 95%;
    padding: 20px 16px;
  }
  
  .success-box .icon {
    font-size: 48px;
  }
}

/* Media Queries للهواتف الصغيرة */
@media screen and (max-width: 320px) {
  .container {
    width: 95%;
    padding: 20px 15px 10px 15px;
  }
  
  .container header {
    font-size: 24px;
  }
  
  .form-outer form .page .title {
    font-size: 18px;
  }
  
  form .page .field input,
  form .page .field select {
    font-size: 14px;
    padding-left: 10px;
  }
  
  form .page .field button {
    font-size: 14px;
    height: 45px;
  }
  
  .container .progress-bar .step p {
    font-size: 12px;
  }
  
  .progress-bar .step .bullet {
    height: 18px;
    width: 18px;
    font-size: 12px;
    line-height: 18px;
  }
  
  .progress-bar .step .bullet:before,
  .progress-bar .step .bullet:after {
    bottom: 7px;
    right: -40px;
    width: 34px;
  }
}
