

.scenarii-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 10px;
}

.scenarii-item {
  border: 1px solid var(--font-color);
  border-radius: 8px;
  padding: 15px;
  background-color: rgba(34, 139, 34, 0.3);
  text-align: center;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
}

.scenarii-item:hover {
  background-color: rgba(34, 139, 34, 0.7);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 15px rgba(34, 139, 34, 0.9), 0 0 20px var(--font-color);
  filter: brightness(1.2);
}

.scenarii-item:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(34, 139, 34, 0.7);
  filter: brightness(0.9);
}

.scenarii-item h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--font-color);
}

.play-button {
  background-color: forestgreen;
  color: var(--font-color);
  border: 1px solid var(--font-color);
  padding: 5px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-base);
  margin-top: 10px;
  transition: all 0.2s ease-in-out;
}

.play-button:hover {
  background-color: rgba(34, 139, 34, 0.7);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 15px rgba(34, 139, 34, 0.9), 0 0 20px var(--font-color);
  filter: brightness(1.2);
}

.play-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(34, 139, 34, 0.7);
  filter: brightness(0.9);
}






/* Modal styles */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100dvw;
  height: 100dvh;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.4s ease-in-out, visibility 0.4s ease-in-out;
  visibility: hidden; /* Hidden by default */
  font-size: max(1.75dvh, 13px);
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: #114611;
  background: linear-gradient(0deg, #114611, #228b22);
  margin: calc(5dvh - 2px) auto;
  border: 2px solid var(--font-color);
  border-radius: 8px;
  width: min(90dvw, 640px);
  box-shadow: 0 0 10px forestgreen, 0 0 20px forestgreen;
  color: var(--font-color);
  font-family: var(--font-base);
  padding: 0;
  max-height: 90dvh;
  image-rendering: pixelated;
  display: flex;
  flex-flow: column;
  transform: translateY(-50px); /* Start slightly above */
  transition: transform 0.4s ease-in-out;
}

.modal.show .modal-content {
  transform: translateY(0); /* Slide into place */
}

.modal-header {
  padding: 10px 20px;
  border-bottom: 1px solid var(--font-color);
  position: sticky;
  text-align: center;
  top: 0;
  z-index: 1;
  background-color: forestgreen;
}

.modal-header h2 {
  margin: 0;
  text-shadow: 0 0 5px forestgreen, 0 0 10px forestgreen;
}

.close {
  color: var(--font-color);
  float: right;
  font-size: 28px;
  height: 28px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  right: 20px;
  top: 10px;
}

.close:hover,
.close:focus {
  color: white;
  text-decoration: none;
  cursor: pointer;
}

.modal-body {
  padding: 20px;
  line-height: 1.4;
  font-family: system-ui, Roboto, 'Helvetica Neue', sans-serif;
  font-weight: 175;
  overflow-y: auto;
}

.modal-body h3 {
  font-weight: 225;
}

.modal-footer {
  padding: 15px;
  border-top: 1px solid var(--font-color);
  text-align: center;
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

/* GitHub links styling */
.github-links {
  margin: 20px 0;
  display: flex;
  justify-content: space-evenly;
}

.github-links h3 {
  margin-bottom: 10px;
  text-shadow: 0 0 5px forestgreen;
}

.link-container {
  margin: 15px 0;
}

.link-container a {
  display: flex;
  align-items: center;
  color: var(--font-color);
  text-decoration: none;
  padding: 8px;
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  transition: background-color 0.3s;
  width: fit-content;
}

.link-container a:hover {
  background-color: rgba(0, 0, 0, 0.4);
  text-decoration: underline;
}

.github-logo {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  filter: invert(83%) sepia(53%) saturate(765%) hue-rotate(359deg) brightness(103%) contrast(105%);
}

/* Game description styling */
.game-description {
  margin: 10px 0;
  font-size: 1.1em;
}

/* Credits styling */
.credits, .license {
  margin: 20px 0;
}

.credits h3, .license h3 {
  margin-bottom: 10px;
  text-shadow: 0 0 5px forestgreen;
}

.credits p, .license p {
  margin: 5px 0;
}

.version-info {
  font-style: italic;
  opacity: 0.8;
  text-align: right;
}

/* License link styling */
.license a {
  color: var(--font-color);
  text-decoration: underline;
}


.option-group {
  margin-bottom: 20px;
}

.option-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.option-btn {
  background-color: rgba(34, 139, 34, 0.3);
  border: 1px solid var(--font-color);
  color: var(--font-color);
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  /* font-family: var(--font-base); */
  transition: all 0.2s ease-in-out;
}

.option-btn:disabled, .menu-button:disabled {
  background-color: lightslategrey;
  cursor: not-allowed;
  opacity: 0.75;
  pointer-events: none;
}

.option-btn:hover {
  background-color: rgba(34, 139, 34, 0.7);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 10px rgba(34, 139, 34, 0.8), 0 0 15px var(--font-color);
  filter: brightness(1.15);
}

.option-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 6px rgba(34, 139, 34, 0.6);
  filter: brightness(0.95);
}

.option-btn.selected {
  background-color: forestgreen;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  transform: scale(1.05);
  filter: brightness(1.3);
}

input {
  flex: 1;
  padding: 8px;
  /* font-family: var(--font-base); */
  font-size: .75rem;
  background: rgba(34, 139, 34, 0.2);
  border: 2px solid rgba(255, 215, 0, 0.5);
  border-radius: 4px;
  color: var(--font-color);
  text-align: center;
  user-select: auto;
  -webkit-user-select: auto;
  cursor: text;
}

.toggle-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.toggle-label input {
  margin-right: 8px;
}

.footerButton {
  width: 100%;
  padding: 8px 16px;
  background-color: forestgreen;
  color: var(--font-color);
  border: 1px solid var(--font-color);
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-base);
  transition: all 0.2s ease-in-out;
}

.footerButton:hover {
  background-color: rgba(34, 139, 34, 0.7);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 10px rgba(34, 139, 34, 0.8), 0 0 15px var(--font-color);
  filter: brightness(1.15);
}

.footerButton:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 0 2px 6px rgba(34, 139, 34, 0.6);
  filter: brightness(0.95);
}

.cancelButton {
  background-color: #333;
}

.cancelButton:hover {
  background-color: rgba(51, 51, 51, 0.7);
  box-shadow: 0 4px 10px rgba(51, 51, 51, 0.8), 0 0 15px var(--font-color);
}

.cancelButton:active {
  background-color: rgba(51, 51, 51, 0.9);
}

/** In-game menu */
#gameMenuSection .menu-button {
  margin: 15px auto;
  width: 80%;
  max-width: 285px;
  display: block;
}

#resumeGame {
  background-color: forestgreen;
}

#quitToHome {
  background-color: rgba(139, 0, 0, 0.7);
}

/** Map info section */
.map-info-section {
  background-color: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 20px;
}

.map-info-section h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2em;
  text-align: center;
  color: var(--font-color);
  text-shadow: 0 0 5px forestgreen;
}

.map-info-content {
  margin-bottom: 15px;
}

.map-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
}

.map-info-row:last-child {
  border-bottom: none;
}

.map-info-label {
  font-weight: 600;
  color: rgba(255, 215, 0, 0.9);
}

.map-info-value {
  font-family: monospace;
  color: var(--font-color);
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.3);
  padding: 4px 8px;
  border-radius: 3px;
}

.export-button {
  width: 100%;
  background-color: rgba(34, 139, 34, 0.5);
  border: 1px solid var(--font-color);
}

.export-button:hover {
  background-color: rgba(34, 139, 34, 0.8);
}

/* Tab navigation styles */
.tab-navigation {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--font-color);
}

.tab-button {
  flex: 1;
  padding: 12px 16px;
  background-color: rgba(34, 139, 34, 0.2);
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--font-color);
  font-family: var(--font-base);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  opacity: 0.7;
}

.tab-button:hover {
  background-color: rgba(34, 139, 34, 0.4);
  opacity: 0.9;
}

.tab-button.active {
  background-color: rgba(34, 139, 34, 0.5);
  border-bottom-color: var(--font-color);
  opacity: 1;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Inline control layout (label + control on same line) */
.inline-control {
  display: flex;
  align-items: center;
  gap: 15px;
}

.inline-control h3 {
  margin: 0;
  flex-shrink: 0;
}

.inline-control select {
  flex: 1;
  max-width: 250px;
  padding: 8px;
  font-size: 14px;
  background: #1a1a1a;
  color: white;
  border: 1px solid #444;
  border-radius: 4px;
}