body {
  background-color: #000;
  color: #00ff41;
  font-family: "VT323", monospace;
  font-size: 1.25rem; /* Converted from 20px */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

#game-container {
  max-width: 800px;
  width: 90%; /* Added for responsiveness */
  border: 2px solid #00ff41;
  padding: 1.25rem; /* Converted from 20px */
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box; /* Added for consistent padding */
}

body {
  background-color: #000;
  color: #00ff41;
  font-family: "VT323", monospace;
  font-size: 1.25rem; /* Converted from 20px */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  margin: 0;
}

#game-container {
  max-width: 800px;
  width: 90%; /* Added for responsiveness */
  border: 2px solid #00ff41;
  padding: 1.25rem; /* Converted from 20px */
  height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  box-sizing: border-box; /* Added for consistent padding */
}

#story-output {
  flex-grow: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  padding-right: 0.9375rem; /* Converted from 15px */
}

.input-container {
  display: flex;
  align-items: center;
  margin-top: 1.25rem; /* Converted from 20px */
}

.input-container span {
  margin-right: 0.625rem; /* Converted from 10px */
}

#command-input {
  background-color: transparent;
  border: none;
  color: #00ff41;
  font-family: "VT323", monospace;
  font-size: 1.25rem; /* Converted from 20px */
  width: 100%;
  outline: none;
}

#language-selection {
  text-align: center;
  padding: 1.25rem; /* Converted from 20px */
  border: 2px solid #00ff41;
  max-width: 800px;
  width: 90%; /* Added for responsiveness */
  box-sizing: border-box; /* Added for consistent padding */
}

#language-selection h1 {
  margin-bottom: 1.25rem; /* Converted from 20px */
}

#language-selection button {
  background-color: #00ff41;
  border: none;
  color: #000;
  font-family: "VT323", monospace;
  font-size: 1.375rem; /* Converted from 22px */
  padding: 0.625rem 1.25rem; /* Converted from 10px 20px */
  cursor: pointer;
  margin: 0 0.625rem; /* Converted from 0 10px */
}

#language-selection button:hover {
  background-color: #3367d6;
}

.hidden {
  display: none !important;
}

.user-command {
  color: #00ffff;
}

.user-message {
  color: #00ffff;
  margin-bottom: 0.625rem; /* Converted from 10px */
}

.ai-message {
  color: #00ff41;
  margin-bottom: 0.625rem; /* Converted from 10px */
}

hr {
  border: 0;
  border-top: 1px dashed #00ff41;
  margin: 0.9375rem 0; /* Converted from 15px 0 */
}

/* Custom scrollbar for the retro feel */
::-webkit-scrollbar {
  width: 0.625rem; /* Converted from 10px */
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #00ff41;
  border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: #00dd38;
}

#game-controls {
  position: fixed;
  bottom: 1.25rem; /* 20px */
  left: 1.25rem; /* 20px */
  right: 1.25rem; /* 20px */
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none; /* Allow clicks to pass through the container */
}

#game-controls button {
  pointer-events: all; /* But not through the buttons */
  background-color: #00ff41;
  border: none;
  color: #000;
  font-family: "VT323", monospace;
  font-size: 1.25rem; /* 20px */
  padding: 0.625rem 1.25rem; /* 10px 20px */
  cursor: pointer;
}

#game-controls button:hover {
  background-color: #3367d6;
}

#game-controls > div {
  display: flex;
  gap: 0.625rem; /* 10px */
}

#audio-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

#audio-toggle img {
  width: 24px;
  height: 24px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  body {
    font-size: 1rem; /* Smaller base font size for tablets and smaller */
  }

  #game-container,
  #language-selection {
    width: 95%; /* Take up more width on smaller screens */
    /* height: 90vh; Removed to allow content to dictate height */
    padding: 1rem;
  }

  #language-selection button {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem; /* Even smaller base font size for mobile phones */
  }

  #game-container,
  #language-selection {
    width: 98%; /* Almost full width on very small screens */
    /* height: 95vh; Removed to allow content to dictate height */
    padding: 0.8rem;
  }

  #language-selection h1 {
    font-size: 1.5rem;
  }

  #language-selection button {
    display: block; /* Stack buttons vertically */
    width: 80%;
    margin: 0.5rem auto; /* Center buttons */
  }

  .input-container {
    flex-direction: column; /* Stack input elements */
    align-items: flex-start;
  }

  .input-container span {
    margin-bottom: 0.5rem;
  }
}

#save-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #00ff41;
  color: #000;
  padding: 1rem 2rem;
  border: 2px solid #000;
  border-radius: 5px;
  z-index: 1000;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none; /* Allow clicks to pass through */
}

#save-notification.show {
  opacity: 1;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background-color: #000;
  padding: 2rem;
  border: 2px solid #00ff41;
  text-align: center;
}

.modal-content p {
  margin-bottom: 1.5rem;
}

.modal-content button {
  background-color: #00ff41;
  border: none;
  color: #000;
  font-family: "VT323", monospace;
  font-size: 1.25rem;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  margin: 0 0.5rem;
}

.modal-content button:hover {
  background-color: #3367d6;
}

.typing-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
}

.typing-indicator span {
  height: 10px;
  width: 10px;
  margin: 0 2px;
  background-color: #00ff41;
  border-radius: 50%;
  opacity: 0;
  animation: blink 1s infinite;
}

.typing-indicator span:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
  flex-grow: 1;
  overflow-y: auto;
  white-space: pre-wrap;
  padding-right: 0.9375rem; /* Converted from 15px */
}

.input-container {
  display: flex;
  align-items: center;
  margin-top: 1.25rem; /* Converted from 20px */
}

.input-container span {
  margin-right: 0.625rem; /* Converted from 10px */
}

#command-input {
  background-color: transparent;
  border: none;
  color: #00ff41;
  font-family: "VT323", monospace;
  font-size: 1.25rem; /* Converted from 20px */
  width: 100%;
  outline: none;
}

#language-selection {
  text-align: center;
  padding: 1.25rem; /* Converted from 20px */
  border: 2px solid #00ff41;
  max-width: 800px;
  width: 90%; /* Added for responsiveness */
  box-sizing: border-box; /* Added for consistent padding */
}

#language-selection h1 {
  margin-bottom: 1.25rem; /* Converted from 20px */
}

#language-selection button {
  background-color: #00ff41;
  border: none;
  color: #000;
  font-family: "VT323", monospace;
  font-size: 1.375rem; /* Converted from 22px */
  padding: 0.625rem 1.25rem; /* Converted from 10px 20px */
  cursor: pointer;
  margin: 0 0.625rem; /* Converted from 0 10px */
}

#language-selection button:hover {
  background-color: #3367d6;
}

.hidden {
  display: none !important;
}

.user-command {
  color: #00ffff;
}

.user-message {
  color: #00ffff;
  margin-bottom: 0.625rem; /* Converted from 10px */
}

.ai-message {
  color: #00ff41;
  margin-bottom: 0.625rem; /* Converted from 10px */
}

hr {
  border: 0;
  border-top: 1px dashed #00ff41;
  margin: 0.9375rem 0; /* Converted from 15px 0 */
}

/* Custom scrollbar for the retro feel */
::-webkit-scrollbar {
  width: 0.625rem; /* Converted from 10px */
}

::-webkit-scrollbar-track {
  background: #000;
}

::-webkit-scrollbar-thumb {
  background: #00ff41;
  border: 1px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: #00dd38;
}

#game-controls {
  position: fixed;
  bottom: 1.25rem; /* 20px */
  left: 1.25rem; /* 20px */
  right: 1.25rem; /* 20px */
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none; /* Allow clicks to pass through the container */
}

#game-controls button {
  pointer-events: all; /* But not through the buttons */
  background-color: #00ff41;
  border: none;
  color: #000;
  font-family: "VT323", monospace;
  font-size: 1.25rem; /* 20px */
  padding: 0.625rem 1.25rem; /* 10px 20px */
  cursor: pointer;
}

#game-controls button:hover {
  background-color: #3367d6;
}

#game-controls > div {
  display: flex;
  gap: 0.625rem; /* 10px */
}

#audio-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

#audio-toggle img {
  width: 24px;
  height: 24px;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
  body {
    font-size: 1rem; /* Smaller base font size for tablets and smaller */
  }

  #game-container,
  #language-selection {
    width: 95%; /* Take up more width on smaller screens */
    /* height: 90vh; Removed to allow content to dictate height */
    padding: 1rem;
  }

  #language-selection button {
    font-size: 1.2rem;
    padding: 0.5rem 1rem;
    margin: 0.5rem 0.5rem;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9rem; /* Even smaller base font size for mobile phones */
  }

  #game-container,
  #language-selection {
    width: 98%; /* Almost full width on very small screens */
    /* height: 95vh; Removed to allow content to dictate height */
    padding: 0.8rem;
  }

  #language-selection h1 {
    font-size: 1.5rem;
  }

  #language-selection button {
    display: block; /* Stack buttons vertically */
    width: 80%;
    margin: 0.5rem auto; /* Center buttons */
  }

  .input-container {
    flex-direction: column; /* Stack input elements */
    align-items: flex-start;
  }

  .input-container span {
    margin-bottom: 0.5rem;
  }
}

#save-notification {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #00ff41;
  color: #000;
  padding: 1rem 2rem;
  border: 2px solid #000;
  border-radius: 5px;
  z-index: 1000;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none; /* Allow clicks to pass through */
}

#save-notification.show {
  opacity: 1;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background-color: #000;
  padding: 2rem;
  border: 2px solid #00ff41;
  text-align: center;
}

.modal-content p {
  margin-bottom: 1.5rem;
}

.modal-content button {
  background-color: #00ff41;
  border: none;
  color: #000;
  font-family: "VT323", monospace;
  font-size: 1.25rem;
  padding: 0.5rem 1.5rem;
  cursor: pointer;
  margin: 0 0.5rem;
}

.modal-content button:hover {
  background-color: #3367d6;
}
