/*  Home Page  */
body.home-page {
  background-image: url('/static/images/homepage_background.jpg');
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start; /* or center if you want */
  box-sizing: border-box;
}

.global-leaderboard-button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 0;        /* no space below navbar */
  margin-bottom: 2vh;   /* space before homepage form */
}

a.global-leaderboard-button{
  display:inline-flex;
  align-items:center; justify-content:center;
  font-size:clamp(18px,2vw,32px);
  font-weight:800;
  padding:16px 28px;
  border-radius:16px;
  text-decoration:none !important;  /* kill underline */
  color:inherit !important;         /* let variant decide color */
  border:0;
  cursor:pointer;
  width:auto;                       /* badge sizing */
}

.global-leaderboard-button.style--ember {
  color: #fff;
  background: linear-gradient(90deg, #ff7a18, #ffb800);
  border: none;
  box-shadow: 0 8px 24px rgba(255,120,24,.35);
}
.global-leaderboard-button.style--ember:hover { filter: brightness(1.3); }


.homepage-form {
  background-color: rgba(192, 192, 192, 0.75);
  padding: 2vw 3vw 1.5vw 3vw;
  border-radius: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: clamp(300px, 40vw, 2000px);
  box-sizing: border-box;
  flex-direction: column;
  gap: 2vh;
}

.homepage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.logo {
  width: clamp(120px, 25vw, 300px);
  height: auto;
  object-fit: contain;
  margin-bottom: 1vh;
}

input {
  font-size: clamp(16px, 2vw, 28px);
  padding: 1em;
  width: 100%;
  border-radius: 9999px;
  border: 2px solid #ccc;
  outline: none;
  box-sizing: border-box;
  text-align: center;
}

input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 10px rgba(25, 118, 210, 0.2);
}

/* Bar to change search mode */

.search-mode-bar {
  display: flex;
  justify-content: center;
  background-color: rgba(44, 45, 50, 0.95);
  border-radius: 12px;
  width: 90%;
  overflow: hidden;
}

.mode-button {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  color: white;
  font-size: clamp(14px, 1.6vw, 20px);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.mode-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.mode-button.active {
  background-color: #222;
  box-shadow: inset 0 0 10px #f6ff00;
  font-weight: bold;
  text-shadow: 0 0 5px #eaff00;
}

.autocomplete-box {
  position: absolute;
  z-index: 9999;
  width: 100%;
  max-height: 200px;
  overflow-y: auto;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 12px;
  border-top: none;
  margin-top: 0;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.autocomplete-item {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 3em;
  font-size: clamp(16px, 2vw, 22px);
  padding: 0;
  cursor: pointer;
  text-align: center;
}

.autocomplete-item:hover {
  background-color: #f0f0f0;
}

.search-dropdown {
  font-size: clamp(16px, 2vw, 28px);
  height: 3em;
  padding: 0 1em;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 2px solid #ccc;
  outline: none;
  box-sizing: border-box;
  text-align: center;
  margin-top: 0;
}
@media (max-width: 1400px) {
  body.home-page input.search-dropdown {
    font-size: 19px !important;  /* keep text comfortable */
    padding: 0 0.9em;            /* just reduce padding slightly */
  }
  body.home-page input.search-dropdown::placeholder {
    font-size: 19px !important;
  }
}

@media (max-width: 1200px) {
  body.home-page input.search-dropdown {
    font-size: 17px !important;  /* shrink a little */
    padding: 0 0.8em;
  }
  body.home-page input.search-dropdown::placeholder {
    font-size: 17px !important;
  }
}

@media (max-width: 1050px) {
  body.home-page input.search-dropdown {
    font-size: 14px !important;  /* good for tablets */
    padding: 0 0.7em;
  }
  body.home-page input.search-dropdown::placeholder {
    font-size: 14px !important;
  }
}

@media (max-width: 768px) {
  .global-leaderboard-button {
    white-space: normal;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* vertical centering */
    text-align: center;
  }
  body.home-page input.search-dropdown {
    font-size: 14px !important;  /* smaller for narrow phones */
    padding: 0 0.75em;
  }

  body.home-page input.search-dropdown::placeholder {
    font-size: 14px !important;
  }
}