/* Import Pixel/Retro Style Font */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');


/* General Styles */
body {
    background: linear-gradient(135deg, #222, #333, #222);
    font-family: 'Press Start 2P', cursive;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    color: #eee;        
}


main {
  flex: 1; /* Fills available space */
}
header {
    width: 100%;
    background-color: #111;
}


/* Breadcrumb styling */
 .breadcrumb {
  font-size: 13px;
  padding: 15px 20px;
  background-color: transparent;
  color: #ffcc00;
  text-align: left;
  margin-top: 70px; /* Adjust based on your header height */
  margin-bottom: -10px;
  z-index: 1;
  position: relative;
}
  
  .breadcrumb a {
    color: #EDEAE1;
    text-decoration: none;
    font-weight: 500;
  }
  
  .breadcrumb a:hover {
    text-decoration: underline;
  }

      /* Optional: Responsive font-size */
@media (max-width: 480px) {
  .breadcrumb {
    font-size: 13px;
    padding: 10px 15px;
    margin-top: 70px;    
  }
}

/* Game Wrapper */
#gameWrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Scoreboard */
#scoreboard {    
    margin-bottom: 10px;
    font-size: 1.2em;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 196, 66, 0.1);
    padding: 10px 15px;
    border-radius: 10px;
    border: 2px solid #f4c542;
    margin-top: 5px; /* Adjust the value as needed */
}

#highScore::before {
    content: '👑 ';
    color: goldenrod;
}

/* Game Container */
#gameContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
  width: 100%;
  height: 100%;
  background-color: #131313; /* Almost Black */
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(0, 255, 0, 0.1) 0px,
    rgba(0, 255, 0, 0.05) 2px,
    transparent 4px
  );
  background-size: 25px 25px;
  padding: 20px; /* Adds spacing around the canvas */
}

#gameContainer canvas {
  background-color: black; /* Clear game board */
  border: 4px solid #f4c542;
  box-shadow: 0 0 20px rgba(255, 196, 66, 0.6);
}


/* Game Controls - Centered Buttons */
#gameControls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* Buttons */
button {
    font-family: inherit;
    padding: 12px 24px;
    font-size: 1em;
    border: 2px solid #f4c542;
    background-color: transparent;
    color: #f4c542;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    border-radius: 10px;
    margin-bottom: 10px; /* Space below buttons */
}


button:hover {
    background-color: #f4c542;
    color: #111;
    transform: scale(1.05);
}



/* Settings Modal */
#settingsModal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #222;
    padding: 20px;
    border: 2px solid #f4c542;
    box-shadow: 0px 0px 15px rgba(255, 196, 66, 0.5);
    z-index: 1000;
    border-radius: 10px;
}

#closeSettings {
    font-size: 20px;
    cursor: pointer;
    color: #f4c542;
    position: absolute;
    right: 10px;
    top: 5px;
}



/* Footer */
footer {
    margin-top: auto;
    padding: 10px;
    background-color: #000;
    color: #f4c542;
    width: 100%;
    text-align: center;
    font-size: 12px; /* Adjust as needed */
}

/* ✅ Responsive Design for Mobile (Screens < 768px) */
@media (max-width: 768px) {
  #gameContainer {
      width: 90vw; /* Adjust width for small screens */
  }

  #gameContainer canvas {
      width: 100%; /* Make canvas responsive */
      height: auto; /* Maintain aspect ratio */
      background-size: contain; /* Adjust image size */
  }

  /* Resize buttons for better mobile UX */
  #gameControls button {
      font-size: 16px; /* Increase text size */
      padding: 10px 15px; /* Bigger clickable area */
  }
}

@media screen and (max-width: 768px) {
  #scoreboard {
    font-size: 1em;
    padding: 8px 12px;
    margin-top: 30px;
    width: 90%;
  }
}


@media screen and (max-width: 520px) {
  #gameControls {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  button {
    font-size: 0.85em;
    padding: 8px 16px;
  }
}

@media screen and (max-width: 520px) {
  footer {
    font-size: 11px;
    padding: 8px;
    line-height: 1.4;
  }
}


@media screen and (max-width: 767px) {
  footer {
    position: relative;
  }
}
.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;
  }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
  header {
    display: none;
  }
}

@media screen and (max-width: 1024px) and (orientation: landscape) {
  main {
    margin-top: 0; /* removes any top space */
    height: 100vh;  /* full height usage */
  }
}


/* 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;
}


.mobile-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.mobile-controls button {
  font-size: 24px;
  padding: 10px 15px;
  border-radius: 10px;
  border: 2px solid #f4c542;
  background-color: #111;
  color: #f4c542;
}

@media screen and (max-width: 520px) {
  .mobile-controls {
    display: flex;
  }
}
