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

body,
html {
  width: 100%;
  height: 100%;
  background-color: black;
}

body {
  overflow: hidden;
}

.canvas {
  position: relative;
  width: calc(100% - 40px);
  height: calc(100% - 100px);
  margin: 50px;
  overflow: hidden;
  background-color: black;
  /* Ensure canvas background */
}

body:fullscreen .canvas {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
}

body:-webkit-full-screen .canvas {
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
}

.image {
  position: absolute;
  height: 100%;
  width: auto;
  display: block;
  /* Changed from 'none' */
  clip-path: inset(0 100% 0 0);
  image-rendering: crisp-edges;
  will-change: clip-path;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Keep existing menu styles */
.menu {
  position: absolute;
  top: 7px;
  left: 40px;
  z-index: 10000;
  color: white;
  font-family: "Archivo Narrow", serif;
  font-size: 1.8em;
}

.debug-overlay {
  position: absolute;
  top: 40px;
  left: 20px;
  color: rgba(34, 255, 0, 0.5);
  padding: 10px;
  font-family: monospace;
  z-index: 1000;
  max-height: 90vh;
  overflow: hidden;
  display: none;
  /* Ensure debug is visible */
}

/* Keep existing button styles */
.fullscreen-toggle,
.play-toggle {
  position: absolute;
  z-index: 10000;
  padding: 8px 15px;
  background: rgba(0, 0, 0, 0.4);
  color: rgb(255, 255, 255);
  border: none;
  cursor: pointer;
  font-family: "Archivo Narrow", serif;
}

.fullscreen-toggle {
  bottom: 10px;
  right: 40px;
  font-size: 0.7em;
}

.play-toggle {
  bottom: 10px;
  left: 40px;
  font-size: 0.9em;
}

@media (max-aspect-ratio: 3/4) {
  .canvas {
    width: calc(100% - 40px);
    height: calc((100vw - 40px) * 4 / 3);
    max-height: calc(100% - 40px);
  }
}