* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: black;
  font-family: sans-serif;
  color: white;
}

/* === HEADER === */
header {
  position: relative;
  padding: 16px;
}

/* Between 1 and 20 */
.p-header {
  position: absolute;
  top: 20px;
  right: 8px;
  font-size: 16px;
  color: aliceblue;
}

/* عنوان Guess My Number */
.main-world {
  font-size: 70px;
  text-align: center;
  word-spacing: 4px;
  margin: 8px 0 48px 0; /* قلل المسافة من فوق */
}

/* المربع اللي فيه علامة الاستفهام */
.box-number {
  width: 90px;
  height: 90px;
  margin: 0 auto;
  border: 4px solid white;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  margin-bottom: -20px;
  z-index: 2;
  position: relative;
}

.hr {
  border: 2px solid white;
  margin: 0 auto;
  margin-top: -38px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.box {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* يخلي العناصر تبدأ من اليسار */
  gap: 100px; /* مسافة بين الزر والصندوق */
  margin-top: -120px;
}
/* left section */
.left {
  width: 50%;
  padding: 0 32px;
  box-sizing: border-box;
  display: flex;
  justify-content: flex-start; /* محاذاة لليسار */
  align-items: flex-start;
}

/* game section */
.game-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 50px;
  gap: 20px;
  text-align: center;
}

.p-1 {
  font-size: 48px;
  margin-top: 8px;
  word-spacing: 10px;
  font-weight: 600;
}

.p-2 {
  font-size: 24px;
}
.p-3 {
  font-size: 24px;
}

.box-guess {
  background-color: black;
  border: 2px solid white;
  width: 300px;
  height: 70px;
  color: white;
  font-size: 30px;
  text-align: center;
  border-radius: 10px;
  padding: 18px 0;
  line-height: 70px;
  box-sizing: border-box;
}
.box-guess::placeholder {
  color: #aaa;
  font-size: 24px;
  text-align: center;
}

.check {
  width: 300px;
  height: 60px;
  font-size: 25px;
  background-color: #eee;
  cursor: pointer;
  border-radius: 10px;
  color: rgb(7, 12, 0);
}
/* زر Again! قريب من الزاوية */
.btn-again {
  font-size: 25px;
  width: 300px;
  height: 60px;
  padding: 8px 16px;
  background-color: #000000;
  border-radius: 10px;
  cursor: pointer;
  margin-top: -16px;
  border: none;
  color: rgb(181, 181, 181);
}
/* === RESPONSIVE === */

@media (max-width: 768px) {
  .main-world {
    font-size: 48px;
    margin-top: 12px;
    margin-bottom: 48px;
    word-spacing: 3px;
    font-weight: 600;
  }
  .btn-again {
    width: 80%;
    font-size: 20px;
    margin: -8px auto;
    display: block;
  }
  .game-section {
    gap: 16px;
    margin-top: 50px;
  }

  .box-guess {
    width: 80%;
    font-size: 28px;
    margin-bottom: 8px;
  }

  .check {
    width: 80%;
    font-size: 20px;
  }

  .p-1 {
    font-size: 32px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 8px;
  }

  .p-2 {
    font-size: 18px;
  }
}
