* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  background: #f2f2f2;
  overflow-x: hidden;
}
h1 {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* =========================
   LOGIN
========================= */
#login {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 20px;
}

.logo {
  width: 180px;
  max-width: 80%;
}

/* =========================
   INPUTS
========================= */
input {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: 2px solid #ddd;
  font-size: 18px;
  outline: none;
}

button {
  padding: 16px 22px;
  border: none;
  border-radius: 14px;
  background: black;
  color: white;
  font-size: 18px;
  cursor: pointer;
}
button:hover {
  opacity: 0.8;
  box-shadow: 2px 2px 4px #00000043;
}

.btn-box {
  display: flex;
  justify-content: center;
  padding: 10px 10px 0 10px;
  gap: 10px;
}
#info {
  background: rgb(202, 202, 202);
  color: #000;
}

/* =========================
   GAME
========================= */
#game {
  min-height: 100vh;
  padding-bottom: 120px;
}

#currentGroupDisplay {
  margin: 5px 20px;
  font-size: 12px;
}

/* =========================
   LETTERS
========================= */
#topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  padding: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

#letters {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

#letters div {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: bold;
}

/* =========================
   MAP
========================= */
#map {
  position: relative;
  width: 100%;
}

.mapImage {
  width: 100%;
  display: block;
  box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.362);
}

/* =========================
   BOTTOM INPUT
========================= */
#bottomInput {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: white;
  padding: 15px;
  display: flex;
  gap: 10px;
  z-index: 20;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

#bottomInput input {
  flex: 1;
}

.task {
  margin-top: 0px;
  background-color: rgb(218, 218, 218);
  padding: 12px;
  border-radius: 12px;
}

/* =========================
   OVERLAY
========================= */
#overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

#overlay.hidden {
  display: none !important;
}

#overlayContent {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 24px;
  padding: 24px;
  position: relative;
}

/* =========================
   MEDIA
========================= */
.hintImage {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 20px;
}

.hintVideo {
  width: 100%;
  border-radius: 18px;
  margin-bottom: 20px;
}

audio {
  width: 100%;
  margin: 20px 0;
}

.qr {
  width: 240px;
  max-width: 100%;
  display: block;
  margin: 20px auto;
}

/* =========================
   QUIZ
========================= */
.quizQuestion {
  margin-bottom: 25px;
}

.quizQuestion p {
  margin-bottom: 10px;
}

/* =========================
   CLOSE BUTTON
========================= */
.closeBtn {
  width: 100%;
  margin-top: 20px;
}

/* =========================
   HINT POPUP
========================= */
.hintPopup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: black;
  color: white;
  padding: 14px 24px;
  border-radius: 14px;
  z-index: 9999;
}

/* =========================
   PULSE
========================= */
.pulse {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(1);
  }
}

/* =========================
   SUCCESS OVERLAY
========================= */
#successOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

#successOverlay.hidden {
  display: none !important;
}

#successContent {
  width: 100%;
  max-width: 450px;
  background: white;
  border-radius: 24px;
  padding: 32px 24px 24px;
  text-align: center;
}

.successIcon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #1fbf5f;
  color: white;
  font-size: 48px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

#successContent h2 {
  margin: 0 0 10px 0;
}

#successContent p {
  margin: 0 0 20px 0;
  color: #555;
}

/* =========================
   FAIL OVERLAY
========================= */
#failOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

#failOverlay.hidden {
  display: none !important;
}

#failContent {
  width: 100%;
  max-width: 450px;
  background: white;
  border-radius: 24px;
  padding: 32px 24px 24px;
  /* text-align: center; */
}

.failIcon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #d93030;
  color: white;
  font-size: 48px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

#failContent h2 {
  margin: 0 0 10px 0;
}

#failContent p {
  margin: 0 0 20px 0;
  color: #555;
}

/* =========================
   INFO OVERLAY
========================= */
#infoOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

#infoOverlay.hidden {
  display: none !important;
}

#infoContent {
  width: 100%;
  max-width: 650px;
  max-height: 90vh;
  overflow-y: auto;
  background: white;
  border-radius: 24px;
  padding: 24px 24px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.infoClose {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  background: #eee;
  color: #000;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.infoBody {
  padding-top: 10px;
}

.infoBody h2 {
  margin: 0 0 12px 0;
}

.infoBody p {
  margin: 0 0 12px 0;
}

.infoNav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

.infoArrow {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: #000;
  color: #fff;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.infoArrow:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#infoCounter {
  font-size: 16px;
  font-weight: bold;
  color: #555;
}

/* =========================
   INTRO DONE OVERLAY
========================= */
#introDoneOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 999;
}

#introDoneOverlay.hidden {
  display: none !important;
}

#introDoneContent {
  width: 100%;
  max-width: 450px;
  background: white;
  border-radius: 24px;
  padding: 32px 24px 24px;
  text-align: center;
}

#introDoneContent h2 {
  margin: 0 0 10px 0;
}

#introDoneContent p {
  margin: 0 0 20px 0;
  color: #555;
}
