body {
  user-select: none;
}

a:hover {
  color: white;
  /* Keep the same color on hover */
}

/* Header */
header {
  padding: 20px 0;
}

.logo-container {
  text-align: center;
}

.logo {
  font-size: 36px;
  color: #fff;
  text-decoration: none;
}
a {
  color: #000;
}
/* How to Play Section */
.how-to-play {
  background: linear-gradient(135deg, #d4fc79, #96e6a1);
  color: #333;
  padding: 30px;
  border-radius: 10px;
  max-width: 600px;
  width: 98%;
  margin: 20px auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.how-to-play h2 {
  margin-bottom: 20px;
  margin-top: 0px;
  margin-left: 0px;
  margin-right: 0px;
  color: #333;
  font-size: 24px;
  line-height: unset;
  font-weight: 700;
}

.how-to-play h3 {
  margin-bottom: 20px;
  margin-top: 0px;
  margin-left: 0px;
  margin-right: 0px;
  color: #333;
  font-size: 24px;
  line-height: unset;
  font-weight: 700;
}

.how-to-play p {
  font-size: 18px;
  line-height: 26px;
  margin-bottom: 15px;
}
/* Desktop Navigation */
.desktop-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 10px;
  box-shadow: none;
}

.desktop-nav a {
  font-size: 16px;
  color: #fff;
  text-decoration: none;
}

.desktop-nav a:hover {
  text-decoration: underline;
}



/* Game Area Box */
.game-area {
  position: relative;
  background-color: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
  width: 95%;
  margin: 20px auto;
}

.game-content{
  max-width: 600px;
  width: 100%;
}

/* Bob and Message Bubble container */
.bob-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.bob-image {
  width: 50px;
  height: 50px;
}

.tooltip {
  color: #000;
  font-size: 18px;
  max-width: 28ch;
  text-align: center;
  background-color: #fff;
  border: 2px solid #000;
  border-radius: 10px;
  padding: 1em;
  position: relative;
  margin-left: 20px;
}

.tooltip::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 10px 10px 10px 0;
  border-style: solid;
  border-color: transparent #000 transparent transparent;
}

.tooltip::after {
  content: "";
  position: absolute;
  left: -7px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 8px 8px 8px 0;
  border-style: solid;
  border-color: transparent #fff transparent transparent;
}

/* Start Game Overlay */

#start-game {
  background-color: #4da6ff;
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 18px;
  border-radius: 50px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#start-game:hover {
  background-color: #3385d6;
}



.board-wrapper {
  text-align: center;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
}

/* Logo of the Game */
.logo-container {
  text-align: center;
}

.logo {
  font-size: 36px;
  color: #fff;
  text-decoration: none;
}

.button_up {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  border-left: 2px solid white;
  border-top: 2px solid white;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  background-color: #c0c0c0;
  font-size: 15px;
  /*outline: 1px solid #808080;*/
}

.button_down {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding-left: 2px;
  padding-top: 2px;
  padding-bottom: 0px;
  padding-right: 0px;
  margin: 0px;
  border-left: 2px solid #808080;
  border-top: 2px solid #808080;
  border-right: 2px solid #c0c0c0;
  border-bottom: 2px solid #c0c0c0;
  background-color: #c0c0c0;
  font-size: 15px;
  /*outline: 1px solid #808080;*/
}

.img_button_up {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  border-left: 2px solid white;
  border-top: 2px solid white;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  background-color: #c0c0c0;
  font-size: 1px;
  /*outline: 1px solid #808080;*/
}

.img_button_down {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  border-left: 2px solid #808080;
  border-top: 2px solid #808080;
  border-right: 2px solid #c0c0c0;
  border-bottom: 2px solid #c0c0c0;
  background-color: #c0c0c0;
  font-size: 1px;
  /*outline: 1px solid #808080;*/
}

.container_border {
  padding: 0px;
  margin: 0px;
  /* border: 1px solid #808080; */
}

/*Main table which content the bar and the MainFrame*/
.main_table {
  padding: 0px;
  margin: 0px;
  border-collapse: collapse;
}

.main_table td {
  margin: 0px;
  padding: 0px;
  font-weight: bold;
  border: 6px solid #c0c0c0;
}

.panle_down_table {
  margin: 0px;
  padding: 3px;
  background: #c0c0c0;
  border-top: 2px solid #808080;
  border-left: 2px solid #808080;
  border-bottom: 2px solid white;
  border-right: 2px solid white;
}

.function_bar_table {
  margin: 0px;
  padding: 0px;
  border-collapse: collapse;
}

/*div edition of main frame*/
.main_container {
  margin-right: auto;
  margin-left: auto;
  margin-top: 17px;
  margin-bottom: 0px;
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  background-color: #ddd;
}

.function_bar_div {
  margin: 0px;
  padding: 0px;
}

.main_frame_div {
  margin: 0px;
  padding: 0px;
  border: 0px;
}

.panle_down_div {
  text-align: center;
  margin: 0px;
  padding: 6px;
  background: #ddd
    /* background: linear-gradient(to bottom right, #87CEFA, #4169E1);
  border: 3px solid #00008B; */
}

.function_left_div {
  text-align: center;
  width: 45px;
  margin: 0px;
  padding: 1px;
  border-left: 2px solid #808080;
  border-top: 2px solid #808080;
  border-bottom: 2px solid white;
  border-right: 2px solid white;
  float: left;
  color: red;
  font-weight: bold;
  /* font-size: 15pt;
	font-family: 'haettenschweiler'; */
}

.function_right_div {
  text-align: center;
  width: 45px;
  margin: 0px;
  padding: 1px;
  border-left: 2px solid #808080;
  border-top: 2px solid #808080;
  border-bottom: 2px solid white;
  border-right: 2px solid white;
  float: right;
  color: red;
  font-weight: bold;
  /* font-size: 15pt;
  font-family: "haettenschweiler"; */
}

.function_mid_div {
  width: 32px;
  margin: auto;
  padding: 0px;
}

.mine_area_table {
  cursor: pointer;
  background: #ddd;
  margin: 0px;
  padding: 0px;
  border-collapse: collapse;
  width: 100%;
}

.mine_area_table tr {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
}

.mine_area_table tr td {
  margin: 0px;
  padding: 2px;
}

.mine_area_table tr td>div {
  aspect-ratio: 1 / 1;
}

.panle_down_nopadding_div {
  background: #ddd;
  text-align: left;
  margin: 0px;
  padding: 0px;
  margin-top: 6px;
  cursor: pointer;
}

.mine_up {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  background-color: #c0c0c0;
  color: #000000;
  font-size: 17px;
  font-weight: bold;
  background: linear-gradient(to bottom right, #87CEFA, #4169E1);
  border: 2px solid #00008B;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  background-color: #c0c0c0;
  font-size: 17px;
  font-weight: bold;
}

.mine_down_1 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #0000ff;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_2 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #008000;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_3 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #ff0000;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_4 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #000080;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_5 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #800000;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;

}

.mine_down_6 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #008080;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_7 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #00ff00;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_8 {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  color: #ffff00;
  font-size: 17px;
  font-weight: bold;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_bomb_blast {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  background-color: red;
  color: red;
  font-size: 17px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mine_down_bomb {
  text-align: center;
  vertical-align: middle;
  cursor: default;
  padding: 1px;
  margin: 0px;
  background-color: #c0c0c0;
  color: #c0c0c0;
  font-size: 17px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Footer */
footer {
  background: black;
  color: white;
  padding: 40px 0 0 0;
  width: 100%;
  margin-top: auto;
}

.footer-column h4 {
  font-size: unset;
  /* Resets font size */
  line-height: unset;
  /* Resets line height */
  margin: unset;
  /* Resets margin */
  font-weight: 700;
  /* Resets font weight */
}

.footer-content-container {
  max-width: 900px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.footer-column {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  font-size: 24px;
  color: white;
  text-decoration: none;
}

.footer-column h4 {
  margin-bottom: 10px;
}

.footer-column a {
  color: white;
  text-decoration: none;
  margin-bottom: 8px;
}

.footer-column a:hover {
  text-decoration: underline;
}
/* Hamburger Menu for Mobile */
.hamburger-menu {
  display: none;
  position: relative;
}

.hamburger-icon {
  font-size: 30px;
  cursor: pointer;
  position: absolute;
  top: 15px;
  left: 15px;
  color: #fff;
}

.hamburger-links {
  display: none;
  flex-direction: column;
  background-color: #003366;
  padding: 10px;
  position: absolute;
  top: 50px;
  left: 0;
  width: 200px;
  z-index: 99;
}

.hamburger-links.active {
  display: flex;
}

.hamburger-links a {
  color: #fff;
  padding: 10px;
  text-decoration: none;
}

.hamburger-links a:hover {
  background-color: #2f6d9b;
}



/* Hide desktop navigation on mobile */
@media (max-width: 768px) {
  .desktop-nav {
    display: none;
  }
  .hamburger-menu {
    display: block;
  }
}
@media only screen and (max-width: 400px) {
  /* #playground {
    display: none;
  }

  #btn_restart {
    display: none;
  } */

  .footer-grid {
    grid-template-columns: 1fr;
}


.mine_down_1,.mine_down_2,.mine_down_3,.mine_down_4,.mine_down_5,.mine_down_6,.mine_down_7,.mine_down_8,.mine_up,.mine_down,.mine_down_bomb_blast,.mine_down_bomb { font-size: 11px;}
}

@media (orientation: landscape) {
  .game_container {
    width: 300px;
    height: 300px;
  }

  #msg {
    display: none;
  }

}







  /* Modal styling */
  .modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    background-color: rgba(0, 0, 0, 0.7); /* Black background with opacity */
  }

  .modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    text-align: center;
  }

  .btn {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    cursor: pointer;
  }
  
  .btn:hover {
    background-color: #0056b3;
  }


  .result-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 90%;
    max-width: 350px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }

  #play-again {
    background-color: #4da6ff;
    color: white;
    border: none;
    padding: 12px 24px;
    font-size: 18px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 20px;
    width: 100%;
    font-weight: bold;
  }

  .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    display: none; /* Initially hide the modal */
    justify-content: center;
    align-items: center;
    z-index: 10;
  }