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

body {
  background: #0a0a0f;
  color: #c8c8d0;
  font-family: monospace;
  overflow: hidden;
  height: 100dvh;
  width: 100vw;
  touch-action: none;
}

#ascii-container {
  width: 100vw;
  height: 100dvh;
  position: relative;
}

#ascii-canvas {
  display: block;
  width: 100vw;
  height: 100dvh;
}

#fps-counter {
  position: fixed;
  top: 8px;
  right: 12px;
  font-size: 0.7rem;
  color: #444;
  z-index: 10;
}

#screenshot-btn {
  display: block;
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: white;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  box-shadow: 0 0 0 3px rgba(0,0,0,0.1), 0 0 0 7px rgba(255,255,255,0.3);
  transition: transform 0.1s ease;
}

#screenshot-btn:active {
  background: rgba(220,220,220,1);
  transform: translateX(-50%) scale(0.92);
}

#rotate-btn {
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  z-index: 20;
  right: calc(50% - 90px);
  bottom: 38px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.15);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  transition: transform 0.1s ease;
  padding: 0;
}

#rotate-btn svg {
  width: 30px;
  height: 30px;
  color: white;
  display: block;
  margin: auto;
}

#rotate-btn:active {
  transform: scale(0.9);
}

@media (max-width: 768px) {
  #rotate-btn {
    display: flex;
  }
}

#camera-prompt {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
}

#camera-prompt-text {
  font-family: monospace;
  font-size: 1.2rem;
  color: #c8c8d0;
  text-align: center;
  padding: 0 20px;
}

#retry-btn {
  margin-top: 24px;
  font-family: monospace;
  font-size: 1rem;
  color: #c8c8d0;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 10px 24px;
  cursor: pointer;
}

#retry-btn:active {
  background: rgba(255,255,255,0.2);
}

video { display: none; }
#sample-canvas { display: none; }
