#unity-wrapper {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 9 / 16;
  max-height: 100vh;
  max-width: calc((100vh) * (9 / 16));
  width: 100%;
  height: 100%;

  z-index: 1;
}



@media only screen and (max-width: 767px) and (orientation: landscape) {
  #turn {
    display: block;
  }

  #unity-wrapper {
    display: none;
  }
}



@media (max-width: 767px) and (orientation: portrait) {
  #turn {
    display: none !important;
  }

  #unity-wrapper {
    display: block !important;
  }
}

@media (min-width: 768px) {
  #turn {
    display: none !important;
  }

  #unity-wrapper {
    display: block !important;
  }
}

html,
body {
  padding: 0;
  margin: 0;
  height: 100%;
}

#unity-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#unity-canvas {
  width: 100%;
  height: 100%;
  background: url('loadingbg.png') no-repeat center center;
  background-size: cover;
}

#unity-loading-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);

  width: calc(100% - 40px);
  max-width: 600px;

  display: none;
  z-index: 10;
  text-align: center;
}

#unity-logo {
  width: 250px;
  height: 200px;
  margin: 0 auto;
  background: url('logoType.png') no-repeat center;
  background-size: contain;
}


#unity-progress-bar-empty {
  width: 100%;
  height: 50px;
  margin-bottom: 20px;
  background: url('progress-bar-empty-dark.png') no-repeat center;
  background-size: 100% 100%;
  position: relative;
}

#unity-progress-bar-full {
  height: 50px;
  width: 0%;
  background: url('progress-bar-full-dark.png') no-repeat left center;
  background-size: 100% 100%;
  position: absolute;
  top: 0;
  left: 0;
}


#unity-warning {
  position: absolute;
  left: 50%;
  top: 5%;
  transform: translate(-50%);
  background: white;
  padding: 10px;
  display: none
}


/* ====== PWA POPUP (NEW DESIGN) ====== */

.pwa-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;              
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  box-sizing: border-box;
}

 
.pwa-popup {
  background: white;
  border-radius: 32px;
  width: 90%;
  max-width: 400px;
  padding: 24px;
  text-align: center;
  direction: rtl;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.pwa-popup__hero {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: -10px;
  margin-bottom: 10px;
}

.pwa-popup__hero img {
  width: 160px;
  height: auto;
  object-fit: contain;
}

.pwa-popup__title {
  color: #7532b1;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 15px;
}

.pwa-popup__desc {
  color: #666;
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* استایل مراحل (Steps) */
.pwa-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #F8F7FF;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.pwa-step-text {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 12px;
  color: #444;
  font-weight: 500;
  line-height: 1.7;
}

.step-number {
  font-weight: 800;
  color: #6F3AFF;
}

.pwa-step-icon img {
  width: 32px;
  height: 32px;
}


.pwa-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.btn-main {
  background: linear-gradient(90deg, #8E54E9 0%, #7656df 100%);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-outline {
  background: white;
  color: #666;
  border: 1px solid #D1D5DB;
  padding: 14px;
  border-radius: 14px;
  font-size: 14px;
  cursor: pointer;
}

.btn-text {
  background: none;
  border: none;
  color: #6336CC;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 5px;
}


.ns-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  padding: 20px;
}


.ns-popup {
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 18px;
  padding: 28px 24px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  text-align: center;
  font-family: 'Yekan', sans-serif;
}


.ns-close-btn {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: #F1ECFF;
  color: #6336CC;
  font-size: 18px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s ease;
}
.ns-close-btn:hover {
  background: #E6D8FF;
}


.ns-icon {
  margin-bottom: 14px;
}


.ns-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #6336CC;
  margin-bottom: 12px;
}


.ns-desc {
  font-size: 14.5px;
  line-height: 1.9;
  color: #333;
  margin-bottom: 22px;
}
 
.ns-btn-main {
  display: block;
  width: 100%;
  padding: 12px 0;
  background: linear-gradient(90deg, #6336CC 0%, #8A5BFF 100%);
  color: white;
  border-radius: 10px;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: 0.2s ease;
}
.ns-btn-main:hover {
  opacity: 0.9;
}


body,
.pwa-popup,
.pwa-popup *,
.ns-popup,
.ns-popup * {
  font-family: 'Yekan', Tahoma, sans-serif;
}



@font-face {
 font-family: 'Yekan';
  src: url('IRANYekan.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}





