/* @import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bowlby+One+SC&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: rgb(220, 228, 228);
}

.game_home {
  position: relative;
  margin-left: 10%;
  margin-top: 30px;
  border: 15px solid #313131;
  border-radius: 40px;
  width: 80%;
  height: 702px;
  box-shadow: 0 0 15px rgba(52, 52, 52, 0.8),
    inset 0 0 20px rgba(44, 43, 43, 0.3);
  z-index: 10;
} */

@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Bowlby+One+SC&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: rgb(220, 228, 228);
  
  overflow: hidden; /* Mencegah scrollbar muncul */
}

.game_home {
  position: absolute; /* Diubah agar pemosisian oleh JS berfungsi */
  width: 1366px; /* Lebar tetap untuk skala */
  height: 768px; /* Tinggi tetap untuk skala */
  left: 0;
  top: 0;
  transform-origin: top left; /* Mengatur titik acuan untuk transformasi skala */
  border: 15px solid #313131;
  border-radius: 40px;
  box-shadow: 0 0 15px rgba(52, 52, 52, 0.8),
    inset 0 0 20px rgba(44, 43, 43, 0.3);
  z-index: 10;
}

.game_home .background_image {
  width: 100%;
  height: 100%;
  border-radius: 27px;
  position: absolute;
  z-index: 5;
  /* opacity: 0.7; */
  top: 0;
  left: 0;
  margin: 0;
}

.game_fisrt_interface .logo_game {
  height: 350px;
  width: 550px;
  margin-left: 300px;
  margin-top: 30px;
  position: absolute;
  z-index: 10;
  animation: scaleImage 2s ease-in-out infinite;
}

@keyframes scaleImage {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}

.circle {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #353434;
  margin-top: 40px;
  cursor: pointer;
  margin-left: 90%;
  z-index: 25;
}

.circle i {
  color: #ffffff;
  font-size: 25px;
  z-index: 35;
}

.game_fisrt_interface .play_button_img {
  position: relative;
  z-index: 25;
  border-radius: 16px;
  width: 180px;
  height: 90px;
  margin-top: 37%;
  margin-left: 42%;
  cursor: pointer;
  animation: scaleImage2 5s ease-in-out 1s infinite;
}

@keyframes scaleImage2 {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

.circle_for_select_options {
  display: flex;
  gap: 10px;
  position: absolute;
  left: 45%;
  bottom: 20px;
  z-index: 24;
  display: none;
}

.game_selectmode_interface {
  width: 590px;
  height: 400px;
  position: absolute;
  margin-left: 25%;
  margin-top: 8%;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
  border: 10px solid #292828;
  z-index: 24;
  border-radius: 40px;
  display: none;
}

.interfaceback_image {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  position: absolute;
  object-fit: cover;
}

.game_selectmode_interface h2 {
  position: absolute;
  font-size: 46px;
  font-family: "Bowlby One SC", sans-serif;
  margin-left: 120px;
  margin-top: 25px;
  color: #ffffff;
  z-index: 3;
}

.game_selectmode_interface .selection_mode {
  margin-top: 150px;
  margin-left: 30px;
  height: 120px;
  width: 90%;
  position: relative;
  display: flex;
  justify-content: center;
  gap: 40px;
}
.players {
  width: 100px;
  height: 100px;
  background-color: #BE4409;
  /* background-color: rgba(27, 118, 35, 0.618); */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 50%;
  border: 2px solid white;
  z-index: 3;
  cursor: pointer;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
}

.players.selected {
  background-color: rgba(33, 208, 48, 0.459);
}

#four {
  flex-direction: column;
}

#three {
  flex-direction: column;
}
.selection_mode .players i {
  color: whitesmoke;
  font-size: 20px;
  position: relative;
}

.game_selectmode_interface .next_container {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-left: 80%;
  margin-top: 10%;
  cursor: pointer;
  background-color: transparent;
  border: none;
  z-index: 25;
}

.game_username_interface .next_container {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-left: 80%;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

.next_container P {
  font-family: "Bowlby One SC", sans-serif;
  font-size: x-large;
  font-weight: 700;
  color: black;
  transition: transform 0.3s ease;
}

.next_container:hover {
  transform: scale(1.1);
}

.next_container i {
  font-size: x-large;
  font-size: 35px;
  margin-top: 3px;
}

input[type="radio"] {
  display: none;
}

.circle_footer {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 4px solid rgb(83, 83, 83);
  cursor: pointer;
}

.circle_footer.active {
  border: 4px solid rgb(83, 83, 83);
  background-color: rgb(41, 255, 29);
}

input[type="text"] {
  background-color: rgba(255, 255, 255, 0.289);
  width: 330px;
  height: 50px;
  border: none;
  border-bottom: 3px solid rgba(0, 0, 0, 0.442);
  margin-left: 100px;
  margin-top: 20px;
  font-family: "Poppins", sans-serif;
  font-size: x-large;
  padding-left: 80px;
  position: relative;
  outline: none;
  border-radius: 10px;
  text-transform: uppercase;
}

.game_username_interface {
  width: 590px;
  height: 400px;
  position: absolute;
  margin-left: 25%;
  margin-top: 8%;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
  border: 10px solid #292828;
  z-index: 24;
  border-radius: 40px;
  display: none;
}

.game_username_interface h2 {
  position: absolute;
  font-size: 46px;
  font-family: "Bowlby One SC", sans-serif;
  margin-left: 100px;
  margin-top: 10px;
  color: #ffffff;
  padding: 0%;
}

.user_input_name {
  margin-top: 60px;
}
.user1 {
  position: relative;
  display: none;
}

.user1.active {
  display: block;
}

.user1 img {
  position: absolute;
  left: 55px;
}

.attachment_image_ani {
  z-index: 40;
  margin-top: 20rem;
  position: relative;
  margin-left: 58rem;
  display: none;
  animation: moveXY 5s infinite alternate;
}

@keyframes moveXY {
  0% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-10px, -10px);
  }
  100% {
    transform: translate(0, 0);
  }
}

.game_userlevel_select_interface {
  width: 590px;
  height: 400px;
  position: absolute;
  margin-left: 25%;
  margin-top: 8%;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
  border: 10px solid #292828;
  z-index: 24;
  border-radius: 40px;
  display: none;
}

.game_userlevel_select_interface h2 {
  position: absolute;
  font-size: 46px;
  font-family: "Bowlby One SC", sans-serif;
  margin-left: 100px;
  margin-top: 10px;
  color: #ffffff;
  padding: 0%;
}

.LEVEL_container {
  width: 100%;
  height: 50px;
  margin-top: 100px;
  position: relative;
  margin-left: 20px;
}

.LEVEL_container2 {
  width: 100%;
  height: 50px;
  margin-top: 40px;
  position: relative;
  margin-left: 20px;
}

.LEVEL_container3 {
  width: 100%;
  height: 50px;
  margin-top: 40px;
  position: relative;
  margin-left: 20px;
}

.LEVEL_container h3 {
  margin-left: 150px;
  position: relative;
  color: rgba(0, 0, 0, 0.871);
  font-family: "Bowlby One SC", sans-serif;
  font-size: 42px;
  letter-spacing: 2px;
}

.LEVEL_container2 h3 {
  margin-left: 150px;
  position: relative;
  color: rgba(0, 0, 0, 0.871);
  font-family: "Bowlby One SC", sans-serif;
  font-size: 42px;
  letter-spacing: 2px;
}

.LEVEL_container3 h3 {
  margin-left: 150px;
  position: relative;
  color: rgba(0, 0, 0, 0.871);
  font-family: "Bowlby One SC", sans-serif;
  font-size: 42px;
  letter-spacing: 2px;
}

.easy_mode {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  border: 4px solid rgb(0, 0, 0);
  background-color: #344a2900;
  z-index: 36;
  margin-left: 100px;
  cursor: pointer;
  position: absolute;
  margin-top: 19px;
}

.easy_mode_selected {
  background-color: rgba(45, 255, 7, 0.667);
}

.game_userlevel_select_interface .next_container {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-left: 80%;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

.game_userlevel_select_interface .next_container {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-left: 80%;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

.in-game-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 20;
  display: none;
  gap: 200px;
}

.board {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  z-index: 10;
}

.board-img {
  object-fit: cover;
  position: absolute;
  width: 625px;
  height: 625px;
  z-index: 11;

}

.board-border-image {
  position: absolute;
  width: 105%;
  height: 105%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  box-shadow: 0 0 20px 4px rgba(0, 0, 0, 0.882);
}

.dice {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  color: white;
  font-family: sans-serif;
  border-radius: 15px;
}

.dice-roll-btn {
  width: 70px;
  height: 70px;
  padding: 0;
  border: none;
  background-color: rgb(109, 247, 171);
  border-radius: 15px;
  border: 3px solid rgb(0, 0, 0);
  cursor: pointer;
}

.dice-roll-btn.disable {
  background-color: rgba(0, 0, 0, 0.473);
  border: 3px solid rgba(0, 0, 0, 0.507);
}

.dice-roll-btn img {
  width: 80%;
  height: 80%;
  object-fit: cover;
}

.board .square {
  position: relative;
  border: 1px solid rgb(255, 0, 0);
  z-index: 20;
}

/* Player Token Styling - Bentuk Bulat dengan 2 Huruf Inisial */




.current-player-name {
  position: absolute;
  top: -90px;
  left: 10px;
  color: white;
  font-family: sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

/* Turn Indicator Styling */
.turn-indicator {
  position: relative;
  top: 0;
  left: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 12px 20px;
  border-radius: 20px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border: 2px solid #fff;
  margin-bottom: 15px;
  animation: pulse 2s infinite;
  width: fit-content;
  align-self: flex-start;
}

.turn-text {
  margin: 0;
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  text-align: center;
  white-space: nowrap;
}

.turn-player-name {
  color: #FFD700;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.dice_all_images_six {
  position: absolute;
  left: 10%;
  top: 40%;
}

.dice-img {
  width: 120px;
  height: 120px;
}

.close-restart-btns {
  position: absolute;
  z-index: 30;
  display: flex;
  gap: 20px;
  right: 8px;
  top: 10px;
  display: flex;
  flex-direction: column;
  display: none;
  font-family: sans-serif;
}

.restart-btn {
  border: none;
  background-color: rgb(0, 224, 0);
  padding: 10px 5px;
  border-radius: 10px;
  box-shadow: 4px 4px 20px black;
  color: white;
  cursor: pointer;
}

.home-btn {
  border: none;
  padding: 10px 5px;
  background-color: orangered;
  color: white;
  border-radius: 10px;
  box-shadow: 4px 4px 20px black;
  cursor: pointer;
}

.player-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.players-in-game {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  width: 100%;
}

.player-in-game {
  width: 220px;
  /* padding: 10px; */
  position: relative;
  display: flex;
  align-items: center;
  /* padding-left: 80px; */
  height: 60px;
  filter: brightness(0.1);
  box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.4);
  border-radius: 10px;
}

.player-in-game.current {
  filter: brightness(1);
}

.player-in-game img {
  position: absolute;
  left: 0;
  top: -20px;
  width: 80px;
  height: 80px;
}

.player-in-game p {
  font-family: "Poppins", sans-serif;
  font-size: larger;
  font-weight: 600;
  color: rgb(255, 255, 255);
  text-transform: uppercase;
}

.players-default-area {
  position: absolute;
  bottom: -28px;
  left: -32%;
  width: 150px;
  height: 150px;
  border-radius: 15px;
  background-color: rgba(4, 183, 192, 0.199);
  border: 5px solid black;
}
/* ------------------------------------------------------------------------------------------------ */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  overflow: auto;
  background: rgba(0, 0, 0, 0.7);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  width: 70%;
  max-width: 800px;
  border-radius: 15px;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-button {
  position: absolute;
  z-index: 9999;
  right: 20px;
  top: 15px;
  font-size: 28px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
}

.close-button:hover {
  color: #000;
}

.modal-title {
  margin-top: 0;
  text-align: center;
  font-size: 28px;
  color: #2c3e50;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
}

.modal-body {
  max-height: 60vh;
  overflow-y: auto;
}

.rules-list {
  padding-left: 20px;
  line-height: 1.8;
  color: #333;
  font-size: 16px;
}

.points-title {
  margin-top: 25px;
  font-size: 22px;
  color: #2c3e50;
  border-bottom: 1px dashed #aaa;
  padding-bottom: 5px;
}

.points-list {
  padding-left: 20px;
  line-height: 1.6;
  color: #444;
  font-size: 16px;
}


/* ---------------------------------------------------------------------------------------------------- */
#dice-player1 {
  position: absolute;
  top: 20px;
  left: 15px;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, rgb(40, 255, 2) 0%, rgb(30, 200, 0) 100%);
  box-shadow: 0 0 0 4px rgb(26, 3, 140), 0 4px 15px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

#dice-player1:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgb(26, 3, 140), 0 6px 20px rgba(0, 0, 0, 0.4);
}

#dice-player2 {
  position: absolute;
  top: 20px;
  left: 85px;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, rgb(1, 247, 255) 0%, rgb(0, 200, 200) 100%);
  box-shadow: 0 0 0 4px rgb(0, 3, 4), 0 4px 15px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

#dice-player2:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgb(0, 3, 4), 0 6px 20px rgba(0, 0, 0, 0.4);
}

#dice-player3 {
  position: absolute;
  top: 80px;
  left: 15px;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, rgb(255, 86, 1) 0%, rgb(220, 70, 0) 100%);
  box-shadow: 0 0 0 4px rgb(19, 1, 111), 0 4px 15px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

#dice-player3:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgb(19, 1, 111), 0 6px 20px rgba(0, 0, 0, 0.4);
}

#dice-player4 {
  position: absolute;
  top: 80px;
  left: 85px;
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, rgb(0, 103, 229) 0%, rgb(0, 80, 180) 100%);
  box-shadow: 0 0 0 4px rgb(26, 3, 140), 0 4px 15px rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border: 2px solid #fff;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 12px;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  cursor: pointer;
  transition: all 0.3s ease;
}

#dice-player4:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgb(26, 3, 140), 0 6px 20px rgba(0, 0, 0, 0.4);
}

#dice-player1.remove,
#dice-player2.remove,
#dice-player3.remove,
#dice-player4.remove {
  display: none;
}
/* Responsive untuk mobile landscape */
/* @ screen and (max-width: 767px) and (orientation: landscape) {
  .game_home {
    width: 100%;
    height: 100vh;
    margin: 0;
    border: none;
    border-radius: 0;
  }

  .in-game-container {
    flex-direction: row;
    gap: 10px;
    padding: 10px;
  }

  .board {
    width: 60%;
    height: 90vh;
  }

  .board-img {
    width: 100%;
    height: 100%;
  }

  .dice {
    width: 30%;
    height: 90vh;
    padding: 10px;
  }

  .dice-img {
    width: 80px;
    height: 80px;
  }

  .dice-roll-btn {
    width: 50px;
    height: 50px;
  }

  .player-container {
    width: 30%;
    height: 90vh;
    gap: 5px;
  }

  .player-in-game {
    width: 100%;
    height: 50px;
    padding-left: 60px;
  }

  .player-in-game img {
    width: 50px;
    height: 50px;
    top: -10px;
  }

  .player-in-game p {
    font-size: medium;
  }

  .close-restart-btns {
    top: 5px;
    right: 5px;
    gap: 10px;
  }

  .restart-btn,
  .home-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .square {
    width: 10%;
    height: 10%;
  }

  .square .playerDisc1,
  .square .playerDisc2,
  .square .playerDisc3,
  .square .playerDisc4 {
    width: 10px;
    height: 10px;
    top: 5px;
    left: 5px;
  }

  .square .playerDisc2 {
    left: 20px;
  }

  .square .playerDisc3 {
    top: 20px;
    left: 5px;
  }

  .square .playerDisc4 {
    top: 20px;
    left: 20px;
  }
} */
/* Sesuaikan ukuran font untuk mobile landscape
@media screen and (max-width: 767px) and (orientation: landscape) {
  .game_selectmode_interface h2,
  .game_username_interface h2,
  .game_userlevel_select_interface h2 {
    font-size: 24px;
    margin-left: 50px;
    margin-top: 10px;
  }

  .next_container p {
    font-size: 16px;
  }

  .next_container i {
    font-size: 20px;
  }

  input[type="text"] {
    width: 200px;
    height: 30px;
    font-size: 14px;
    padding-left: 40px;
  }

  .user1 img {
    width: 40px;
    height: 40px;
    left: 30px;
  }

  .easy_mode {
    width: 15px;
    height: 15px;
    margin-left: 50px;
  }

  .LEVEL_container h3,
  .LEVEL_container2 h3,
  .LEVEL_container3 h3 {
    font-size: 20px;
    margin-left: 80px;
  }
} */
/* Sesuaikan layout untuk layar kecil */
/* @media screen and (max-width: 767px) and (orientation: landscape) {
  .board {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  .square {
    width: 8%;
    height: 8%;
    margin: 1px;
  }

  .dice {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
  }

  .player-container {
    align-items: center;
    justify-content: center;
  }

  .players-in-game {
    gap: 5px;
  }

  .player-in-game {
    width: 100%;
    height: 40px;
    padding-left: 50px;
  }

  .player-in-game img {
    width: 40px;
    height: 40px;
    top: -10px;
  }

  .player-in-game p {
    font-size: 14px;
  }
} */
/* Modal backdrop */
#questionModal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none; /* hidden by default */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Modal content box */
#questionModal .modal-content {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  padding: 25px 30px;
  width: 350px;
  max-width: 90%;
  text-align: center;
  position: relative;
}

/* Title */
#questionModal #questionTitle {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: #222;
  font-weight: 700;
}

/* Question text */
#questionModal #questionText {
  font-size: 1.1rem;
  margin-bottom: 20px;
  color: #333;
}

/* Radio options container */
#questionModal #questionForm label {
  display: block;
  margin-bottom: 12px;
  cursor: pointer;
  font-size: 1rem;
  color: #444;
  padding-left: 30px;
  position: relative;
  user-select: none;
}

/* Hide default radio button */
#questionModal #questionForm input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 20px;
  width: 20px;
  left: 0;
  top: 3px;
}

/* Custom radio button */
#questionModal #questionForm label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border: 2px solid #007bff;
  border-radius: 50%;
  background: white;
  transition: background-color 0.3s, border-color 0.3s;
  box-sizing: border-box;
}

/* Checked state - use sibling selector for input:checked + label::before */
#questionModal #questionForm input[type="radio"]:checked + label::before {
  background-color: #007bff;
  border-color: #007bff;
}

/* Submit button */
#questionModal #submitAnswer {
  margin-top: 15px;
  padding: 12px 30px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  background-color: #007bff;
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
  user-select: none;
  outline-offset: 2px;
}

/* Disabled submit button */
#questionModal #submitAnswer:disabled {
  background-color: #a1c8ff;
  cursor: not-allowed;
}

/* Submit button hover */
#questionModal #submitAnswer:not(:disabled):hover {
  background-color: #0056b3;
}

/* Show modal */
#questionModal.show {
  display: flex;
  animation: fadeIn 0.25s ease forwards;
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

/* Dim and disable background when modal open */
.modal-open .in-game-container {
  filter: brightness(0.5);
  pointer-events: none; /* pmediarevent clicks */
  user-select: none; /* prevent text selection */
}

/* Enable interaction inside modal */
.modal-open #questionModal {
  pointer-events: auto;
}
#questionModal #questionForm label input[type="radio"]:checked + span::before {
  background-color: #007bff;
  border-color: #007bff;
}

/* Feedback modal title colors */
#feedbackTitle.correct {
  color: #007bff; /* Blue for correct */
}

#feedbackTitle.incorrect {
  color: #dc3545; /* Red for incorrect */
}

/* Optional: modal background or border color */
/* #feedbackModal.correct-bg .modal-content {
  border: 3px solid #007bff;
}

#feedbackModal.incorrect-bg .modal-content {
  border: 3px solid #dc3545;
} */
/* Style untuk modal hasil jawaban */

#feedbackModal .modal-content.correct {
  background-color: #d4edda !important; /* Hijau muda */
  color: #155724 !important; /* Teks hijau tua */
  border: 2px solid #155724 !important;
}

#feedbackModal .modal-content.wrong {
  background-color: #f8d7da !important; /* Merah muda */
  color: #971320 !important; /* Teks merah tua */
  text-shadow: red 1px 0 1px;
  border: 4px solid #721c24 !important;
}

#finalScoreModal .modal-content {
  max-width: 400px;
  text-align: center;
}

#finalScoreModal ul li {
  margin: 8px 0;
}

.modal-ok-button {
  display: block;
  margin: 20px auto 0 auto; /* top margin 20px, auto left/right for center */
  padding: 12px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  background-color: #007bff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  user-select: none;
}

.modal-ok-button:hover {
  background-color: #0056b3;
}

.modal-ok-button.correct {
  background-color: #007bff; /* Blue for correct */
}

.modal-ok-button.correct:hover {
  background-color: #0056b3;
}

.modal-ok-button.incorrect {
  background-color: #e74c3c; /* Red for incorrect */
}

.modal-ok-button.incorrect:hover {
  background-color: #c0392b;
}

/* Simple Player Cards */
.player-in-game.current .player-card {
  border-width: 3px !important;
  background: rgba(255,255,255,0.95) !important;
}

.player-in-game.current .player-name {
  color: #2d3748 !important;
  font-weight: 700 !important;
}

.player-in-game.current .player-score {
  color: #2d3748 !important;
  font-weight: 600 !important;
}

.player-in-game.current .player-status-indicator {
  background: #48bb78 !important;
}

.player-in-game:not(.current) .player-card {
  opacity: 0.75;
}

.player-in-game:not(.current) .player-status-indicator {
  background: #a0aec0 !important;
}

/* Pulse animation for active player */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Responsive Design for Small Screens */
@media (max-width: 768px) {
  .player-card {
    padding: 12px 16px !important;
    margin: 6px 0 !important;
  }
  
  .player-name {
    font-size: 16px !important;
  }
  
  .player-score {
    font-size: 13px !important;
  }
  
  .player-avatar-frame {
    width: 45px !important;
    height: 45px !important;
  }
  
  .player-avatar-frame img {
    width: 38px !important;
    height: 38px !important;
  }
}

.player-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.player-avatar-frame::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, rgba(255,255,255,0.3), rgba(255,255,255,0.1));
  border-radius: 50%;
  z-index: 1;
}

/* Turn Indicator Improvements */
.turn-indicator {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 2px solid #007bff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 15px;
  max-width: 320px;
  width: 100%;
  box-shadow: 0 3px 10px rgba(0,123,255,0.15);
  text-align: left;
}

.turn-text {
  margin: 0;
  font-weight: 600;
  color: #2c3e50;
  font-size: 16px;
}

.turn-player-name {
  color: #007bff;
  font-weight: 700;
}
