html, body {
  height: 100%;
  margin: 0;
}

body {
  background-color: #3a2c50; /* body color */
  background-image: url('/assets/images/DungeonTile.jpg');
  background-repeat: repeat;
  background-size: auto;
  background-blend-mode: overlay; /* changed from multiply */
  font-family: Georgia, serif;
  color: #f0e6ff;
  line-height: 1.6;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.menu-button {
  position: absolute;
  right: 1rem;
  cursor: pointer;
  font-size: 1.8rem;
  color: #f0e6ff;
  user-select: none;
}

#top-menu {
  display: none; /* hidden by default */
  position: absolute;
  top: 100%;
  right: 0;
  background-color: rgba(60, 40, 90, 0.95);
  padding: 1rem;
  border-radius: 0 0 8px 8px;
  text-align: right;
}

#top-menu a {
  display: block;
  margin: 0.5rem 0;
  color: #d8b4fe;
  text-decoration: none;
}

#top-menu a:hover {
  color: #fff;
}

footer {
  background-color: #3f3153; /* slightly lighter than previous */
  background-image: url('/assets/images/DungeonTile.jpg');
  background-repeat: repeat;
  background-size: auto;
  background-blend-mode: soft-light;
  padding: 1rem;
  color: #fff;
  border-top: 4px solid #2b1e3a;
  border-bottom: 4px solid #2b1e3a;
  text-shadow: 1px 1px 2px #000;
  box-shadow: inset 0 -4px 8px rgba(0,0,0,0.4), inset 0 4px 8px rgba(0,0,0,0.4);
}


main {
  flex: 1;
  padding: 0 1rem;
}

.box {
  background-color: rgba(70, 55, 90, 0.85);
  border: 2px solid #8a5edf;
  border-radius: 10px;
  padding: 1.2rem 1.8rem;
  margin: 1.5rem auto;
  max-width: 700px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
  text-align: center;
}

h1, h2, h3 {
  color: #d8b4fe;
  text-shadow: 1px 1px 2px #1f1825;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.box p {
  margin: 0.6rem 0;
}

a {
  color: #a78bfa;
  text-decoration: none;
}

a:hover {
  color: #d8b4fe;
  text-decoration: underline;
}

.page-footer {
  font-size: 0.9rem;
  color: #ccc;
  padding: 1rem;
  text-shadow: 1px 1px 2px #000;
}

form input, form textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: 5px;
  border: 1px solid #8a5edf;
  background-color: rgba(70, 55, 90, 0.85);
  color: #f0e6ff;
}

form button {
  background-color: #8a5edf;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  cursor: pointer;
}

form button:hover {
  background-color: #a78bfa;
}
