* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #1a1a1a;
  color: #c5b8a5;
  font-family: Georgia, "Times New Roman", serif;
}

.container {
  display: grid;
  grid-template-areas: "menu content";
  grid-template-columns: 2fr 2fr;
  padding: 1rem;
  margin-top: 20px;
  gap: 1rem;
}

@media (max-width: 900px) {
  .container {
    grid-template-areas:
      "menu"
      "content";
    grid-template-columns: 1fr;
  }

  #map-display {
    font-size: 1.2rem;
  }

  #journal-content {
    padding: 1rem;
  }

  #button-container {
    position: static;
    text-align: center;
    margin-top: 1rem;
  }
}

@media (max-width: 600px) {
  #map-display {
    font-size: 1rem;
  }

  #narrative-content,
  #second-narrative-content {
    font-size: 1.2rem;
  }

  #journal-date,
  #second-journal-date {
    font-size: 1.6rem;
  }

  #turn-button {
    width: 100%;
    font-size: 0.9rem;
  }
}

#title-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1a1a1a;
  z-index: 3000;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 1;
  transition: opacity 1.5s ease-out;
}

#title-content {
  text-align: center;
  color: #c5b8a5;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  width: 100%;
  height: 100%;
  justify-content: center;
}

#game-title {
  font-family: "Homemade Apple", cursive;
  font-size: 7rem;
  margin: 0;
  color: #e0d6c7;
  line-height: 1;
}

#title-symbols {
  margin: 0;
  font-size: 2.5rem;
  letter-spacing: 20px;
  color: #665e52;
}

#title-prompt {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.2rem;
  color: #888;
  animation: blink-animation 2s infinite;
}

#info {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  color: #888;
  opacity: 0.3;
}

#info-part-two {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 1.1rem;
  color: #888;
  opacity: 0.3;
}

@keyframes blink-animation {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}

.instructions {
  font-style: italic;
  font-size: 1.1rem;
  padding: 10px;
  color: #eee;
  text-align: center;
  text-shadow: 0 0 1px #eee, 0 0 3px #eee;
  animation: blinkGlow 1.5s infinite alternate;
}

@keyframes blinkGlow {
  0% {
    text-shadow: 0 0 0px #eee, 0 0 1px #eee;
    opacity: 0.9;
  }
  50% {
    text-shadow: 0 0 1px #eee, 0 0 3px #eee;
    opacity: 1;
  }
  100% {
    text-shadow: 0 0 0px #eee, 0 0 1px #eee;
    opacity: 0.9;
  }
}

.error-instructions {
  font-style: italic;
  font-size: 1.1rem;
  padding: 10px;
  color: #e23232;
  text-align: center;
  text-shadow: 0 0 1px #e23232, 0 0 3px #e23232;
  animation: errorGlow 1.5s infinite alternate;
}

@keyframes errorGlow {
  0% {
    text-shadow: 0 0 0px #e23232, 0 0 1px #e23232;
    opacity: 0.9;
  }
  50% {
    text-shadow: 0 0 1px #e23232, 0 0 3px #e23232;
    opacity: 1;
  }
  100% {
    text-shadow: 0 0 0px #e23232, 0 0 1px #e23232;
    opacity: 0.9;
  }
}

.map-container {
  grid-area: menu;
  text-align: center;
}

.content {
  display: flex;
  flex-direction: column;
}

#map-display {
  font-size: 1.5rem;
}

#legend {
  font-size: 1.7rem;
  font-family: "Homemade Apple", cursive;
}

#legend-container {
  display: grid;
  grid-template-columns: repeat(2, auto);
  column-gap: 2rem;
  row-gap: 0.5rem;
  padding: 10px;
  justify-content: center;
}

.symbol-container {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: 0;
  font-family: "Patrick Hand", cursive;
  font-size: 1rem;
  justify-content: center;
}

.symbol-container .symbol {
  font-weight: bold;
  font-size: 1.5rem;
}

.symbol-container span {
  margin-right: 0.5rem;
}

.symbol-slot {
  display: inline-block;
  border-bottom: 1px solid #000;
  width: 1rem;
  text-align: center;
  margin-right: 0.2rem;
  font-weight: bold;
  cursor: text;
}

.symbol-slot.correct-position {
  background-color: #3aa394;
  color: #eee;
}

.symbol-slot.correct-letter {
  background-color: #d3ad69;
  color: #1a1a1a;
}

.symbol-slot.incorrect-letter {
  background-color: #782a40;
  color: #eee;
}

#journal-content {
  padding-left: 2rem;
  padding-right: 2rem;
  line-height: 1.6;
  opacity: 0.9;
}

#journal-date {
  font-size: 1.5rem;
  font-weight: 800;
}

#narrative-content {
  font-size: 1.2rem;
  padding-bottom: 2rem;
}

#second-journal-date {
  font-size: 1.5rem;
  font-weight: 800;
  padding-top: 2rem;
}

#second-narrative-content {
  font-size: 1.2rem;
  padding-bottom: 2rem;
}

#second-narrative-content,
#second-journal-date {
  opacity: 0;
  transition: opacity 1s ease-in;
  display: none;
}

.fade-in {
  display: block;
  opacity: 1;
}

#button-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#turn-button {
  color: #c5b8a5;
  background-color: transparent;
  border: 2px solid #665e52;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 0.5rem 2.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  font-family: Georgia, "Times New Roman", serif;
}

#turn-button:hover {
  background-color: #665e52;
  color: #1a1a1a;
}

#legend-button-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  padding: 40px;
}

#check-answer-button {
  color: #c5b8a5;
  background-color: transparent;
  border: 2px solid #665e52;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 0.5rem 2.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  font-family: Georgia, "Times New Roman", serif;
}

#check-answer-button:hover {
  background-color: #665e52;
  color: #1a1a1a;
}

#legend-button {
  color: #c5b8a5;
  background-color: transparent;
  border: 2px solid #665e52;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
  padding: 0.5rem 2.5rem;
  font-size: 1.5rem;
  cursor: pointer;
  display: none;
  font-family: Georgia, "Times New Roman", serif;
}

#legend-button:hover {
  background-color: #665e52;
  color: #1a1a1a;
}

#help {
  padding: 20px;
  font-size: 1rem;
  animation: helpGlow 1.5s infinite alternate;
}

@keyframes helpGlow {
  0% {
    text-shadow: 0 0 0px #c5b8a5, 0 0 1px #c5b8a5;
    opacity: 0.9;
  }
  50% {
    text-shadow: 0 0 1px #c5b8a5, 0 0 3px #c5b8a5;
    opacity: 1;
  }
  100% {
    text-shadow: 0 0 0px #c5b8a5, 0 0 1px #c5b8a5;
    opacity: 0.9;
  }
}

#intro-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000;
  background-image: url("https://www.transparenttextures.com/patterns/old-wall.png");
  color: #eee;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

#intro-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

#intro-dialogue-box {
  width: 700px;
  height: 200px;
  background-color: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(5px);
  color: #c5b8a5;
  font-size: 1.5rem;
  border: 2px solid #665e52;
  border-radius: 5px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2rem;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  justify-content: space-between;
}

#intro-prompt {
  margin-top: 1rem;
  font-size: 1rem;
  color: #aaa;
  text-align: center;
}

#end-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #1a1a1a;
  z-index: 100;
  display: none;
  opacity: 0;
  transition: opacity 1.5s ease-in;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#end-screen-overlay.visible {
  display: flex;
  opacity: 1;
}

#end-screen-content {
  width: 100%;
  max-width: 1400px;
  text-align: center;
  color: #c5b8a5;
}

#end-screen-content h2 {
  font-family: "Homemade Apple", cursive;
  font-size: 2.2em;
  margin-bottom: 20px;
}

.end-screen-layout {
  display: flex;
  gap: 30px;
  text-align: left;
}

.final-map-container,
.final-legend-container {
  flex: 1;
  text-align: center;
  align-self: center;
}

#final-map-display {
  white-space: pre;
  font-size: 1.5rem;
}

#final-legend-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  font-family: Georgia, "Times New Roman", serif;
}

#final-legend-title {
  font-size: 3rem;
  font-family: "Homemade Apple", cursive;
  padding-bottom: 20px;
  text-align: center;
}

.final-legend-item {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  align-content: center;
}

.final-legend-item .symbol {
  font-size: 1.5rem;
  width: 40px;
}

.final-legend-item .word {
  margin-left: 10px;
}

#end-text {
  font-size: 1.5rem;
  padding-top: 30px;
}

#watermark {
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  padding: 1rem;
  text-align: right;
  font-family: "Homemade Apple", cursive;
  font-size: 2.5rem;
  color: #665e52;
  user-select: none;
  z-index: 100;
}

/* 
  Hello there. Now that I have your attention,
  I'd like you to know that developing this was pure agony.
  Since you've read this message,
  YOU, kind individual,
  must pay a fine of 10,000,000.50 TTD.

  Gracias... :'D
*/
