/* ===== Base ===== */

body {
  background-color: black;
  background: url('../images/dungeon.gif') no-repeat center center fixed;
  background-size: cover;
  color: white;
  font-family: tahoma, sans-serif;
  font-size: 18px;
  text-align: center;
  margin: 0;
  padding: 1% 0 80px 0;
  zoom: 1.25;
}

/* Main content */
.content {
  max-width: 500px;
  margin: 0 auto;
  padding: 0 20px;
}

p {
  margin: 0 auto;
  word-wrap: normal;
}

a img:hover {
  opacity: 0.75;
  transition: opacity 0.3s ease;
}

/* ===== Header ===== */

.title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  margin-bottom: 2em;
}

.title-container img {
  height: 150px;
  object-fit: contain;
  flex-shrink: 1;
  min-width: 0;
}

/* ===== Navigation ===== */

.nav-container {
  display: flex;
  gap: 20px;
  justify-content: center;
}

.nav-item {
  text-decoration: none;
}

.nav-item img {
  width: 200px;
  height: 100px;
  object-fit: contain;
}

/* ===== Back Button ===== */

.back-button img {
  width: 80px;
}

/* ===== Games Table ===== */

.game-table {
  width: 100%;
  border-collapse: collapse;
}

.game-image {
  width: 200px;
  position: relative;
}

.game-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.game-description {
  padding: 10px;
}

.game-description h3 a {
  text-decoration: none;
  color: white;
}

.game-description h3 a:hover {
  color: red;
  transition: color 0.3s ease;
}

/* ===== Sections ===== */

.section {
  margin-bottom: 2em;
}

.section img {
  max-width: 100%;
}

/* ===== Footer ===== */

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 8px 0;
  background: rgba(0, 0, 0, 0.8);
}

footer a {
  text-decoration: none;
}

footer img {
  vertical-align: middle;
}

/* ===== Mobile ===== */

@media (max-width: 768px) {
  body {
    font-size: 16px;
    padding-bottom: 100px;
  }

  .content {
    padding: 0 16px;
  }

  .title-container img {
    height: 80px;
  }

  .nav-container {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .nav-item img {
    width: 160px;
    height: 80px;
  }

  .back-button img {
    width: 60px;
  }

  /* Stack game entries on mobile */
  .game-table,
  .game-table tbody,
  .game-table tr,
  .game-table td {
    display: block;
    width: 100%;
  }

  .game-image {
    position: static;
  }

  .game-image img {
    position: static;
    width: 100%;
    height: auto;
  }

  footer img {
    height: 25px;
  }
}