@font-face {
  font-family: "AgencyFB";
  src: url("assets/fonts/AGENCYFB-BOLD.woff") format("woff");
  font-weight: 700;
  font-style: normal;
}

* {
  box-sizing: border-box;
  font-family: "AgencyFB", Arial, sans-serif;
}

/* Page background */
body {
  margin: 0;
  background: #000;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* Design canvas */
#canvas {
  width: 100%;
  max-width: 390px;
  margin: 0 auto;
}

/* Background image behavior */
#image-wrapper {
  position: relative;
  width: 100%;
  background-image: url("assets/images/layout-2x.webp");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 100% auto;
  pointer-events: none;
}

/* Critical: make the div match the image height */
#image-wrapper::before {
  content: "";
  display: block;
  width: 100%;
  padding-top: calc(100% * (3413 / 780));
}

/* Overlay base positioning and behavior */
#overlay-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none;
  color: #fff;
  font-size: 16px;
}

/* Allow interaction only on real controls */
#overlay-container button,
#overlay-container a,
#participate-button,
#download-pubgm-button {
  pointer-events: auto;
}

/* HERO AREA (TOP SECTION) */
#hero-section {
  position: absolute;
  top: 17%;
  left: 8%;
  right: 8%;
}

#hero-heading {
  margin: 0;
  font-size: 38px;
  letter-spacing: 0.6px;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  /* White-to-green vertical gradient fill */
  background: linear-gradient(to top, #34ff6a 0%, #34ff6a 35%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Dark green shadow for depth */
  text-shadow: 0 4px 6px rgba(0, 24, 0, 0.9);
}

.hero-text {
  position: absolute;
  margin-top: 18px;
  font-size: clamp(12px, 3vw, 14px);
  line-height: 1.5;
  text-align: center;
  opacity: 0.9;
  top: 65%;
  text-transform: uppercase;
}

/* BUTTON PLACEMENT (IMAGE-BASED BUTTONS) */
#participate-button {
  position: absolute;
  top: 272%;
  left: 6%;
  width: 40%;
  aspect-ratio: 528 / 161;
  background-image: url("assets/images/btn_participate.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

#download-pubgm-button {
  position: absolute;
  top: 272%;
  left: 52%;
  width: 40%;
  aspect-ratio: 528 / 161;
  background-image: url("assets/images/btn_download.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* LEADERBOARD BLOCK (LOWER SECTION) */
#leaderboard-section {
  position: absolute;
  top: 75%;
  left: 7%;
  right: 7%;
  /*background: rgba(0, 0, 0, 0.55);*/
  padding: 10px 12px;
  border-radius: 10px;
}

#leaderboard-header {
  text-align: center;
  margin-bottom: 0px;
}

#leaderboard-label {
  font-size: 22px;
  letter-spacing: 0.6px;
  opacity: 0.9;
  text-transform: uppercase;
  padding-top: 14px;
  text-align: center;
  /* White-to-light-green vertical gradient - more white, lighter green */
  background: linear-gradient(to top, #7fff9e 0%, #7fff9e 20%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Lighter green shadow for depth */
  text-shadow: 0 3px 5px rgba(0, 40, 0, 0.6);
}

#total-trees-value {
  font-size: 62px;
  font-weight: 700;
  margin-top: -11px;
  /* Match gradient styling of leaderboard label */
  background: linear-gradient(to top, #7fff9e 0%, #7fff9e 20%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 3px 5px rgba(0, 40, 0, 0.6);
}

#leaderboard-rows {
  display: flex;
  flex-direction: column;
  gap: 0.5px;
  width: 90%;
}

.leaderboard-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /*padding: 10px 14px;*/
  /*border-radius: 18px;*/
  /*border: 2px solid rgba(127, 255, 158, 0.9);*/
  /*background: rgba(0, 0, 0, 0.6);*/
  height: 48px;
}

.leaderboard-rank {
  flex: 0 0 auto;
  margin-right: 10px;
  margin-left: 16px;
}

.rank-badge {
  width: 52px;
  aspect-ratio: 1;
  border-radius: 6px;
  /*background: linear-gradient(145deg, #5b3a22, #3b2516);*/
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbe8c4;
  font-size: 18px;
}

.leaderboard-city {
  flex: 1;
  font-size: 18px;
  text-transform: uppercase;
  margin-right: 10px;
  /* White-to-light-green gradient similar to labels */
  background: linear-gradient(to top, #7fff9e 0%, #7fff9e 20%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.leaderboard-points {
  flex: 0 0 auto;
  font-size: 18px;
  color: #ffffff;
}

/* FOOTER (BOTTOM EDGE) */
#site-footer {
  position: absolute;
  bottom: 1.5%;
  left: 7%;
  right: 4%;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

.footer-center {
  text-align: center;
  width: 100%;
}

.footer-right {
  position: absolute;
  right: 0;
  display: flex;
  gap: 6px;
  text-transform: uppercase;
  font-size: 9px;
}

.footer-right a {
  color: #ffd302;
  text-decoration: none;
  opacity: 0.9;
}
