body {
  font-family: sans-serif;
  margin: 1em;
  padding: 0;
  background: #fdfdfd;
  position: relative;
}

div.content {
  position: relative;
  max-width: 1366px;
  margin: 0 auto;
}

.styled-link {
  margin: 1rem;
  color: darkgray; /* Set the text color to light gray */
  text-decoration: none; /* Remove the underline */
}

.styled-link:hover {
  color: gray;
  /* text-decoration: underline; */
}

/* Wrapper for horizontal scroll */
.table-container {
  overflow-x: auto;
  max-width: 100vw;
  margin: auto;
}

/* Base table style */
.table-container table {
  border-collapse: collapse;
  margin: 0 auto;
  table-layout: fixed;
}

/* Table rows (optional, for consistent row height) */
.table-container tr {
  height: 5.067rem;
}

/* Table cells */
.table-container td {
  min-width: 3.8rem;
  aspect-ratio: 3 / 4;
  text-align: center;
  vertical-align: middle;
  font-size: 18px;
  border: 1px solid #D7CCC8;
  background-color: #D7CCC8; /* default */
}

/* Top bar with buttons and stock counter */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1em;
  margin-bottom: 1em;
}

.button-group {
  display: flex;
  gap: 0.5em;
  flex-wrap: wrap;
}

button {
  font-size: clamp(0.8rem, 2vw, 1.2rem);
  padding: 0.4em 0.8em;
  border-radius: 0.4em;
  border: none;
  background-color: #007bff;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #0056b3;
}

/* Coordinates Text */
#coordinatesText {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  text-align: center;
  margin: 1em 0;
}

/* History container positioning */
#historyContainer {
  position: fixed;
  top: 4.5rem;
  right: 1rem;
  z-index: 999;
}

/* Toggle History Button */
#toggleHistoryBtn {
  display: inline-block;
  width: fit-content;
  max-width: 100px;
  white-space: nowrap;
  background-color: rgba(255, 255, 255, 0.1);
  color: #333;
  border: 1px solid #ccc;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  cursor: pointer;
  opacity: 0.2; /* almost invisible by default */
  transition: opacity 0.3s ease, background-color 0.3s ease;
}

#toggleHistoryBtn:hover,
#toggleHistoryBtn:focus,
#toggleHistoryBtn.active {
  opacity: 1; /* fully visible on hover or when active */
  background-color: rgba(255, 255, 255, 0.9);
}

#toggleHistoryBtn.active:not(:hover) {
  opacity: 0.5; /* half visible when history is shown */
}

/* History Box */
#historyBox {
  display: none;
  width: 200px;
  height: 300px;
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  margin-top: 5px;
}

/* History Box Title */
#historyBox h4 {
  text-align: center;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* History List */
#digHistoryList {
  list-style-type: none;
  padding: 0;
}

