* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  background: #1a1a2e;
  touch-action: manipulation;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}

/* Desktop warning message */
.desktop-message {
  display: none;
  text-align: center;
  color: #fff;
  padding: 2rem;
}
.desktop-message h1 { font-size: 2rem; margin-bottom: 1rem; }
.desktop-message p { font-size: 1.2rem; margin: 0.5rem 0; }

@media (min-width: 768px) {
  .desktop-message { display: block; }
  .phone-container { display: none; }
}

/* Phone container */
.phone-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
}

/*
 * The nokia-phone wrapper shrink-wraps to the image.
 * Touch zones use % of this container = % of the displayed image.
 */
.nokia-phone {
  position: relative;
  display: inline-block;
  line-height: 0;
}

/* The image defines the container size */
.nokia-image {
  display: block;
  max-height: 96vh;
  max-width: 100vw;
  width: auto;
  height: auto;
  pointer-events: none;
}

/* Game canvas on the LCD screen area */
#screen {
  position: absolute;
  left: calc(24.7% - 10px);
  top: calc(28.3% - 4.5px);
  width: calc(53.3% + 10px);
  height: calc(19.4% + 5px);
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  border-radius: 1%;
}

/* Touch zones overlaid on the phone image buttons */
.touch-zone {
  position: absolute;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
  border-radius: 30%;
}

.touch-zone:active,
.touch-zone.pressed {
  background: rgba(255, 255, 255, 0.15);
}

.touch-zone.tutorial-highlight {
  background: rgba(245, 5, 5, 0.878);
  box-shadow: 0 0 0 2px rgb(248, 4, 4), 0 0 12px rgba(255, 255, 255, 0.3);
  animation: tutorial-pulse 1s ease-in-out infinite;
}

@keyframes tutorial-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.75;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

.touch-zone,
button {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  touch-action: manipulation;
}
