/* Reset default styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Set full height layout */
html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  background: #333;
}

/* Wrapper for full-page layout */
.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Breadcrumb stays at top */
.breadcrumb {
  font-size: 14px;
  padding: 15px 40px;
  background-color: #333;
  color: #ffcc00;
  text-align: left;
  margin-top: 70px; /* Adjust based on your header height */
}

.breadcrumb a {
  color: #EDEAE1;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Game content grows to fill available space */
.game-title {
  text-align: center;
  color: #ffcc00;
  font-size: 32px;
  font-weight: bold;
  margin: 20px 0 10px 0;
}

.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Centered canvas */
canvas {
  background: #222;
  border: 2px solid #EDEAE1;
  display: block;
  max-width: 100%;
  height: auto;
}

/* Game Over Modal */
#gameOverScreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #222, #333, #222);
  color: #EDEAE1;
  padding: 20px;
  text-align: center;
  border-radius: 10px;
  width: 300px;
  display: none;
  z-index: 10;
}

#gameOverText {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 15px;
}

#restartButton {
  background: #ffcc00;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  border-radius: 5px;
}

#restartButton:hover {
  background: #ffdd44;
}

/* Footer sticks at bottom only when needed */
footer {
  background-color: transparent;
  color: #ffcc00;
  text-align: center;
  font-size: 14px;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;  
}

/* 📱 Mobile Portrait & Landscape (Max 768px) */
@media screen and (max-width: 768px) {

  .breadcrumb {
    padding: 10px 20px;
    font-size: 13px;
  }

  .game-title {
    font-size: 24px;
    margin: 16px 10px 8px 10px;
  }

  .main-content {
    padding: 10px;
  }

  canvas {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-width: 1px;
  }

  #gameOverScreen {
    width: 85vw;
    padding: 15px;
  }

  #gameOverText {
    font-size: 18px;
  }

  #restartButton {
    font-size: 15px;
    padding: 8px 16px;
  }

  footer {
    font-size: 13px;
    padding: 8px 5px;
    flex-direction: column;
    text-align: center;
  }
}


@media screen and (max-width: 812px) and (orientation: landscape) {
  .game-title {
    font-size: 20px;
  }

  canvas {
    height: 70vh;
  }
}

@media screen and (max-width: 812px) and (orientation: landscape) {
  .breadcrumb {
    font-size: 12px;
    padding: 5px 15px;
  }

  .game-title {
    font-size: 18px;
    margin: 5px 0;
  }
}



.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;
}
