/* General reset + fonts */
body, html {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: Arial, sans-serif;
  position: relative;
}

/* Background */
.background {
  position: relative;
  background: url("https://raw.githubusercontent.com/Landonjf4/Lumber_Tycoon_2/refs/heads/main/ImagesFolder/MapImage.png") center center / cover no-repeat;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 30px;
  z-index: 0;
}

/* Overlay */
.overlay {
  background-color: rgb(24, 44, 68);
  width: 95%;
  max-width: 1200px;
  padding: 10px; 
  border-radius: 10px; 
  box-sizing: border-box;
  display: flex;
  justify-content: center;
  flex-direction: column;
  color: white;
  position: relative;
  z-index: 2;
}

.overlay-top {
  background-color: rgba(70, 130, 180, 0.9);
  width: 100%;
  padding: 15px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 0;
}

/* Search wrapper */
.search-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Search input with expand animation */
#searchBar {
  width: 100%;
  max-width: 500px;
  padding: 12px 20px;
  border: 2px solid black;
  border-radius: 20px;
  font-size: 16px;
  box-sizing: border-box;
  transition: max-width 0.6s ease, border-color 0.3s ease, 
              box-shadow 0.3s ease, background-color 0.3s ease;
}

#searchBar:hover,
#searchBar:focus {
  max-width: 95%;
  border-color: #013220;
  box-shadow: 0px 0px 12px rgba(1, 50, 32, 0.6);
  background-color: #ffffff;
}

/* Results container */
#resultsContainer {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  flex-direction: column;
  width: 500px;
  z-index: 3;
}

/* Each result */
.result-item {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  padding: 10px 12px;
  min-height: 60px;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease;
  gap: 10px;
}

/* Hover effect */
.result-item:hover {
  background: #f0f0f0;
}

/* Text always centered */
.result-text {
  flex: 1;
  text-align: center;
  font-weight: bold;
  color: black;
}

/* Image on right */
.result-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid black;
}

/* Green button style */
.overlay-button {
  width: auto;
  max-width: 200px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background-color: #4CAF50;
  color: white;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0px 4px 6px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  margin-top: 10px;
}

.overlay-button:hover {
  background-color: #45a049;
  transform: scale(1.05);
}

.overlay-button:active {
  transform: scale(0.98);
}
