*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Poppins", sans-serif;
  background: #EE6F00;
  color: #fdf2ff;
  overflow: hidden;
}

.sunset-bg {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 210, 150, 0.28), transparent 60%);
  pointer-events: none;
  z-index: -2;
}

.neon-sun {
  position: absolute;
  width: 45vmin;
  height: 45vmin;
  border-radius: 50%;
  background: conic-gradient(
    from 200deg,
    #ff9a3c,
    #ff6f91,
    #ffc857,
    #ff9a3c
  );
  top: 8%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 40px rgba(255, 210, 120, 0.7), 0 0 90px rgba(255, 105, 180, 0.6);
  opacity: 0.9;
}

.palm {
  position: absolute;
  bottom: -10%;
  width: 30vmin;
  height: 60vmin;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 40%);
  filter: drop-shadow(0 0 14px rgba(0, 0, 0, 0.6));
  clip-path: polygon(
    48% 100%,
    58% 54%,
    70% 37%,
    84% 30%,
    100% 34%,
    78% 20%,
    63% 18%,
    51% 0%,
    39% 17%,
    24% 20%,
    0% 30%,
    19% 35%,
    33% 42%,
    43% 57%
  );
  opacity: 0.65;
}

.palm-left {
  left: -5vmin;
  transform: scale(1.1) rotate(-4deg);
}

.palm-right {
  right: -6vmin;
  transform: scale(1.2) rotate(5deg);
}

.page {
  position: relative;
  min-height: 100vh;
  padding: 2vh 2vw;
  display: flex;
  flex-direction: column;
}

.game-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh; /* Dynamic viewport height for mobile */
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none; /* Prevent default touch behaviors on mobile */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.hud {
  position: absolute;
  bottom: clamp(8px, 2vh, 20px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  z-index: 2;
}

.hud-title {
  font-size: 0.7em;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: #ffe3ff;
  text-shadow:
    0 0 10px rgba(15, 23, 42, 0.9),
    0 0 22px rgba(244, 114, 182, 0.9);
}

.hud-score {
  display: inline-flex;
  align-items: baseline;
  gap: clamp(0.2rem, 0.5vw, 0.3rem);
  padding: clamp(0.15rem, 0.4vh, 0.25rem) clamp(0.5rem, 1.2vw, 0.8rem);
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.9);
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.8));
  box-shadow:
    0 8px 18px rgba(15, 23, 42, 0.85),
    0 0 0 1px rgba(148, 163, 184, 0.8);
  font-size: clamp(0.65rem, 1.2vw, 0.78rem);
}

.hud-score .label {
  text-transform: uppercase;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  color: #e5e7eb;
}

.hud-score #scoreValue {
  font-size: clamp(24px, 4vw, 48px);
  font-weight: 700;
  min-width: 1.4rem;
  text-align: right;
  color: #f9fafb;
}

.hud-bottom {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  text-align: center;
  z-index: 2;
}

.under-text {
  font-size: 0.8rem;
  color: rgba(248, 250, 252, 0.95);
}

.hint {
  font-size: 0.75rem;
  color: rgba(226, 232, 240, 0.9);
}

.logo {
  position: absolute;
  top: clamp(15px, 2vh, 30px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  max-width: clamp(100px, 15vw, 200px);
  width: auto;
  height: auto;
}

.construction-text {
  position: absolute;
  top: clamp(70px, 8vh, 100px);
  margin-top: clamp(10px, 2vh, 20px);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Poppins", sans-serif;
  font-size: clamp(18px, 2.5vw, 36px);
  font-weight: 600;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  z-index: 2;
  text-align: center;
  padding: 0 clamp(10px, 3vw, 20px);
  box-sizing: border-box;
}

.loading-text {
  position: absolute;
  top: clamp(80px, 10vh, 118px);
  left: 0;
  width: 100%;
  font-family: "Poppins", sans-serif;
  font-size: clamp(18px, 4vw, 50px);
  font-weight: 700;
  color: #ffffff;
  z-index: 2;
  text-align: center;
  line-height: 1.4;
  padding: 0 clamp(10px, 4vw, 20px);
  box-sizing: border-box;
}


