@font-face {
  font-family: IRANSans;
  src: url(../fonts/IRANSans.ttf);
}

@font-face {
  font-family: IRANSans_Black;
  src: url(../fonts/IRANSans_Black.ttf);
}

@font-face {
  font-family: IRANSans_Bold;
  src: url(../fonts/IRANSans_Bold.ttf);
}

/* === پایه === */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  margin: 0;
  background: #002e48;
  color: white;
  font-family: "Segoe UI", sans-serif;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* لینک‌ها بدون خط زیر و هم‌رنگ متن اطراف در صفحه لاگین */
a {
  text-decoration: none;
  color: inherit;
}

a:hover,
a:focus {
  text-decoration: none;
  color: inherit;
}

/* === صفحه لودینگ === */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #002e48;
  z-index: 1000;
  transition: opacity 1s ease;
}

#loading.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* ویدیو لودینگ */
#loading video {
  width: 10vw;
  max-width: 250px;
  height: auto;
  transition: opacity 1s ease;
}

/* متن "بارگیری اطلاعات" */
#loadingtext {
  font-size: 1.2rem;
  opacity: 0;
  margin-top: 20px;
  transition: opacity 1s ease;
  color: #b2ebff;
  font-family: IRANSans;
}

/* افکت محو و ظاهر شدن */
.fade-in {
  opacity: 1 !important;
}

.fade-out-text {
  opacity: 0 !important;
}

/* متن Welcome */
#welcome {
  position: absolute;
  font-family: IRANSans_Bold;
  font-size: clamp(2.2rem, 6vw, 6rem);
  opacity: 0;
  transition: opacity 1s ease, transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
  transform: translateY(10px) scale(0.98);
  color: white;
}

#welcome.app-show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.swal2-popup {
  font-family: 'IRANSans';
}

/* بخش اصلی برنامه */
.app-hidden {
  display: none;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #002e48;
  text-align: center;
  animation: fadeIn 0.7s ease;
  margin-top: -80px;
  direction: rtl;
}

#applogo {
  width: 100px;
  margin-bottom: 16px;
}

#apptitle {
  font-family: IRANSans_Bold;
  font-size: 30px;
}

.maindiv {
  display: flex;
  flex-direction: column;
  width: 400px;
  height: 200px;
  background-color: #334f60;
  margin-top: 16px;
  border: none;
  border-radius: 13px;
  padding: 16px;
}

.input-group {
  display: flex;
  flex-direction: column;
  text-align: right;
  gap: 16px;
}

label {
  font-size: 14;
  font-family: IRANSans_Black;
}

.inputs {
  width: 100%;
  height: 40px;
  background-color: #002940;
  border: none;
  border-radius: 10px;
  font-size: 12px;
  font-family: IRANSans_Black;
  color: #5c5c5c;
  padding: 16px;
  transition: all 0.3s ease;
}

.inputs:hover {
  color: #fff;
  font-size: 13px;
}

.inputs:focus {
  outline: none;
  color: #fff;
  font-size: 13px;
}

.uinput {
  position: relative;
  width: 100%;
  margin: auto;
}

.pinput {
  position: relative;
  width: 100%;
  margin: auto;
}

.clear-btn {
  position: absolute;
  left: 16px;
  top: 53%;
  cursor: pointer;
}

.clear-btn img {
  width: 15px;
  opacity: 50%;
}

.clear-btn img:hover {
  opacity: 100%;
}

.toggle-pass {
  position: absolute;
  left: 16px;
  top: 53%;
  cursor: pointer;
}

.toggle-pass img {
  width: 15px;
  opacity: 50%;
}

.toggle-pass img:hover {
  opacity: 100%;
}

.clear-btn2 {
  position: absolute;
  left: 47px;
  top: 53%;
  cursor: pointer;
}

.clear-btn2 img {
  width: 15px;
  opacity: 50%;
}

.clear-btn2 img:hover {
  opacity: 100%;
}

#subbtn {
  margin-top: 40px;
  width: 145px;
  height: 47px;
  background-color: #00bbbb;
  border: none;
  border-radius: 30px;
  color: #002940;
  font-family: IRANSans_Black;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.4);
}

#subbtn:hover {
  background-color: #00a2a2;
}

/* === ریسپانسیو === */
@media screen and (max-width: 768px) {
  #loading video {
    width: 32vw;
  }

  #welcome {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  #applogo{
    width: 25%;
  }

  .flex {
    width: 100%;
  }

  .maindiv {
    width: 317px;
    height: 190px;
    padding: 16px;
  }

  label {
    font-size: 14px;
  }

  #subbtn {
    margin-top: 3rem;
  }
}