/** global style sheet for web game pages **/

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  margin: 0;
  background-color: beige;
  opacity: 0;
  animation: fadeIn 0.2s ease-in forwards;
}

header {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 2rem;
  background-color: wheat;
  box-shadow: 0 0 10px 3px peru;
  position: relative;
  top: 0;
  width: 100%;
  box-sizing: border-box;
  transition: opactiy 0.2s ease;
}

h1 {
  justify-self: center;
  font-family: 'Salsa', cursive;
  font-weight: 400;
  font-size: 2.5rem;
  margin: 0;
  white-space: nowrap;
  cursor: default;
  transition: opactiy 0.2s ease;
}

#headerIcon {
  position: absolute;
  left: 0rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 600ms, left 0.3s ease;
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  z-index: 1100;
}

.line {
  fill: none;
  transition: stroke-dasharray 600ms, stroke-dashoffset 600ms, stroke 800ms;
  stroke: #000;
  stroke-width: 5.5;
  stroke-linecap: butt;
}

.ham8 .top {
  stroke-dasharray: 40 160;
}

.ham8 .middle {
  stroke-dasharray: 40 142;
  transform-origin: 50%;
  transition: transform 600ms;
}

.ham8 .bottom {
  stroke-dasharray: 40 85;
  transform-origin: 50%;
  transition: transform 600ms, stroke-dashoffset 600ms;
}

.ham8.active .top {
  stroke-dashoffset: -64px;
}

.ham8.active .middle {
  transform: rotate(90deg);
}

.ham8.active .bottom {
  stroke-dashoffset: -64px;
}

#headerIcon.active {
  transform: rotate(45deg);
  position: fixed;
}

#headerIcon.active .line {
  stroke: saddlebrown;
}

#sideMenu {
  position: fixed;
  top: 0;
  left: -300px;
  width: 250px;
  height: 100%;
  background: white;
  box-shadow: 2px 0 5px rgba(0,0,0,0.2);
  padding: 2rem 1rem;
  transition: left 0.3s ease;
  z-index: 1000;
  background-color: beige;
  display: flex;
  flex-direction: column;
}

#sideMenu.active {
  left: 0;
}

#sideMenu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: 3rem;
}

#sideMenu li {
  margin: 1rem 0;
}

#sideMenu a {
  text-decoration: none;
  font-family: 'Patrick Hand', cursive;
  font-size: 1.7rem;
  color: black;
  transition: color 0.2s ease;
}

#sideMenu a:hover {
  color: saddlebrown;
}

#socialIcons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
  margin-top: auto;
  margin-bottom: 3rem;
}

#socialIcons i {
  font-size: 1.7rem;
  color: black;
  transition: color 0.2s ease;
}

#socialIcons a {
  position: relative;
}

#socialIcons a::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 130%;
  left: 50%;
  transform: translateX(-50%);
  background: sienna;
  color: white;
  font-family: 'Salsa', cursive;
  font-size: 1rem;
  white-space: nowrap;
  padding: 4px 8px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#socialIcons a:hover::after {
  opacity: 1;
}

#socialIcons a:hover i {
  color: sienna;
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 2rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 2000;
  width: 80%;
  max-width: 400px;
  border-radius: 10px;
  cursor: default;
  border: 2px solid black;
}

.popup h2{
  font-size: 2rem;
  font-family: 'Caveat', cursive;
  color: saddlebrown;
}

.popup li {
  font-family: "Caveat Brush", cursive;
  font-size: 1.5rem;
  color: black;
}

.popup p{
  font-size: 1.5rem;
  font-family: "Caveat Brush", cursive;
}

.popup a{
  text-decoration: none;
  font-size: 1.5rem;
  font-family: "Caveat Brush", cursive;
}
.popup a:hover{
  color: blue;
}

.popup.active {
  display: block;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  color: #666;
  cursor: default;
  margin-top: auto;
}

@media (max-width: 600px) {
  h1{
    font-size: 1.5rem;
    line-height: 1;
    max-width: 70vw;
    text-align: center;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
  }

  #headerIcon{
    left: 0rem;
    transform: scale(0.75);
  }

  #sideMenu.active + #headerIcon,
  #headerIcon.active {
    left: 0rem;
    position: fixed;
  }


  #sideMenu {
    left: -100vw;
    width: 100vw;
    box-sizing: border-box;
  }

  #sideMenu.active {
    left: 0;  /* Add !important here too */
  }

  #sideMenu ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  #sideMenu a {
  	font-size: 1.5rem;
  }

  #socialIcons {
    margin-top: 0rem;
  }

  #socialIcons i {
    font-size: 1.7rem;
  }

  #socialIcons a::after {
    bottom: -130%;
  }

  footer{
    margin-top: auto;
  }
}
