@import url('https://fonts.googleapis.com/css2?family=Comic+Relief:wght@400;700&family=DynaPuff:wght@400..700&display=swap');

:root{
  --back-green: #d7e1ac;
  --cell-size:6vh;
  
}

.whole-container{
    height: 100vh;
    min-height: 600px;
    font-family: "Comic Relief", system-ui;
    /* overflow: hidden; */
}
.title-banner{
  height: 10vh;
  display: flex;
  justify-content: center;
  align-items: center;
    /* background-color: #92d864; */
}
h1{
  font-family: "DynaPuff", system-ui;
  font-optical-sizing: auto;
  font-weight: 700;
  font-style: normal;
  width: fit-content;
  padding: 10px 30px;
  background-color: #f4e0ae;
  color: #2c9318 !important;
  border-radius: 30px;
  z-index: 0;
}
body{
  background-image: url("../background.png");
  background-repeat: repeat;
  background-size: 100px;
  /* height: 100vh; */
  width: 100vw;
  overflow: hidden;
    /* background: linear-gradient(to bottom, #b1854b, #a67c52); */
}
.game-grid-box{
    border: 1px solid rgb(195, 195, 195);
    aspect-ratio: 1/1;
    width: var(--cell-size);
    background-color: #e2e2e2;
}
.background-bush1{
  position: absolute;
  width: 30%;
  /* bottom: -20px; */
  bottom: 0px;
  z-index:-2;
}

.background-bush2{
  position: absolute;
  width: 35%;
  transform: scaleX(-1);
  /* bottom: -20px; */
  bottom: 0px;
  right: 20px;
}
.background-bush-top{
  position: absolute;
  transform: rotate(180deg);
  width: 20%;
  z-index: -9999;
  top: -3%;
  filter: drop-shadow(2px 2px 8px #3336);
}
.background-bush3{
  left: 0%;
}
.background-bush4{
  left: 18%;
}
.background-bush5{
  left: 36%;
}
.background-bush6{
  left: 54%;
}
.background-bush7{
  left: 72%;
}
.background-bush8{
  left: 90%;
}
.game-board{
    display: grid;
    grid-template-columns: auto auto auto auto auto auto;
    column-gap: 0px;
    width: fit-content;
    position: relative;
    
    box-shadow: 2px 2px 9px 1px #3338;
}

.piece-1{
    /* width: 150px; */
    /* height: 100px; */
    /* background-color: antiquewhite; */
}

.formation-grid{
    display: flex;
    cursor: pointer;
}

.formation-row{
    display: flex;
}

.formation-cell{
    /* background-color: antiquewhite; */
   
    background-size: contain;
    background-opacity: 0.7;
    width: var(--cell-size);
    aspect-ratio: 1/1;
    /* box-shadow: 2px 2px 6px 2px #3336; */
}

.grass-cell{
    /* background-image: url('../grass.jpg'); */
    border: 1px solid rgba(255, 255, 255, 0.486);
}
.water-cell{
    background-image: url('../water.avif');
    border: 1px solid rgba(255, 255, 255, 0.486);
}



.gap-cell{
    /* background-color: antiquewhite; */
    background-color: transparent;
    width: var(--cell-size);
    aspect-ratio: 1/1;
}
.anim-image{
    position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
    max-width: 80%;
    max-height: 80%;
    
}
.draggable{
    width: fit-content;
    cursor: pointer;
    height: fit-content;
      touch-action: none;     
        will-change: transform;
  transform: translateZ(0); /* Prevents scrolling/zooming */
  user-select: none;
    position: relative;
     -webkit-user-drag: none;
    filter: drop-shadow(2px 4px 7px #3336);
}

.draggable img{
    user-select: none;
    pointer-events: none;
  user-drag: none;
  -webkit-user-drag: none;

}

.placed img{
    user-select: none;
    pointer-events: none;
  user-drag: none;
  -webkit-user-drag: none;
}
.red{
    background-color: red !important;
}
.green{
    background-color: var(--back-green) !important;
}
.game-pieces-container{
    display: flex;
    flex-wrap: wrap;
    grid-template-columns: auto auto;
    grid-template-rows: auto auto;
    grid-column-gap: 15px;
    grid-row-gap: 15px;
  align-items: flex-start;
  align-content: baseline;
  justify-content: flex-start;
}

#popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#error-overlay{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#popup-box {
  /* background: linear-gradient(to bottom, #d2b48c, #a67c52); gentle earthy brown */
  background-color: #efefef;
  color: #333;
  border-radius: 15px;
  padding: 25px 30px;
  width: 400px;
  box-shadow: 0 0 25px rgba(0,0,0,0.4);
  text-align: center;
  font-family: 'Segoe UI', sans-serif;
}

#popup-box h2 {
  margin-top: 0;
  font-family: "DynaPuff", system-ui;
  font-weight: 500;
  color: #c07c1b;
}

#popup-box h3 {
  font-family: "DynaPuff", system-ui;
  font-weight: 400;
  color: #c07c1b;
}

#popup-box ul {
  text-align: left;
  padding-left: 20px;
  font-size: 0.9em;
}

#popup-close, #error-close {
  margin-top: 15px;
  background: #5b3a1d;
  border: none;
  color: white;
  padding: 8px 20px;
  border-radius: 6px;
  cursor: pointer;
}

#popup-close:hover , #error-close:hover{
  background: #714f29;
}

.awareness-line {
  font-size: 0.95em;
  font-style: italic;
  margin: 15px 0;
  /* color: #fffbe9; */
}

#hover-bubble {
  position: absolute;
  font-size: 0.6rem !important;
  text-align: justify;
  display: none;
  min-width: 150px;
  max-width: 220px;
  background: #fff8e7;
  color: #3e2c1b;
  border: 2px solid #b49368;
  border-radius: 12px;
  padding: 5px 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 99999;
  pointer-events: none; /* so it doesn’t block hover */
}

/* triangle tail */
#hover-bubble::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px; /* arrow sits on the right edge */
  transform: translateY(-50%);
  border-width: 10px 0 10px 10px;
  border-style: solid;
  border-color: transparent transparent transparent #fff8e7;
  /* filter: drop-shadow(0 -2px 1px rgba(0,0,0,0.15)); */
}

#rotate-warning {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  color: white;
  font-size: 1.2em;
  text-align: center;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: 'Segoe UI', sans-serif;
}

@media screen and (orientation: portrait) {
  #rotate-warning {
    display: flex;
  }
}
@media screen and (max-width: 1024px){
  h1{
    font-size: 20px !important;
  }
  li{
    font-size: 12px !important;
  }

}

@media screen and (min-width: 1400px){
  #hover-bubble{
    font-size: 10px !important;
  }
}

@media screen and (max-height: 550px) {
  .game-pieces-container{
      /* display: grid; */
      grid-template-columns: auto auto;
      grid-template-rows: max-content max-content;
      height: 90%;
      grid-column-gap: 10px;
      grid-row-gap: 10px;

  }

  #hover-bubble{
    font-size: 6px !important;
  }
  ul{
    margin-bottom: 5px !important;
  }
  h1{
    font-size: 12px !important;
    padding: 3px 6px;
  }
  li{
    font-size: 9px !important;
  }

  .game-board-container{
    height: 100%;
  }
}

@media screen and (max-height: 450px) {
  .game-pieces-container{
      /* display: grid; */
      grid-template-columns: max-content max-content max-content;
      grid-template-rows: max-content max-content;
      height: 90%;
      margin-top: 20px;
      grid-column-gap: 20px;
      grid-row-gap: 20px;

  }

  #hover-bubble{
    font-size: 6px !important;
  }
  ul{
    margin-bottom: 5px !important;
  }
  h1{
    font-size: 12px !important;
    padding: 3px 6px;
  }
  li{
    font-size: 9px !important;
  }

  .game-board-container{
    height: 100%;
  }
}