/* ===== Font Arab: LPMQ Isep Misbah =====
   Pastikan file "LPMQ Isep Misbah.ttf" berada di dalam folder assets/.
   unicode-range membuat font Arab dipakai hanya untuk karakter Arab,
   sedangkan huruf Latin tetap menggunakan Arial.
*/
@font-face {
  font-family: "LPMQ Isep Misbah";
  src: url("assets/LPMQ Isep Misbah.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

body {
  margin: 0;
  background: black;
  color: white;
  font-family: Arial, "LPMQ Isep Misbah", sans-serif;
}

html,
body {
  height: 100%;
}

.hidden {
  display: none;
}

#menuScreen {
  text-align: center;
  margin-top: 100px;
}

#gameScreen {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#kelasSelect {
  padding: 10px 10px;
  font-size: 18px;
  height: 40px;
  border-radius: 10px;
  background-color: rgb(76, 238, 76);
}

button {
  padding: 10px 20px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 10px;
  background-color: rgb(238, 133, 63);
}

.topBar {
  position: relative;
  margin-top: 60px;
  display: flex;
  justify-content: center;
  gap: 25px;
}

.lifeline {
  border: 2px solid white;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
}

.lifeline.used {
  opacity: 0.3;
  pointer-events: none;
}

.mainArea {
  display: flex;
  justify-content: center;
  margin-top: 80px;
}

.centerWrapper {
  display: flex;
  align-items: center;
  gap: 60px;
}

.logo {
  text-align: center;
}

.logo img {
  width: 350px;
  display: block;
  margin: 0 auto;
}

.moneyList {
  text-align: right;
  font-size: 18px;
  line-height: 0.7;
}

.moneyItem {
  margin: 6px 0;
  padding: 2px 6px;
}

.activeMoney {
  color: lime;
  font-weight: bold;
  font-size: 20px;
}

.questionBox {
  text-align: center;
  margin-top: 20px;
  width: 90%;
  max-width: 1100px;
}

#answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 40px;
  width: 95%;
  max-width: 1100px;
  margin: 30px auto;
}

.answerBtn {
  padding: 12px 20px;
  font-size: 18px;
  font-weight: 400;
  background: #001f6b;
  color: white;
  border: 2px solid white;
  border-radius: 30px;
  cursor: pointer;
  transition: 0.3s;
  width: 100%;
}

.answerBtn:hover {
  background: #0033cc;
}

.correctAnswer {
  background: green !important;
  border: 2px solid lime;
}

.wrongAnswer {
  background: red !important;
  border: 2px solid #ff8080;
}

#popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  z-index: 9999;

  width: 500px;
  height: 300px;

  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 40px;
  font-size: 34px;
  text-shadow: 2px 2px 5px black;
  font-weight: bold;
  color: yellow;

  background: radial-gradient(circle at center, #00ff00 40%, #009900 100%);

  clip-path: polygon(
    50% 0%,
    60% 12%,
    75% 5%,
    70% 20%,
    95% 25%,
    80% 40%,
    100% 50%,
    80% 60%,
    95% 75%,
    70% 80%,
    75% 95%,
    60% 88%,
    50% 100%,
    40% 88%,
    25% 95%,
    30% 80%,
    5% 75%,
    20% 60%,
    0% 50%,
    20% 40%,
    5% 25%,
    30% 20%,
    25% 5%,
    40% 12%
  );

  box-shadow: 0 0 60px lime;
  transition: transform 0.3s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform-origin: center center;
}

.popup-correct {
  background: radial-gradient(
    circle at center,
    #00ff00 40%,
    #009900 100%
  ) !important;
  box-shadow: 0 0 60px lime !important;
}

.popup-wrong {
  background: radial-gradient(
    circle at center,
    #ff0000 40%,
    #990000 100%
  ) !important;
  box-shadow: 0 0 60px red !important;
}

#popup.show {
  transform: translate(-50%, -50%) scale(1);
}

@keyframes spinLogo {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.logo.spin img {
  animation: spinLogo 4s linear infinite;
}

/* ===== Tampilan teks soal dan pilihan jawaban ===== */
#questionText,
.answerBtn {
  font-family: Arial, "LPMQ Isep Misbah", sans-serif;
  line-height: 1.9;
  direction: auto;
  unicode-bidi: plaintext;
  overflow-wrap: break-word;
}

/* Penyesuaian khusus potongan/teks Arab di dalam soal & opsi jawaban */
.arab-text {
  font-family: "LPMQ Isep Misbah", serif;
  font-weight: 400 !important;
  font-synthesis-weight: none;
  font-size: 1.35em;
  line-height: 2;
  direction: rtl;
  unicode-bidi: isolate;
  padding: 0 4px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
