* {
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  box-sizing: border-box;
}

html{
  font-size: 14px;
}



body {
  background-image: url('../jpg/minesweeper1.png');
  text-align: center;
  color: lightgray;
  font-family: 'Comic Neue', sans-serif;
  font-size: 1rem; 
  font-weight: 700;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh; 
  margin: 0 auto;
}

h1 {
  font-weight: bold; 
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

table {
  background-color: grey;
  margin: 1.25rem auto;
  border: 2px solid lightgray;
  border-collapse: collapse; 
}

.cell {
  color: grey;
  border: 1px solid rgb(90, 90, 90);
  width: 3rem;
  height: 3rem;
  font-size: 1.5em;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  transition: 0.3s;
  box-sizing: border-box;
}

.cell.clicked {
  color: black;
  border: 1px solid rgb(90, 90, 90);
  background-color: rgb(202, 202, 202);
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.cell.clicked.mine {
  border: 2px solid red;
  background-color: rgb(255, 100, 100);
  color: white;
}

.restart {
  margin-top: 1.25rem;
}

.restart .smiley {
  all: unset;
  font-size: 2.14rem;
  cursor: pointer;
  padding: 5px;
  transition: transform 0.2s;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
}

.restart .smiley:active {
  transform: scale(0.5);
}

footer {
  display: flex;
  align-content: center;
  justify-content: center;
  font-size: 1rem;
  margin-top: 1.4rem;
}

.beginner,
.medium,
.expert {
  font-size: 1rem;
  margin: 0.2rem;
  padding: 0.66rem 0.85rem;
  cursor: pointer;
  background-color: white;
  color: black;
  border-radius: 0.357rem;
  border: 2px solid black;
  transition: 0.3s;
  width: 6rem;
}

.beginner:hover,
.medium:hover,
.expert:hover {
  background-color: black;
  color: white;
}

.lives {
  font-size: 1rem;
  margin: 1rem auto;
}

.buttons {
  margin: 1.42rem auto;
}

.lives span {
  font-size: 1.71rem;
}

.hints {
  cursor: pointer;
  font-size: 1.42px;
}

.cell.clickedonhint {
  color: black;
  border: 2px solid yellow;
  background-color: rgb(202, 202, 202);
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -2px -2px 4px rgba(255, 255, 255, 0.7);
}

.cell.clickedonsafeclick {
  color: black;
  border: 2px solid rgb(16, 165, 252);
  background-color: rgb(202, 202, 202);
}

@keyframes flash {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.clickonMineExterminator {
  animation: flash 0.5s ease-in-out infinite;
  color: black;
  outline: 0.5px solid rgb(16, 165, 252);
  background-color: rgb(202, 202, 202);
}

.hintsbuttons {
  margin-bottom: 1rem;
}

.safeclicktext {
  font-size: 0.57rem;
  margin-top: 0.357rem;
  margin-left: 12.14rem;
}

.safeclick {
  font-size: 1rem;
  margin: 1.4rem;
  padding: 0.57rem 1.16rem;
  cursor: pointer;
  background-color: white;
  color: black;
  border-radius: 5px;
  border: 2px solid black;
  transition: 0.3s;
  width: 8.6rem;
}

.lightmode {
  position: absolute; /* מיקום קבוע בדפדפן */
  top: 0rem; /* מרחק מהחלק העליון */
  left: calc(50vw - 25vw); /* מרחק מהחלק השמאלי */
  font-size: 1rem;
  padding: 0.571rem 0.71rem;
  background-color: white;
  color: black;
  border: 2px solid black;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}




.lightmode:hover {
  background-color: black;
  color: white;
}

.lightmodebackground {
  color: purple;
  background-image: url('../jpg/minesweeper2.png');
  /* background-color: grey; */
  background-size: cover;
  background-repeat: no-repeat;
}

button {
  font-family: 'Comic Neue', sans-serif;
  font-weight: 700;
  border: 2px solid white;
  font-size: 1.285rem;
  padding: 1.4rem 1rem;
  cursor: pointer;
}

button:hover {
  background-color: white;
  color: black;
}

.scores {
  margin: 1.42rem auto;
  border-collapse: collapse;

  table-layout: fixed; /* הופך את העמודות לשוות בגודלן */
}

/* עיצוב שורת הכותרת */
.scores th {
  background-color: black;
  color: white;
  padding: 0.357rem;
  font-size: 1rem;
}

/* עיצוב התאים */
.scores td {
  background-color: grey;
  color: white;
  padding: 0.357rem;
  font-size: 1rem;
  border: 2px solid white;
  text-align: center;
}

.safeclick.mineexterminator {
  margin-left: -120px;
  margin-top: -31px;
}

.mineexterminatorjpg:hover {
  background-color: transparent;
}

img {
  border: none;
  outline: none;

  width: 7.14rem;
  height: auto;
  image-rendering: pixelated; /* שומר על שקיפות וניקיון */
}

.safeclickbtn {
  border: 2px solid black;
  border-radius: 5px;
}

.safeclickbtn:hover {
  background-color: black;
  color: white;
}

.hint-container,
.safeclick-container,
.mineexterminator-container,
.undo-container {
  display: inline-block; /* מאפשר לכל כפתור להחזיק את הטקסט שמתחתיו */
  text-align: center; /* ממרכז את הטקסט מתחת לכפתור */
  margin: 0 1rem; /* רווח ביניהם */
}

.hint-container span,
.safeclick-container span,
.mineexterminator-container span,
.undo-container span {
  display: block; /* גורם לטקסט להופיע מתחת לכפתור */
  margin-top: 5px; /* רווח קטן בין הכפתור לטקסט */
}

button.mineexterminator {
  background-color: transparent;
  border: none;
  padding: 0;
}

button.megahint {
  font-size: 1rem;
  margin: 1.4rem;
  padding: 0.57rem 1.16rem;
  cursor: pointer;
  background-color: white;
  color: black;
  border-radius: 5px;
  border: 2px solid black;
  transition: 0.3s;
  width: 8rem;
}

button.megahint:hover {
  background-color: black;
  color: white;
}

.safeclick:hover {
  background-color: black;
  color: white;
}

button.undo {
  font-size: 1rem;
  margin: 1.4rem;
  padding: 0.57rem 1.16rem;
  cursor: pointer;
  background-color: white;
  color: black;
  border-radius: 5px;
  border: 2px solid black;
  transition: 0.3s;
  width: 8rem;
}

button.undo:hover {
  background-color: black;
  color: white;
}

.modal-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
}

.modal-container.show {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 300px;
  z-index: 9999;
}

.modal-text-box {
  margin-bottom: 300px;
}

.modal-button {
  font-size: 1rem;
  margin: 1.4rem;
  padding: 0.57rem 0.857rem;
  cursor: pointer;
  background-color: white;
  color: black;
  border-radius: 5px;
  border: 2px solid black;
  transition: 0.3s;
}

.tutorial_desktop {
  position: absolute;
  width: 10rem;
  height: 10rem;
  /* background-size: 250px; */
  /* background-repeat: no-repeat;
  background-position: center center;  */
  background-color: rgba(0, 0, 0, 0.404);
  border-radius: 20px;
  top: 45%;
  right: 50%;
  transform: translate(50%, -50%);
  padding: 20px;
  /* display: block;
  user-select: none; */
}

h1 {
  margin: 0 auto;
}
.tutorial_mobile {
  display: none;
}


.instr-btn{
  position: absolute;
  right: calc(50vw - 25vw);
  top:0rem;
  font-size: 1rem;
  padding: 0.57rem 1.4rem;
  background-color: white;
  color: black;
  border: 2px solid black;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.instr-modal{
  position: absolute;
  top: 10vh;
  background-color: rgba(236, 226, 213, 0.959);
  width: 90vw;
  height: fit;
  overflow-y: auto;
  /* display: grid;
  grid-template-columns:400px 100px;
  grid-template-rows: repeat(6,1fr);
  justify-content: center; */
  justify-content: center;
  align-content: center;
  
}

.instr-modal h2{
  margin: 0;
}

.modal-close-btn {
  position: absolute;
  top: 0;
  right: 0;
}

.instr-modal td{

  text-align: start;
  font-size: 1rem;
  
}

.instr-modal th{
  font-size: 1rem;
}

.modal-ext-img{
  height: 50px;
  width: 70px;
}

.fearure-name{
  white-space: nowrap
}
.modal-close-btn {
top:1px ;
right: 1px;
font-size: 1rem;
padding: 0.57rem 1.4rem;
background-color: white;
color: black;
border: 2px solid black;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s, color 0.3s;
}

dialog table {
  background-color: rgba(245, 236, 194, 0.329);
}


.linkdin {
  display: grid;
  width: 17.85rem;
  height:3.57rem;

}

footer .headline{
  margin-bottom: 0.5rem;
}

.mine-exterminator-message{
  display: none;
}

.mine-exterminator-message.showMessage{
  display: grid;
  position: fixed;

  left: 50%;
  transform: translate(-50%, -50%);
  color: lightsalmon;
  height: 1lh;
}


@media (max-width: 768px) {
    button:focus {
    outline: none;
  }
  html{
    font-size: 14px;
  }

  table {
    background-color: grey;
    margin: 1.5rem auto;
    border: 2px solid lightgray;
    border-collapse: collapse; /* מונע הפרדה לא אחידה בין תאים */
  }

  .cell {
    color: grey;
    border: 1px solid rgb(90, 90, 90);
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    transition: 0.3s;
    box-sizing: border-box;
  }

  .cell.clicked {
    color: black;
    border: 1px solid rgb(90, 90, 90);
    background-color: rgb(202, 202, 202);
    box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.2),
      inset -2px -2px 4px rgba(255, 255, 255, 0.7);
  }

  .cell.clicked.mine {
    border: solid red;
    background-color: rgb(255, 100, 100);
    color: white;
  }
  .lightmode {
    position: absolute; /* מיקום קבוע בדפדפן */
    top: 1px; /* מרחק מהחלק העליון */
    left: 1px; /* מרחק מהחלק השמאלי */
    font-size: 1rem;
    padding: 4px 6px;
    background-color: white;
    color: black;
    border: 2px solid black;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
  }
  .lightmode:hover {
    background-color: black;
    color: white;
  }

  .lightmodebackground {
    color: purple;
    background-image: url('../jpg/minesweeper2.png');
    /* background-color: grey; */
    background-size: cover;
    background-repeat: no-repeat;
  }
  .beginner,
  .medium,
  .expert {
    font-size: 1rem;
    margin: auto;
    padding: 0.57rem 1.166rem;
    cursor: pointer;
    background-color: white;
    color: black;
    border-radius: 5px;
    border: 2px solid black;
    transition: 0.3s;
  }

  .beginner:hover,
  .medium:hover,
  .expert:hover {
    background-color: black;
    color: white;
  }

  .restart .smiley {
    all: unset;
    font-size: 2.14rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  }
  h1 {
    margin-top: 0;
  }
  .hintsbuttons {
    font-size: 1rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-content: center;

  }

  .hint-container,.mineexterminator-container,.safeclick-container,.undo-container{
    width: 11rem;
    align-self: center; 

  }

  .scores {
    font-size: 1rem;
  }
  .scores th {
    background-color: black;
    color: white;
    padding: 1.166rem;
    font-size: 1rem;
  }

  .modal-text-box {
    margin-bottom: 14.28rem;
  }
  .tutorial_desktop {
    display: none;
  }

  .tutorial_mobile {
    display: block;
    position: absolute;
    width: 10rem;
    height: 10rem;
    /* background-size: 250px; */
    /* background-repeat: no-repeat;
    background-position: center center;  */
    background-color: rgba(0, 0, 0, 0.404);
    border-radius: 20px;
    top: 35vh;
    right: 50vw;
    transform: translate(50%, -50%);
    padding: 1.42rem;
    /* display: block;
    user-select: none; */
  }

  .instr-btn {
    position: absolute; /* מיקום קבוע בדפדפן */
    top: 1px; /* מרחק מהחלק העליון */
    right: 1px; /* מרחק מהחלק השמאלי */
    font-size: 1rem;
    padding: 0.285rem 0.428rem;
    background-color: white;
    color: black;
    border: 2px solid black;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
  }
  .linkdin {
    display: grid;
    width: 10.71rem;
    height:2.14rem;
    margin-bottom: 1.42rem;
  }

  .instr-modal {
    width: 95vw;
    height: 80vh;
    padding: 10px;
    overflow-y: auto;
    font-size: 14px;
  }
  .instr-table {
    width: 100%;
    table-layout: auto;
  }
  .instr-table td,
  .instr-table th {
    white-space: normal; /* מאפשר שבירת שורות במידת הצורך */
    font-size: 13px;
    padding: 8px;
  }
  .instr-modal::backdrop {
    background-color: rgba(0, 0, 0, 0.872);
  }

  .mine-exterminator-message{
    display: none;
  }
  
  .mine-exterminator-message.showMessage{
    display: grid;
    /* position: fixed; */
  
    left: 50%;
    transform: translate(-50%, -50%);
    color: lightsalmon;
    height: 1lh;
  }
}
