*,
*::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(20px, 3vh, 40px);
  left: clamp(20px, 3vw, 40px);
  transform: none;
  z-index: 2;
  max-width: clamp(160px, 20vw, 260px);
  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, calc(8vh + 10px), 118px);
  left: 0;
  width: 100%;
  font-family: "Poppins", sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: #ffffff;
  z-index: 2;
  text-align: center;
  line-height: 1.4;
  padding: 0 clamp(10px, 4vw, 20px);
  box-sizing: border-box;
}

.action-button {
  position: absolute;
  top: clamp(220px, 26vh, 300px);
  left: 50%;
  transform: translateX(-50%);
  font-family: "Poppins", sans-serif;
  font-size: clamp(12px, 2vw, 16px);
  font-weight: 600;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.85);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: clamp(6px, 1.5vh, 10px) clamp(20px, 4vw, 32px);
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.action-button:hover {
  background: rgba(15, 23, 42, 0.95);
  border-color: #ffffff;
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 
    0 6px 16px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

.action-button:active {
  transform: translateX(-50%) translateY(0);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .action-button {
    top: clamp(195px, 24vh, 245px);
    padding: clamp(6px, 1.8vh, 10px) clamp(18px, 7vw, 28px);
  }
}

@media (max-width: 480px) {
  .loading-text {
    font-size: 20px;
    line-height: 1.3;
    top: clamp(96px, calc(8vh + 26px), 134px);
  }

  .action-button {
    top: clamp(165px, 21vh, 215px);
    font-size: clamp(11px, 3vw, 14px);
    padding: clamp(6px, 1.6vh, 9px) clamp(16px, 9vw, 26px);
  }
}

.phone-number {
  position: absolute;
  bottom: 60px;
  left: 100px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: opacity 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
}

.phone-number:hover {
  opacity: 0.8;
}

.phone-number:active {
  opacity: 0.6;
}

.address {
  position: absolute;
  bottom: 60px;
  right: 100px;
  font-family: "Poppins", sans-serif;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 600;
  color: #ffffff;
  z-index: 2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.icon {
  flex-shrink: 0;
  color: currentColor;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

@media (max-width: 768px) {
  .phone-number,
  .address {
    font-size: clamp(12px, 2.5vw, 16px);
  }
  .icon {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .logo {
    left: 50%;
    transform: translateX(-50%);
  }
  .hud {
    bottom: clamp(100px, 15vh, 140px);
  }
  .phone-number {
    font-size: clamp(11px, 3vw, 14px);
    bottom: clamp(65px, 9vh, 90px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
    justify-content: center;
    padding: 0 clamp(16px, 4vw, 24px);
    box-sizing: border-box;
  }
  .address {
    font-size: clamp(11px, 3vw, 14px);
    bottom: clamp(45px, 6.5vh, 65px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    text-align: center;
    justify-content: center;
    padding: 0 clamp(16px, 4vw, 24px);
    box-sizing: border-box;
    margin-top: 0;
    white-space: nowrap;
  }
  .icon {
    width: 12px;
    height: 12px;
  }
}


