@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

.game-title-long,
.game-title-normal,
.game-title-small,
.game-title-wide {
  flex: 1;
  font-family: 'Roboto', 'Arial', sans-serif;
  display: inline-flex;
  flex-direction: column;
  position: absolute;
  text-align: left;
  bottom: 10px;
  left: 10px;
  margin: 0;
  white-space: normal;
  width: 100%;
  padding: 0;
  opacity: 0;
  color: white;
  font-weight: bold;
  text-shadow: 0 0 25px #000;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1;
}

.game-title-normal {
  font-size: 1.6em;
}

.game-title-long {
  font-size: 2.9em;
}

.game-title-small {
  font-size: 1.5em;
}

.game-title-wide {
  font-size: 2.3em;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

#apps {
  display: flex;
  flex-direction: column;
  width: 100%;
  box-sizing: border-box;
  gap: 2px;
}

#row1-wrap {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 2px;
}

#row1normal,
#row2normal,
#row3wide,
#row4normal {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  width: 100%;
  position: relative;
  align-items: center;
  margin: 0;
  justify-content: center;
  box-sizing: border-box;
}

#row1normal {
  margin: 0;
  align-items: flex-start;
}

#row2normal {
  margin: 0;
  align-items: flex-start;
}

#row3wide {
  margin: 0;
  align-items: flex-start;
}

#row4normal {
  margin: 0;
  align-items: flex-start;
}

.game-button-long,
.game-button-normal,
.game-button-small,
.game-button-wide {
  overflow: hidden;
  border-radius: 20px;
  margin: 10px;
  text-align: left;
  white-space: normal;
  padding: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
  border: 4px solid transparent;
}

.game-button-normal,
.game-button-small,
.game-button-wide {
  width: calc(33% - 20px);
  flex-basis: calc(33% - 20px);
}

.game-button-long {
  box-sizing: border-box;
  width: calc(66% - 20px);
  flex-basis: calc(66% - 20px);
  align-self: flex-end;
  margin-left: auto;
  height: 400px;
}

.game-button-normal {
  width: 300px;
  height: 210px;
}

.game-button-small {
  width: 275px;
  height: 210px;
}

.game-button-wide {
  width: 425px;
  flex-basis: calc(50% - 20px);
  height: 250px;
}

.game-button-long:hover,
.game-button-normal:hover,
.game-button-small:hover,
.game-button-wide:hover{
  border: 4px solid #4494FC;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.game-img {
  display: block;
  object-fit: cover;
  width: 100%;
  border-radius: 20px 20px 0 0;
  height: 100%;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.game-button-long:hover .game-title-long {
  opacity: 1;
}

.game-button-normal:hover .game-title-normal {
  opacity: 1;
}

.game-button-small:hover .game-title-small {
  opacity: 1;
}

.game-button-wide:hover .game-title-wide {
  opacity: 1;
}

.game-img:hover {
  filter: brightness(0.6);
}

.game-button-long:hover {
  opacity: 1;
}

.game-button-normal:hover {
  opacity: 1;
}

.game-button-small:hover {
  opacity: 1;
}

.game-button-wide:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .game-button-long,
  .game-button-normal,
  .game-button-small,
  .game-button-wide {
    width: 100%;
    height: auto;
  }
}
