@font-face {
  font-family: 'Satoshi Variable';
  src: url('Satoshi-Variable.ttf') format('truetype');
}



/* Download button styled like input */
.download-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1100;
  padding: 8px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 25px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.7);
  color: rgba(255, 255, 255, 0.6);
  //font-weight: 500;
  cursor: pointer;
  opacity: 0.95;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);

}
.download-btn:hover, .download-btn:focus {
  border-color: rgba(255,255,255,0.8);
  background: rgba(30,30,30,0.85);
  outline: none;
}
/* Full-bleed background - let p5.js handle the background image */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent any scrolling */
  background: #000; /* Fallback color */
}

/* Center the canvas */
#app, canvas { display: block; }
#app {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
}

/* Prevent page scrolling during touch interactions */
body, canvas { touch-action: none; overscroll-behavior: contain; }

/* Expose safe-area via padding we can read from JS.
   Uses env() with const() fallback for older Safari. */
#safeprobe {
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* Top/Right/Bottom/Left paddings become the insets we read */
  padding-top: env(safe-area-inset-top, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);

  /* Older WebKit fallback */
  padding-top: constant(safe-area-inset-top, 0);
  padding-right: constant(safe-area-inset-right, 0);
  padding-bottom: constant(safe-area-inset-bottom, 0);
  padding-left: constant(safe-area-inset-left, 0);

  /* Keep it invisible but measurable */
  visibility: hidden;
}

/* Default: desktop, fixed phone-like canvas */
canvas {
  width: 390px;
  height: 844px;
  max-width: 100vw;
  max-height: 100vh;
  display: block;
  border-radius: 32px;
  box-shadow: 0 0 32px #0008;
}

/* On small screens, make canvas fill the viewport, no borders */
@media (max-width: 600px), (max-height: 900px) {
  html, body {
    background: #000; /* Ensure black background behind canvas */
  }
  
  #app {
    position: fixed;
    inset: 0;
    display: block;
    place-items: unset;
    width: 100vw;
    height: 100vh;
  }
  
  canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    box-shadow: none;
    max-width: none;
    max-height: none;
  }
}

/* Name input styling */
#name-input-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 80px;
  margin-left: auto;
  margin-right: auto;
  width: 220px; /* or 100%, or max-width: 90vw; */
  text-align: center;
  z-index: 1000;
  pointer-events: auto;
  display: flex;
  justify-content: center;
}

/* On mobile, adjust for safe area */
@media (max-width: 600px), (max-height: 900px) {
  #name-input-container {
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    width: 100vw;
    max-width: 100vw;
  }
}


#name-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 16px;
  //font-family: 'Satoshi Variable', sans-serif;
  text-align: center;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

#name-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#name-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.8);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

/* Hide input on desktop */
/* @media (min-width: 601px) and (min-height: 901px) {
  #name-input-container {
    display: none;
  }
} */

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

.download-btn img {
  display: block;
  width: 24px;
  height: 24px;
}

/* Play sound button styled like input */
.play-sound-btn {
  position: fixed;
  top: 80px; /* Below the download button */
  right: 24px;
  z-index: 1100;
  padding: 8px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  border-radius: 25px;
  border: 2px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.7);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  opacity: 0.95;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}
.play-sound-btn:hover {
  border-color: rgba(255,255,255,0.8);
  background: rgba(30,30,30,0.85);
  outline: none;
}

@media (hover: none) and (pointer: coarse) {
  .play-sound-btn:hover {
    border-color: initial;
    background: initial;
    outline: initial;
  }
}
.play-sound-btn.active {
  border-color: rgba(255,255,255,0.8);
  background: rgba(30,30,30,0.85);
  outline: none;
}
.play-sound-btn img {
  display: block;
  width: 24px;
  height: 24px;
}
