/* === General Styles === */
body {
  font-family: Arial, sans-serif;
  text-align: center;
  background: radial-gradient(circle, #3D8E41 20%, #1B5E20 60%, #0A3C10 100%);
  color: white;
  margin: 0;
  padding: 0;
  min-height: 100vh; /* Change from height: 100vh */
  display: flex;
  flex-direction: column;
}


/* Breadcrumb styling */
.breadcrumb {
    font-size: 14px;
    padding: 15px 40px;
    background-color: transparent;
    color: #ffcc00;
    text-align: left;
}

.breadcrumb a {
    color: #EDEAE1;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 🔄 Responsive Adjustments */
@media screen and (max-width: 600px) and (orientation: portrait) {
    body {
        padding: 5px;
        font-size: 14px;
    }

    .breadcrumb {
        font-size: 13px;
        padding: 10px 20px;
        text-align: center;
    }
}

@media screen and (max-width: 812px) and (orientation: landscape) {
    body {
        padding: 5px;
        font-size: 13px;
    }

    .breadcrumb {
        font-size: 12px;
        padding: 8px 16px;
        text-align: center;
    }
}


/* === Game Container === */
#game-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-top: -10px;
  padding: 10px;
  flex-wrap: wrap;
}

/* === Game Board (Default 8x3 for Desktop) === */
#game-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 10px;
  max-width: 95vw;
  width: 800px;
  aspect-ratio: 8 / 3;
  background: rgba(255, 255, 255, 0.1);
  padding: 15px;
  border-radius: 12px;
  box-sizing: border-box;
}

/* === Cards === */
.card {
  width: 100%;
  aspect-ratio: 2.5 / 3.5;
  background: url('deck-back.png') center/cover no-repeat;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
}

.card:hover {
  transform: scale(1.08);
}

.card.flipped {
  transform: rotateY(180deg);
}

/* === Game Over Message === */
#game-over-message {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 20px 40px;
  border-radius: 10px;
  font-size: 24px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.5);
  z-index: 1000;
  cursor: pointer;
}

/* === Mobile Responsive: 4x6 Layout === */
/* 🔹 Portrait Mobile (≤600px, portrait) — 5x5 layout */
@media screen and (max-width: 600px) and (orientation: portrait) {
  #game-board {
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(5, 1fr);
    width: 90vw;
    aspect-ratio: 1 / 1;
    padding: 10px;
    gap: 8px;
  }

  .card {
    aspect-ratio: 2.5 / 3.5;
  }

  #game-container {
    flex-direction: column;
    gap: 12px;
  }
}

/* 🔹 Landscape Mobile/Tablets — 8x3 layout remains */
@media screen and (max-width: 900px) and (orientation: landscape) {
  #game-board {
    grid-template-columns: repeat(8, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 95vw;
    aspect-ratio: 8 / 3;
    gap: 10px;
    padding: 12px;
  }

  .card {
    aspect-ratio: 2.5 / 3.5;
  }

  #game-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
  }
}


/* === Footer (Fixed at Bottom) === */
footer {
    display: flex;
    justify-content: center; /* Centers everything */
    align-items: center; /* Aligns items vertically */
    background: transparent;
    color: white;
    font-size: 16px;
    padding: 10px;
    white-space: nowrap; /* Prevents text from wrapping */
    margin-top: 20px; /* Space above footer */    
}


/* === Buttons Section === */
#buttons {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 60px; /* Give space for fixed footer */
}

button {
  background: linear-gradient(to bottom, #ffcc00, #ffaa00);
  border: none;
  padding: 12px 20px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
  color: #3D3D3D;
  transition: all 0.3s ease;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
  margin-top: 20px; /* Space between buttons and game board */
}

button:hover {
  background: linear-gradient(to bottom, #ffdd44, #ffbb00);
  transform: scale(1.05);
}

/* === Mobile-specific adjustment for game board spacing === */
@media screen and (max-width: 600px) {
  #game-container {
    margin-bottom: 80px; /* Push up game board to avoid overlap */
    
  }
}

/* === 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;
}
