@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #1E1E1E;
  position: relative;
  z-index: 1;
}

/* --- BrewHunt Login Page --- */
.login-body {
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  z-index: 1; /* Make sure it's above the bubbles */
}


.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem; /* slightly more spacing between stacked elements */
  width: 90%;
  max-width: 360px;
  padding: 2rem 2rem 1.5rem;
  z-index: 1;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  align-items: center;
  margin-top: 0.25rem;
  text-align: center;
  z-index: 1;
}



.login-logo {
  width: 200px;
  height: auto;
  animation: pulse 2s infinite;
  margin-bottom: -5rem;
  z-index: 1;
}

.login-title {
  font-size: 3.25rem;
  color: #FDF5E6;
  margin: 0.25rem 0 0.5rem;
  letter-spacing: 1px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  z-index: 1;
}



/* --- Universal Input + Button Styles --- */
input,
textarea,
select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #FDF5E6;
  border: 2px solid transparent; /* <- now hidden until focused */
  border-radius: 20px;
  padding: 1rem;
  font-size: 1rem;
  color: #000;
  width: 100%;
  max-width: 320px;
  box-shadow: none;
  outline: none;
  transition: border-color 0.2s ease;
  margin: 0 auto;
  text-align: center;
  z-index: 1;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #D9922F; /* <- now shows orange only when active */
  outline: none;
  z-index: 1;
}


input::placeholder {
  color: #555;
}

button {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  background-color: #D9922F;
  color: #000;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
  width: 100%;
  max-width: 320px;
  margin-top: 1.25rem;
  z-index: 1;
}

button:hover {
  background-color: #c47f24;
  transform: scale(1.03);
}

/* --- Animations --- */
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* --- Game Layout --- */
.game-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 2rem 1rem;
  z-index: 1;
}

.status {
  font-size: 1.5rem;
  margin-top: -.5rem;
  color: #fff;
  text-align: center;
}

.compass {
  width: 200px;
  height: 200px;
  background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/Compass_rose.svg/512px-Compass_rose.svg.png') no-repeat center/contain;
  transform: rotate(0deg);
  margin: 0 auto;
}

#codeInput {
  display: none;
  margin-top: 20px;
  width: 100%;
  max-width: 300px;
}

#submitCodeBtn {
  display: none;
  width: 100%;
  max-width: 300px;
  background-color: #D9922F;
  color: black;
  padding: 1rem;
  font-size: 1.1rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 1rem;
  z-index: 1;
}

/* --- Leaderboard --- */
.leaderboard-container {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #fff;
  border-top: 3px solid #D9922F;
  max-height: 40px;
  overflow: hidden;
  transition: max-height 0.3s ease;
  z-index: 999;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.2);
}

.leaderboard-container.open {
  max-height: 300px;
}

.leaderboard-header {
  background-color: #D9922F;
  color: #000;
  text-align: center;
  padding: 0.5rem;
  font-weight: bold;
  cursor: pointer;
}

.leaderboard-panel {
  padding: 1rem;
  overflow-y: auto;
  max-height: 250px;
}

#playerList .player {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #ccc;
  font-size: 1rem;
}

#playerList .player:first-child {
  font-weight: bold;
  background-color: #fef3c7;
}

/* --- Popups + Effects --- */
.points-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #22c55e;
  animation: pop 1s ease forwards;
  z-index: 9999;
}

@keyframes pop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  50% { opacity: 1; transform: translate(-50%, -60%) scale(1.2); }
  100% { opacity: 0; transform: translate(-50%, -80%) scale(1); }
}

@keyframes shake {
  0% { transform: translate(0px, 0px); }
  25% { transform: translate(-2px, 0px); }
  50% { transform: translate(2px, 0px); }
  75% { transform: translate(-2px, 0px); }
  100% { transform: translate(0px, 0px); }
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake-light {
  0%, 100% { transform: translate(0px); }
  25% { transform: translate(-1px); }
  50% { transform: translate(1px); }
  75% { transform: translate(-1px); }
}

@keyframes shake-medium {
  0%, 100% { transform: translate(0px); }
  25% { transform: translate(-3px); }
  50% { transform: translate(3px); }
  75% { transform: translate(-3px); }
}

@keyframes shake-hard {
  0%, 100% { transform: translate(0px); }
  25% { transform: translate(-6px); }
  50% { transform: translate(6px); }
  75% { transform: translate(-6px); }
}

.shake-light {
  animation: shake-light 0.4s ease;
}
.shake-medium {
  animation: shake-medium 0.4s ease;
}
.shake-hard {
  animation: shake-hard 0.4s ease;
}

/* --- Log Box --- */
.object-log {
  max-height: 250px;
  overflow-y: auto;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem auto;
  width: 90%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.countdown {
  font-size: 6rem;
  font-weight: 800;
  color: #FDF5E6;
  text-shadow: 3px 3px #000;
  margin-top: 1rem;
  animation: pulse 1.5s infinite;
}

.logo {
  width: 280px;
  height: auto;
  animation: pulse 2s infinite;
  margin-top: 2rem;
  z-index: 1;
}

.game-ui {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  z-index: 1;
  position: relative;
  padding-bottom: 4rem;
  z-index: 1;
}

.logo-top {
  position: relative;
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  z-index: 1;
}


.logo-full {
  width: 400px;
  max-width: 80%;
  height: auto;
  animation: pulse 2s infinite;
  z-index: 1;
}

.countdown {
  font-size: 5rem;
  font-weight: 900;
  color: #FDF5E6;
  text-shadow: 2px 2px 0 #000;
  margin-top: 2rem;
  z-index: 1;
}

.subtext {
  font-size: 1.25rem;
  color: #FDF5E6;
  opacity: 0.85;
  text-shadow: 1px 1px 0 #000;
  z-index: 1;
  text-align: center;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.hidden {
  display: none !important;
}

@media (max-width: 400px) {
  .login-title {
    font-size: 2.25rem;
    max-width: 100%;
    width: 100%;
    z-index: 1;
  }

  .login-container {
    padding: 1.5rem 1rem;
    z-index: 1;
  }
}

#countdown {
  font-size: 2rem;       /* Smaller size */
  font-weight: 600;
  letter-spacing: 1px;
  margin-top: -1.8rem;
  margin-bottom: 0.5rem;
  color: #FDF5E6;          /* Matches Cream White */
  text-align: center;
}

#playerCounter {
  font-size: 0.9rem;
  margin-left: 10px;
  opacity: 0.75;
}

.announce {
  position: absolute;
  top: 80px;
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  z-index: 99;
  color: #FFD700;
}

.game-ui #claimAnnounce,
.game-ui #joinAnnounce {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0rem;
  z-index: 10;
  pointer-events: none;
  max-width: 90%;
  text-align: center;
  white-space: normal;
}



@media (max-width: 400px) {
  #claimAnnounce,
  #joinAnnounce {
    font-size: 1rem;
  }
}
