
* {
    font-family: Arial, Helvetica, sans-serif;
}

html,body{
    min-height: 100vh;
    margin: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url(images/background1.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

#board {
    background-image: url(images/backgroundimg.png);
    display: none;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
    border-radius: 12px;
    /* Moves the canvas up */
    position: relative;
    top: 50px;  /* Adjust this value as needed */   
    
}

#gameover {
    background-color: rgb(211, 210, 208);
    padding: 10px 50px;
    border-radius: 12px;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
    position: absolute;
    display: none;
    text-align: center;  /* Center text */    


    h4 {
        color: #45a049;
    }

    #again {
        padding: 10px 20px;
        background-color: #45a049;
        color: white;
        border: none;
        border-radius: 12px;
        transition: 0.5s;
        cursor: pointer;
    }

    #again:active {
        transform: translateY(10px);
    }
}

#start {
    background-color: rgb(211, 210, 208);
    padding: 10px 50px;
    border-radius: 12px;
    box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
    position: absolute;

    h4 {
        color: #45a049;
    }

    #startgame {
        padding: 10px 20px;
        background-color: #45a049;
        color: white;
        border: none;
        border-radius: 12px;
        transition: 0.5s;
        margin: auto;
        display: block;
        cursor: pointer;
    }

    #startgame:active {
        transform: translateY(10px);
    }
}

#up {
    position: absolute;
    padding: 10px 20px;
    background-color: #45a049;
    color: white;
    border: none;
    border-radius: 12px;
    transition: 0.5s;
    margin: auto;
    display: block;
    cursor: pointer;
    font-weight: 800;
    bottom:20%;
    display: none;
}

#up:active {
    transform: translateY(10px);
}




/* === Mobile Responsiveness === */
@media screen and (max-width: 768px) {
  #board {
    width: 90vw;
    height: auto;
    max-height: 80vh;
    top: 30px; /* Reduce upward shift on smaller screens */
  }

#start,
#gameover {
  width: 80vw;
  max-width: 400px;
  padding: 15px 20px;
  background-color: rgb(211, 210, 208);
  border-radius: 12px;
  box-shadow: 1px 1px 10px rgba(0, 0, 0, 0.5);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: none;
  z-index: 2;
}

#start {
  display: block; /* Show on load */
}

#gameover {
  display: none;
}

  #start h4,
  #gameover h4 {
    font-size: 16px;
  }

  #startgame,
  #again {
    font-size: 16px;
    padding: 10px 18px;
  }

  #up {
    font-size: 20px;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    display: block !important; /* Show the touch button on mobile */
  }
}

/* Optional: Landscape-specific tweaks */
@media screen and (max-width: 1024px) and (orientation: landscape) {
  #board {
    height: 80vh;
    width: auto;
    max-width: 100vw;
  }

    #start, #gameover {       
    top: 100px;    
  }

  #up {
    bottom: 10%;
  }
}


/* Footer (Always at Bottom) */
footer {
  position: fixed;
  margin-bottom: -40px; /* Negative margin to pull footer up */
  width: 100%;
  height: 40px;
  background-color: transparent;
  color: black;
  font-size: 11.5px;
  font-weight: bold;
  text-align: center;
  padding-top: 8px;
  z-index: 999; /* Very high to stay above canvas/menu */
}


/* Default: Desktop version (positioned at bottom) */
@media screen and (min-width: 768px) {
  footer {
    position: fixed;
    bottom: 0;
  }
}

/* Mobile-specific version: position above fixed menu */
@media screen and (max-width: 767px) {
  footer {
    position: fixed;
    bottom: 60px; /* Adjust based on height of mobile menu */
  }
}


.fixed-footer-menu-games {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #222;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-top: 2px solid #FEC107;
  z-index: 1000;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

/* Menu Item */
.fixed-footer-menu-games .menu-item {
  flex: 1;
  text-align: center;
  color: #FEC107;
  text-decoration: none;
  font-size: 11px;
  padding: 4px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  height: 100%;
}

/* Icon inside Menu */
.fixed-footer-menu-games .icon {
  font-size: 20px;
  margin-bottom: 2px;
}

/* Hide fixed footer on desktop */
@media screen and (min-width: 768px) {
  .fixed-footer-menu-games {
    display: none;
  }
}

/* Make sure body has bottom padding so content doesn't hide under footer */
body {
  padding-bottom: 80px;
}

.more-games-drawer {
  position: fixed;
  bottom: 60px;
  left: 0;
  width: 100%;
  max-height: 60vh;
  background: #111;
  border-top: 2px solid #FEC107;
  z-index: 999;
  padding: 10px;
  display: none;
  flex-direction: column;
  overflow-y: auto;
}

.more-games-drawer .drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 14px;
  color: #FEC107;
}

.more-games-drawer .games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.more-games-drawer .games-grid a {
  background-color: #222;
  color: #FEC107;
  padding: 8px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
}
