body 
{
  font-family: Arial, sans-serif;
  background-color: #111;
  color: #fff;
  padding: 30px;
  white-space: nowrap;
}

table {
  border-collapse: collapse;
  width: 400px;
}

th, td {
  border: 1px solid black;
  padding: 6px;
  text-align: center;
}

select, input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  padding: 4px;
}

.bottom-row {
  border: none;
  padding: 6px;
  text-align: left;
}

.bottom-wrapper {
  display: flex;
  justify-content: space-between;
  border: 1px solid black;
  border-top: none;
  width: 400px; /* Match your table width */
}

.bottom-cell {
  flex: 1;
  padding: 6px;
  box-sizing: border-box;
}

.bottom-cell label {
  display: block;
  margin-bottom: 4px;
}

.value-cell {
  text-align: left;
  padding-left: 8px;
}
/* Add Ore Button */
.add-ore-btn {
      margin-top: 10px;
      width: 80px;
      height: 40px;
      background-color: #1c1c1c;
      border: 1px solid #555;
      color: #fff;
      font-size: 0.9em;
      cursor: pointer;
      display: flex;
      justify-content: center;
      align-items: center;
      transition: background-color 0.2s;
}

/* Popup overlay */
#ore-popup {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.7) !important;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

/* Popup content */
#ore-popup-content {
  background: #181818 !important;
  color: #fff;
  padding: 24px 28px;
  border-radius: 12px;
  max-width: fit-content;
  min-width: 320px;
  max-height: 80vh;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Ore grid */
.ore-popup-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin: 16px 0;
  box-shadow: 0 4px 24px rgba(0,0,0,0.5);
}

/* Ore row in popup */
.ore-popup-row {
  display: flex;
  align-items: center;
  cursor: pointer;
  background: #232323;
  padding: 1.5px 2px;
  border-radius: 6px;
  transition: background 0.15s;
  min-width: 140px;
  font-size: 0.9em;
}
.ore-popup-row:hover {
  background: #333;
}

.ore-popup-row img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
}

.ore-popup-row span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Add to your CSS file for table ore images */
.ore-img {
  width: 24px;
  height: 24px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Make the cancel button fill the last grid cell and center it */
.ore-popup-cancel-btn {
  grid-column: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgb(172, 0, 0);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 1.5px 2px;
  min-width: 140px;
  font-size:0.9em;
  cursor: pointer;
  transition: background 0.15s;
  box-sizing: border-box;
}
.ore-popup-cancel-btn:hover {
  background: darkred;
}

/* Home Button */
#home-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 100;
  padding: 10px 22px;
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1.1em;
  cursor: pointer;
  box-shadow: 0 2px 8px #0003;
  transition: background 0.2s;
}

#home-btn:hover {
  background: #444;
}