html, body {
  height: 100%;
  margin: 0
}

body {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: #fafafa;
  color: #333;
  line-height: 1.6;
  text-align: center;
}

.content {
  flex-grow: 1;
}

* {
  font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}

footer * {
  padding: 0;
  margin: 0;
}

#settingsContainer {
  display: flex;
}

/* Barbell Setting */
.barbellSetting {
  display: flex;
  gap: 5px;
  font-size: 1.25rem;
  margin: 1rem;

}

#barbellWeight {
  border-radius: 8px;
  width: 5rem;
  font-size: 1.25rem;
  text-align: center;
}

/* INVENTORY */
#inventory {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background-color: hsla(16, 80%, 50%, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.inventoryItem {
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom right, #ffffff, #f8f8f8);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.inventoryItem:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.08);
}

.inventoryItem row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.inventoryItem row button {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.inventoryItem row button:hover {
  transform: scale(1.05);
}

.inventoryCounter {
  min-width: 24px;
  font-weight: bold;
  font-size: 1rem;
  color: #444;
  margin: auto auto;
}

.plusButton, .minusButton {
  font-size: 1rem;
  font-weight: bold;
  transition: 0.3s ease all;
}

.plusButton:hover {
  background-color: green;
  color: white;
}

.minusButton:hover {
  background-color: rgb(130, 12, 12);
  color: white;
}

.inventoryItem span:first-child {
  font-size: 1rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.25rem;
}

#reset {
  display: inline-block;
  padding: 10px 20px;
  margin: 20px auto;
  font-size: 14px;
  font-weight: bold;
  text-transform: uppercase;
  color: #fff;
  background-color: #03a9f4; /* same blue as toggle default */
  border: none;
  border-radius: 100px; /* pill-shaped, like toggles */
  box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: 0.3s ease all;
}

#reset:hover {
  background-color: #f44336; /* darker blue hover */
  box-shadow: 0 8px 16px -6px rgba(0, 0, 0, 0.25);
}

#reset:active {
  transform: scale(0.90);
}

/* WEIGHT GRID */
.weightGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.5rem;
  padding: 1.5rem;
  background-color: hsla(16, 80%, 50%, 0.08);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.weightGridItem {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background-color: #f9f9f9;
}

.weightGridTitle {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
  text-align: center;
}

.WeightGridPlates {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  gap: 2px;
}

.gridPlate {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.gridPlateLabel {
  color: white;
  font-size: 15px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}



/* TOGGLES */
.toggle-button-cover {
  display: table-cell;
  position: relative;
  width: 200px;
  height: 140px;
  box-sizing: border-box;
}

.button-cover {
  height: 100px;
  margin: 20px;
  background-color: #fff;
  box-shadow: 0 10px 20px -8px #c5d6d6;
  border-radius: 4px;
}

.button-cover:before {
  counter-increment: button-counter;
  content: counter(button-counter);
  position: absolute;
  right: 0;
  bottom: 0;
  color: #d7e3e3;
  font-size: 12px;
  line-height: 1;
  padding: 5px;
}

.button-cover,
.knobs,
.layer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.button {
  position: relative;
  top: 0;
  width: 74px;
  height: 36px;
  margin: 10px auto;
  overflow: hidden;
}

.button.r,
.button.r .layer {
  border-radius: 100px;
  margin: 5px;
}

.button.b2 {
  border-radius: 2px;
}

.checkbox {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.knobs {
  z-index: 2;
}

.layer {
  width: 100%;
  background-color: #ebf7fc;
  transition: 0.3s ease all;
  z-index: 1;
}

/* Unit Toggle */
#unitToggle .knobs:before {
  content: "KG";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 1;
  padding: 9px 4px;
  background-color: #03a9f4;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.18, 0.89, 0.35, 1.15) all;
}

#unitToggle .checkbox:checked+.knobs:before {
  content: "LBS";
  left: 42px;
  background-color: #f44336;
}

#unitToggle .checkbox:checked~.layer {
  background-color: #fcebeb;
}

#unitToggle .knobs,
#unitToggle .knobs:before,
#unitToggle .layer {
  transition: 0.3s ease all;
}

/* Mode Toggle */
#modeToggle .knobs:before {
  content: "Grid";
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 10px;
  color: #fff;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 1;
  padding: 9px 4px;
  background-color: #03a9f4;
  border-radius: 50%;
  transition: 0.3s cubic-bezier(0.18, 0.89, 0.35, 1.15) all;
}

#modeToggle .checkbox:checked+.knobs:before {
  content: "List";
  left: 42px;
  background-color: #f44336;
}

#modeToggle .checkbox:checked~.layer {
  background-color: #fcebeb;
}

#modeToggle .knobs,
#modeToggle .knobs:before,
#modeToggle .layer {
  transition: 0.3s ease all;
}

@media print {
  #settingsContainer, #inventory, #reset, header, footer {
    display: none;
  }
  body {
    width: 297mm;
  }
  #calculatedWeights, .weightGrid, body {
    background-color: white;
    box-shadow: none;
    border: none;
  }
  .weightGridItem {
    background-color: white;
    border: 2px black solid;
    padding: 5px;
  }
}