body {
  font-family: 'Cairo', Arial, sans-serif;
  background: linear-gradient(135deg, #0e1833 60%, #f3bf0d 100%);
  min-height: 100vh;
  margin: 0;
  color: #fff;
  direction: rtl;
}

/* ====== container: المربع الرئيسي للصفحة ====== */
.container {
  /* تصغير العرض والارتفاع قليلاً ليصبح المربع أقصر وأصغر */
  max-width: 370px;    /* كان 420 */
  margin: 28px auto;   /* كان 32 */
  background: rgba(20, 30, 60, 0.98);
  border-radius: 18px;
  box-shadow: 0 6px 32px #0008;
  padding: 18px;       /* كان 24 */
  position: relative;
  overflow: hidden;
  min-height: 62vh;    /* كان 80vh */
  min-height: 62dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ====== step: كل شاشة/مرحلة في الصفحة ====== */
.step {
  display: none;
  animation: fadeIn 0.8s;
  width: 100%;
}
.step.visible {
  display: block;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px);}
  to { opacity: 1; transform: translateY(0);}
}

/* ====== welcome-center: محتوى شاشة الترحيب في الوسط ====== */
.welcome-center {
  min-height: 53vh; /* تقليل الارتفاع قليلاً */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.welcome-padding {
  padding-top: 30px;
  padding-bottom: 30px;
}

/* ====== شعار اللعبة ====== */
.logo {
  width: 110px;
  display: block;
  margin: 0 auto 18px auto;
}

/* ====== العناوين ====== */
h1, h2, h3 {
  text-align: center;
  margin: 10px 0 18px 0;
  font-weight: 900;
  letter-spacing: 1px;
}

/* ====== الفقرات ====== */
p {
  text-align: center;
  margin: 6px 0 18px 0;
}

/* ====== احصائية عدد اللاعبين ====== */
.stats {
  text-align: center;
  margin: 25px 0 0 0;
  font-size: 1em;
  color: #f3bf0d;
  background: rgba(0,0,0,0.14);
  padding: 8px 17px;
  border-radius: 22px;
  display: inline-block;
  min-width: 120px;
  transition: background .2s;
  box-shadow: 0 1px 6px #0003;
}

/* ====== أزرار الصفحة ====== */
.main-btn {
  display: block;
  width: 80%;
  margin: 0 auto;
  padding: 14px 0;
  background: linear-gradient(90deg, #f3bf0d, #ff7800);
  color: #0e1833;
  font-size: 1.18em;
  font-weight: 900;
  border: none;
  border-radius: 40px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  box-shadow: 0 2px 8px #f3bf0d44;
}
.main-btn:hover, .main-btn:focus {
  background: linear-gradient(90deg, #ff7800, #f3bf0d);
  transform: scale(1.05);
}
.pulse {
  animation: pulseAnim 1.2s infinite;
}
@keyframes pulseAnim {
  0% { box-shadow: 0 0 0 0 #f3bf0d88; }
  70% { box-shadow: 0 0 0 18px #f3bf0d11; }
  100% { box-shadow: 0 0 0 0 #f3bf0d00; }
}

/* ====== خيارات باقات الجواهر ====== */
.gems-options {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 24px 0 10px 0;
  flex-wrap: wrap;
}
.gems-options-strong {
  justify-content: center;
}
/* كل باقة */
.gems-card {
  background: #191f33;
  border-radius: 16px;
  border: 2px solid #f3bf0d;
  text-align: center;
  padding: 12px 8px 10px 8px;
  cursor: pointer;
  transition: border 0.16s, box-shadow 0.18s, transform 0.13s;
  flex: 1 1 42%;
  min-width: 110px;
  max-width: 48%;
  margin-bottom: 10px;
  position: relative;
  box-shadow: 0 2px 7px #0002;
}
.gems-glow:hover, .gems-card.selected {
  border: 2.8px solid #ff7800;
  transform: scale(1.09) rotate(-2deg);
  box-shadow: 0 0 0 6px #f3bf0d22;
  z-index: 2;
}
.gems-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.gems-card img {
  width: 65px;
  margin-bottom: 4px;
  filter: drop-shadow(0 0 8px #f3bf0d88);
}
.gems-amount {
  position: absolute;
  top: 50%;
  left: 51%;
  transform: translate(-50%,-50%);
  font-size: 1.55em;
  color: #fff;
  background: #ff7800;
  border-radius: 7px;
  padding: 3px 11px 2px 11px;
  font-weight: 900;
  box-shadow: 0 2px 8px #ff7800bb;
  border: 2px solid #fff3;
  z-index: 3;
}
.gems-title {
  display: block;
  font-size: 1.05em;
  font-weight: bold;
  margin-top: 10px;
  color: #f3bf0d;
}
.gems-desc {
  display: block;
  font-size: 0.9em;
  color: #ff7800;
  margin-top: 2px;
}

/* ====== شريط التحميل و Loader ====== */
.progress-bar {
  width: 90%;
  height: 14px;
  margin: 16px auto;
  background: #262c4a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px #0004;
}
.progress {
  height: 100%;
  background: linear-gradient(90deg, #f3bf0d, #ff7800);
  width: 0;
  transition: width 0.3s;
}
.loader {
  margin: 24px auto 0 auto;
  border: 5px solid #f3bf0d33;
  border-top: 5px solid #f3bf0d;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0);}
  100% { transform: rotate(360deg);}
}

/* ====== إدخال بيانات الحساب ====== */
form label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}
/* تجميع مدخل معرف الحساب للوسط */
.player-id-input-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* مربع إدخال معرف الحساب */
.player-id-input {
  width: 80%;
  margin: 0 auto 6px auto;
  padding: 11px 14px;
  border-radius: 13px;
  border: 2px solid #f3bf0d;
  font-size: 1.08em;
  background: #131b33;
  color: #fff;
  outline: none;
  text-align: center;
  font-weight: bold;
  box-shadow: 0 1px 6px #f3bf0d22;
  transition: border 0.2s, box-shadow 0.2s;
}
.player-id-input:focus {
  border: 2px solid #ff7800;
  box-shadow: 0 0 0 3px #ff780044;
}
/* عنوان اختيار مستوى الحساب */
.level-label {
  display: block;
  margin: 15px 0 6px 0;
  font-weight: bold;
  font-size: 1.05em;
}
/* خيارات مربعات اختيار المستوى */
.player-level-options {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 10px;
}
/* مربع خيار مستوى الحساب */
.level-square {
  background: #262c4a;
  border-radius: 11px;
  box-shadow: 0 1px 8px #0002;
  padding: 12px 20px;
  text-align: center;
  border: 2px solid #f3bf0d77;
  transition: border 0.17s, background 0.15s;
  cursor: pointer;
  position: relative;
}
.level-square input[type="radio"] {
  display: none;
}
.level-square label {
  font-size: 1.15em;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
}
.level-square input[type="radio"]:checked + label,
.level-square:hover label {
  color: #ff7800;
}
.level-square input[type="radio"]:checked ~ label,
.level-square input[type="radio"]:checked + label {
  color: #ff7800;
}
.level-square input[type="radio"]:checked ~ label,
.level-square input[type="radio"]:checked + label {
  font-weight: 900;
}
.level-square:has(input[type="radio"]:checked) {
  border: 2.5px solid #ff7800;
  background: #191f33;
}

/* ====== صورة الأفاتار ====== */
.avatar {
  display: block;
  margin: 0 auto 10px auto;
  width: 60px;
  border-radius: 50%;
  border: 2.5px solid #f3bf0d;
}

/* ====== عداد الوقت والعروض والتجارب ====== */
.fake-timer {
  text-align: center;
  margin: 18px 0 0 0;
  font-size: 1.1em;
  color: #f3bf0d;
}
.offers-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 10px 0;
}
.offers-list li {
  margin: 10px 0;
}
.offers-list a {
  color: #fff;
  background: #f3bf0d;
  padding: 8px 18px;
  border-radius: 22px;
  font-size: 1em;
  text-decoration: none;
  font-weight: 700;
  transition: background 0.18s, color 0.18s;
  display: inline-block;
}
.offers-list a:hover {
  background: #ff7800;
  color: #0e1833;
}
.hint {
  color: #f3bf0d;
  margin: 14px 0 0 0;
  font-size: 1em;
}

/* ====== قسم تجارب المستخدمين ====== */
#testimonials {
  margin: 36px 0 0 0;
  background: #171e34;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 2px 8px #0003;
}
#testimonials h3 {
  color: #f3bf0d;
  font-size: 1.1em;
  margin-bottom: 6px;
}
.testimonial-list {
  display: flex;
  gap: 10px;
  flex-direction: column;
}
.testimonial {
  background: #262c4a;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.88em;
  color: #fff;
  box-shadow: 0 1px 4px #0002;
}
.testimonial img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #f3bf0d99;
}

/* ====== تنسيقات الهواتف الصغيرة ====== */
@media (max-width: 650px) {
  .container {
    max-width: 99vw;
    padding: 8px;
    min-height: 80vh;
  }
  .welcome-center {
    min-height: 55vh;
  }
  .welcome-padding {
    padding-top: 16px;
    padding-bottom: 20px;
  }
  .gems-options {
    flex-direction: column;
    gap: 14px;
    align-items: stretch;
  }
  .gems-card {
    min-width: unset;
    max-width: unset;
    margin-bottom: 12px;
  }
  .player-level-options {
    gap: 12px;
  }
  .level-square {
    padding: 12px 8vw;
    font-size: 1em;
  }
  .main-btn {
    width: 100%;
    font-size: 1.08em;
  }
  #testimonials {
    padding: 10px;
  }
  .progress-bar {
    width: 99%;
  }
  .player-id-input {
    width: 97%;
    font-size: 1em;
    padding: 11px 7px;
  }
}
@media (max-width: 370px) {
  .container {
    padding: 3px;
  }
  .logo {
    width: 74px;
  }
  .gems-card img {
    width: 47px;
  }
  .level-square {
    padding: 10px 7vw;
    font-size: 0.96em;
  }
}