/* ===== General Layout ===== */
.centered_container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.minigames_top_buttons_container {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  margin-left: auto;
  gap: 1rem;
}

/* ===== Top Buttons ===== */
.top_minigames_toggles {
  flex: 1 1 auto;
  padding: 0.5em 1em;
  width: 8rem;
  background-image: url("../assets/main_page_assets/button.svg");
  background-repeat: no-repeat;
  background-size: cover;
  background-color: transparent;
  border: none;
  color: rgb(33, 5, 59);
  text-align: center;
  font-size: 1rem;
  font-weight: normal;
  cursor: pointer;
  font-family: 'MouldyCheese';
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.top_minigames_toggles:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* ===== Iframe Game Player ===== */
.iframe_wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  background: #111;
  border: 2px solid #222;
  border-radius: 10px;
  overflow:visible;
}

.game_embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== Canvas (For Game Engine Displays) ===== */
canvas {
  width: 50%;
  height: 50%;
  margin: auto;
  display: block;
}

/* ===== Play Button (Generic Centered Button) ===== */
.centered_play_button {
  background-image: url("../assets/main_page_assets/button.svg");
  background-repeat: no-repeat;
  background-size: 100%;
  background-color: transparent;
  border: none;
  color: rgb(33, 5, 59);
  text-align: center;
  width: 15vh;
  height: 6vh;
  font-size: 2vh;
  font-weight: bold;
  cursor: pointer;
  filter: drop-shadow(5px 0px 2px rgba(20, 7, 192, 0.24));
  margin: 0 auto;
  display: block;
}

/* ===== Top Minigames Buttons (Alternate) ===== */
.top_minigames_buttons {
  min-width: 0;
  max-width: 40dvh;
  height: 5vh;
  margin: 0 1vh;
  background-image: url("../assets/main_page_assets/button.svg");
  background-repeat: no-repeat;
  background-size: 100%;
  background-color: transparent;
  border: 0;
  color: rgb(33, 5, 59);
  text-align: center;
  font-size: 2vh;
  font-weight: bold;
  cursor: pointer;
  filter: drop-shadow(5px 0px 2px rgba(20, 7, 192, 0.24));
  font-family: 'MouldyCheese';
  align-self: center;
}

.top_minigames_buttons:disabled {
  background-image: url("../assets/main_page_assets/buttom_monochrome.svg");
  cursor: not-allowed;
}

/* ===== Game Player Container ===== */
#GamePlayer {
  position: relative;
  z-index: 1;
  display: block;
}

/* ===== Game Grid / Cards ===== */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
  padding: 1rem 0;
  box-sizing: content-box;
}

.card {
  flex: 1 1 100px;
  width: 10rem;
  max-width: 10rem;
  height: 15rem;
  background-color: rgba(245, 245, 220, 0.95);
  border: 2px solid rgba(100, 148, 237, 0.8);
  border-radius: 15px;
  padding: 0.5rem;
  box-sizing: border-box;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.card:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.card img {
  width: 100%;
  height: 10rem;
  object-fit: contain;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.card p {
  font-family: 'MouldyCheese', sans-serif;
  font-size: 1rem;
  text-align: center;
  margin: 0;
}

/* ===== Responsive (Mobile) ===== */
@media (max-width: 600px) {
  .card {
    flex: 1 1 100px;
    max-width: 100%;
  }
}
