@font-face {
  font-family: 'Bedstead';
  src: url('assets/images/fonts/bedstead-bold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

body {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  justify-items: center; 
  align-items: start;
  font-family: 'Bedstead', system-ui, sans-serif;
  background: #000;
  color: #D7DDCB;
  gap: 16px;
  max-height: 100vh;
  padding-top: 0;
} 
button {
  font-family: 'Bedstead', system-ui, sans-serif;
  background-color: #D7DDCB;
}

button:hover {
  cursor: pointer;
  background-color: black;
  color: #D7DDCB;
}

#status {
  grid-column: 4 / 6; /* cols 4-5 */
  grid-row: 5 / 7;    /* rows 5-6 */
  z-index: 900;
}

.controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  position: relative;
  z-index: 900;
  grid-column: 4 / 6; /* cols 4-5 */
  grid-row: 5 / 7;    /* rows 5-6 */
}

.mode-toggle {
  margin-bottom: 10px;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  user-select: none;
}

.toggle-label input[type="checkbox"] {
  display: none;
}

.toggle-slider {
  position: relative;
  width: 64px;
  height: 30px;
  background: #444;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.3s;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
  background: #d2be4e;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
  transform: translateX(34px);
}

.toggle-text {
  font-size: 16px;
  color: inherit;
}

#simulation-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  min-width: 300px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  z-index: 900;
}

.sim-sensor-btn:hover {
  background: #333 !important;
  border-color: #777 !important;
  transform: translateY(-2px);
}

.sim-sensor-btn:active {
  transform: translateY(0);
}

/* shared popup styles */
.popup {
  position: fixed;
  display: none;           /* default hidden */
  z-index: 1000;
}

.popup-content {
  background: transparent;
  color: inherit;
  padding: 0;
  max-width: none;
  min-width: 0;
  text-align: center;
  box-shadow: none;
  position: relative;
}

.popup-close {
  margin-top: 12px;
  border: none;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 14px;
}

#frame-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  pointer-events: none;
  z-index: 1200;
  mix-blend-mode: screen; /* keep inner content visible */
  transform: scale(1.12);
  transform-origin: center;
}

#hero-gif {
  width: min(65vw, 420px);
  max-height: 260px;
  object-fit: contain;
  margin-top: 4px;
  margin-bottom: 8px;
  pointer-events: none;
  position: relative;
  z-index: 500;
  grid-column: 4 / 6; /* cols 4-5 */
  grid-row: 3 / 4;    /* rows 3-4 */
}

#title-img {
  width: min(65vw, 420px);
  object-fit: contain;
  pointer-events: none;
  position: relative;
  z-index: 700; 
  grid-column: 4 / 6; /* cols 4-5 */
  grid-row: 4 / 5;    /* rows 4 */
  margin-top: -80px; 
}

.popup-img {
  display: block;
  width: min(60vw, 480px); /* responsive cap at 3x but limited by viewport */
  max-width: 100%;
  height: auto;
  pointer-events: none;
}

#sensor-tabs {
  position: fixed;
  bottom: 12px;
  left: 12px;
  display: none; /* hidden to avoid duplicate images; retained for future use */
  flex-wrap: wrap;
  gap: 10px;
  z-index: 1100;
  pointer-events: none;
}

.sensor-tab {
  display: none;
  max-width: 140px;
  height: auto;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}
