/* burn2feel — fire positioning with adjustment knobs */

/* Hard lock the viewport */
html, body {
  margin: 0;
  padding: 0;
  background: #000;
  height: 100%;
  overflow: hidden;
}

body { background: #000; }

/* Fullscreen stage */
.stage {
  position: fixed;
  inset: 0;
  background: #000;
  overflow: hidden;

  /* === ADJUSTMENT KNOBS === */
  
  /* Desktop settings */
  --shrine-scale: 6.0;        
  --fire-offset: -40vh;        /* Negative pulls base down to lower fire on screen */
  
  /* Mobile settings (iPhone 15 Pro) */
  --shrine-scale-mobile: 5.0; 
  --fire-offset-mobile: -55vh; /* Pulls fire down so coin doesn't hit the top */
  
  /* Button position */
  --btn-bottom: 6svh;
  
  /* Safe areas */
  padding:
    max(12px, env(safe-area-inset-top))
    12px
    max(12px, env(safe-area-inset-bottom));
}

/* Fire/coin GIF positioning */
.ritual {
  position: absolute;
  left: 50%;
  
  /* Anchors the bottom of the GIF */
  bottom: var(--fire-offset);
  
  width: 256px;
  height: 256px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  
  /* scale from the bottom so the fire grows UP from the anchor point */
  transform: translateX(-50%) scale(var(--shrine-scale));
  transform-origin: bottom center;
}

/* NES button */
.burnBtn {
  position: absolute;
  left: 50%;
  bottom: calc(var(--btn-bottom) + env(safe-area-inset-bottom));
  transform: translateX(-50%) scale(2);
  transform-origin: center;
  z-index: 10;

  font-family: "Press Start 2P", monospace;
  font-size: 8px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 10px 12px;

  color: #fff;
  background: #2b2b2b;
  border: none;
  border-radius: 0;

  box-shadow:
    0 0 0 2px #000,
    0 0 0 4px #bfbfbf,
    0 0 0 6px #000,
    inset 2px 2px 0 #ffffff,
    inset -2px -2px 0 #7a7a7a;

  -webkit-font-smoothing: none;
  font-smooth: never;
  cursor: pointer;
}

.burnBtn:active {
  transform: translateX(-50%) scale(2) translateY(1px);
  box-shadow:
    0 0 0 2px #000,
    0 0 0 4px #bfbfbf,
    0 0 0 6px #000,
    inset 1px 1px 0 #7a7a7a,
    inset -1px -1px 0 #ffffff;
}

/* Status text */
.status {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(8px, env(safe-area-inset-bottom));
  margin: 0;
  text-align: center;
  color: #a7a7a7;
  font-size: 13px;
  pointer-events: none;
}

/* === MOBILE OVERRIDES === */
@media (max-width: 768px) {
  .ritual {
    /* Uses the mobile knob specifically */
    bottom: var(--fire-offset-mobile);
    transform: translateX(-50%) scale(var(--shrine-scale-mobile));
  }
  
  .stage {
    --btn-bottom: 8svh;
  }
}

/* Desktop media query (ensures desktop uses desktop knob) */
@media (min-width: 900px) {
  .ritual {
    bottom: var(--fire-offset);
    transform: translateX(-50%) scale(var(--shrine-scale));
  }
}