html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  min-height: 100vh;
  font-family: Arial, sans-serif;
  background: url("./background.jpg") center center / cover no-repeat;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* HOME SCREEN */
.home-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

.home-container img {
  width: 100%;
  height: auto;
  display: block;
}

.hotspot {
  position: absolute;
  display: block;
  z-index: 20;
}

/* TOP MENU HOTSPOTS */
.home-link { top: 0.5%; left: 0.5%; width: 11%; height: 7%; }
.leaderboard-link { top: 0.5%; left: 12%; width: 16%; height: 7%; }
.privacy-link { top: 0.5%; left: 28.5%; width: 21%; height: 7%; }
.terms-link { top: 0.5%; left: 49.5%; width: 19%; height: 7%; }
.about-link { top: 0.5%; left: 69%; width: 11%; height: 7%; }
.settings-link { top: 0.5%; left: 80%; width: 11%; height: 7%; }
.profile-link { top: 0.5%; left: 91%; width: 9%; height: 7%; }

/* PLAY BUTTON */
.play-button {
  position: absolute;
  left: 50%;
  top: 71%;
  transform: translate(-50%, -50%);
  width: 46%;
  height: 11%;
  cursor: pointer;
  z-index: 9999;
}

/* CONTACT */
.contact-link {
  bottom: 2.5%;
  right: 1.5%;
  width: 26%;
  height: 6%;
}

/* RULES */
#rules-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  display: none;
  justify-content: center;
  align-items: center;
}

.rules-container {
  background: rgba(255,255,255,0.95);
  color: black;
  padding: 25px;
  max-width: 500px;
  width: 90%;
  border-radius: 14px;
  text-align: left;
}

.rules-container h1 {
  margin: 0 0 20px;
  font-size: 2rem;
  text-align: center;
}

.rules-container p {
  margin: 0 0 14px;
}

.rules-container button {
  display: block;
  margin: 25px auto 0;
  padding: 14px 28px;
  background: #2e8b57;
  color: white;
  border: none;
  border-radius: 10px;
}

/* GAME */
#game {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 30px 16px 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* TITLE */
h1 {
  font-size: 3.4rem;
  color: black;
  margin: 24px 0;
}
.subheading {
  font-size: 1.6rem;
  font-weight: normal;
  margin-top: -10px;
  margin-bottom: 20px;
  color: #333;
  text-align:center;
}
/* LETTERS */
#letters {
  display: grid;
  grid-template-columns: repeat(5, 56px);
  gap: 10px;
  justify-content: center;
  margin: 20px auto;
}

.tile {
  width: 56px;
  height: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(to bottom, #7d8b99, #55616d);
  color: black;
  font-size: 2rem;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 0 #3f4952;
}

/* INFO */
#infoBar {
  display: flex;
  gap: 25px;
  margin: 16px 0 24px;
  font-weight: bold;
  color: black;
}

/* INPUT */
.input-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0 auto 20px;
}

#wordInput {
  width: 280px;
  max-width: 90%;
  padding: 14px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  text-align: center;
}

#submitBtn {
  width: 180px;
  padding: 14px;
  font-size: 16px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
}

/* MESSAGES */
#message,
#finalScore {
  margin-top: 15px;
  color: black;
}

/* MOBILE */
@media (max-width: 768px) {
  #game {
    padding: 24px 16px 140px;
  }
.subheading {
  font-size: 1.2rem;
}
  h1 {
    font-size: 3rem;
    margin: 20px 0 18px;
    text-align: center;
  }

  #letters {
    grid-template-columns: repeat(5, 54px);
    gap: 10px;
    margin: 20px auto;
  }

  .tile {
    width: 54px;
    height: 54px;
    font-size: 2rem;
  }

  #infoBar {
    flex-direction: column;
    gap: 10px;
    font-size: 1.3rem;
    margin: 18px 0 20px;
  }

  .input-row {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  #wordInput {
    width: 280px;
    max-width: 90%;
    font-size: 16px;
    padding: 14px;
  }

  #submitBtn {
    width: 160px;
    font-size: 16px;
    padding: 14px;
  }
}