:root {
  --header-height: 70px; /* Adjust this value to match your header's actual height */
}

body {
  background-attachment: fixed;
  background-image: url('assets/CoC_ClanCapital.jpg');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  font-family: 'Chakra Petch', sans-serif;
  margin: 0;
  height: 100vh; /* Use height instead of min-height */
  overflow: hidden; /* Prevent scrolling on the body */
  padding: 50px 0 0 0;
  padding-top: var(--header-height); /* Use the header height variable */
}

.container {
  background-color: #FCBF49;
  color: #AC5900;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--header-height)); /* Subtract header height from viewport height */
  margin: 0 auto;
  max-width: 1200px;
  padding: 20px;
  width: 100%;
  overflow: hidden;
}

.site-header {
  align-items: center;
  background-color: #C16300;
  display: flex;
  height: var(--header-height);
  justify-content: space-between;
  left: 0;
  padding: 0 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.header-image {
  height: calc(var(--header-height) - 20px);
  width: auto;
}

nav a {
  color: white;
  margin: 0 10px;
  text-decoration: none;
}

.cta-button {
  background-color: #FCBF49;
  border: none;
  color: #AC5900;
  cursor: pointer;
  padding: 10px 20px;
}

.flex-container {
  display: flex;
  justify-content: space-between;
  padding: 10px;
}

.input-group {
  align-items: center;
  display: flex;
  flex-basis: 50%;
  padding: 5px;
}

.input-group label {
  margin-right: 10px;
  white-space: nowrap;
}

.input-group input[type="number"] {
  flex-grow: 1;
}

#step1 input[type="number"] {
  background-color: #EAE2B7;
  font-family: 'Chakra Petch', sans-serif;
  height: 25px;
}

#offerPrice {
  animation: blink 1s linear infinite;
  border: 2px solid red;
  outline: none;
}

.step-container {
  margin-bottom: 20px;
}

.item-container {
  background-color: #EAE2B7;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
}

.items-row, .resources-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.items-row {
  margin-bottom: 30px; /* Add more vertical space between items-row and resources-row */
}

.item-button {
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 9px #999;
  color: #EAE2B7;
  display: inline-block;
  height: 100px;
  justify-content: center;
  margin: 5px;
  overflow: hidden;
  padding: 10px;
  position: relative;
  width: 80px;
}

.item-button:active {
  background-color: #3e8e41;
  box-shadow: 0 5px #666;
  transform: translateY(4px);
}

.item-button img {
  margin: auto;
  max-height: calc(100% - 20px);
  max-width: calc(100% - 20px);
  object-fit: contain;
}

.item-button span {
  background-color: rgba(0, 0, 0, 0.3);
  bottom: 0;
  color: white;
  display: none;
  position: absolute;
  text-align: center;
  width: 100%;
}

.item-button:hover span {
  display: block;
}

.inventory-section {
  margin: 0 auto;
  max-width: 1440px;
  padding: 10px;
}

.inventory-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.inventory-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.inventory-item {
  border: 1px solid #ccc;
  border-radius: 5px;
  height: 60px;
  overflow: hidden;
  position: relative;
  width: 60px;
}

.inventory-item img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.inventory-item .item-quantity {
  background-color: rgba(0, 0, 0, 0.7);
  bottom: 0;
  border-top-left-radius: 5px;
  color: white;
  font-size: 12px;
  padding: 2px 5px;
  position: absolute;
  right: 0;
}

.output-section {
  background-color: transparent; /* Remove background color */
  border-top: 3px solid #C16300;
  width: 100%; /* Make it fit the width of the container */
  margin-top: auto; /* Push it to the bottom of the container */
}

.results-container {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 100%; /* Make it fit the width of the container */
  padding: 10px;
}

.results-container > div {
  margin: 5px 10px;
}

@media screen and (max-width: 768px) {
  .container {
      padding: 10px;
  }

  .flex-container {
      flex-direction: column;
  }

  .input-group {
      margin-bottom: 10px;
      width: 100%;
  }

  .results-container {
      align-items: flex-start;
      flex-direction: column;
  }

  .results-container > div {
      margin: 5px 0;
  }
}

@media screen and (max-width: 1199px) {
  body {
      background: none;
  }
}

@keyframes blink {
  0%, 100% { border-color: red; }
  50% { border-color: transparent; }
}

.content-menu {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  padding-bottom: 20px;
}

/* Adjust scrollbar style for better visibility */
.content-menu::-webkit-scrollbar {
  width: 10px;
}

.content-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.content-menu::-webkit-scrollbar-thumb {
  background: #888;
}

.content-menu::-webkit-scrollbar-thumb:hover {
  background: #555;
}