/* Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  background-color: #111;
  color: #CC7700;
  font-family: 'Press Start 2P', cursive;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 14px;
  padding: 15px 40px;
  color: #CC7700;
  text-align: left;
  margin-top: 60px;
}

.breadcrumb a {
  color: #FFE7B3;
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Container layout */
#root {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

/* Title */
#root > h1 {
  color: #CC7700;
  font-size: 24px;
  border: 2px solid #CC7700;
  background-color: #111;
  padding: 5px 15px;
  border-radius: 5px;
  margin: 0;
}

/* Start/Pause Button */
#gameControlBtn {
  padding: 6px 16px;
  font-size: 14px;
  background-color: #CC7700;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#gameControlBtn:hover {
  background-color: #b36200;
}

/* Canvas Styling */
#root > canvas {
  display: block;
  background-color: #222;
  border: 2px solid #CC7700;
  max-width: 100%;
  height: auto;
}

/* Footer */
footer {
  margin-top: 40px;
  margin-bottom: 0;
  padding: 10px;
  background: transparent;
  color: #fff;
  font-size: 12px;
  text-align: center;
}

/* ========================= */
/* Mobile Responsiveness */
/* ========================= */
@media (max-width: 520px) {
  html, body {
    padding: 10px;
    justify-content: flex-start;
    align-items: center;
  }

  .breadcrumb {
    font-size: 14px;
    padding: 10px 20px;    
  }

  #root > h1 {
    font-size: 18px;
    padding: 5px 10px;
    border-width: 1px;
  }

  #root > canvas {
    width: 100%;
    height: auto;
    border-width: 1px;
  }

  footer {
    font-size: 14px;
    margin-top: 10px;
  }
}


#mobileControls {
  display: none; /* Will be set to flex via JS if mobile */
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

#mobileControls button {
  background-color: #222;
  color: #CC7700;
  border: 2px solid #CC7700;
  padding: 10px 14px;
  font-size: 20px;
  font-family: 'Press Start 2P', cursive;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.5);
}

#mobileControls button:active {
  transform: scale(0.95);
  background-color: #333;
}


@media (max-width: 768px) {
  #mobileControls {
    display: flex;
  }
}


/* Fixed Footer Menu for Mobile */

.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;
}
