body {
  font-family: 'Press Start 2P', cursive;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background-color: #000;
  overflow: hidden;
  color: #fff;
}

#timer-display {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 6.5rem;
  z-index: 15;
  box-sizing: border-box;
  min-width: 9.5rem;
  display: grid;
  grid-template-columns: 2.25rem auto 2.25rem;
  align-items: center;
  column-gap: 0.5rem;
}

#timer-time {
  grid-column: 2;
  text-align: center;
}

#timer-toggle-btn {
  grid-column: 3;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 0.25rem;
  line-height: 1;
  cursor: pointer;
}

::-webkit-scrollbar {
  display: none;
}

/* 8-bit score animations */
.score-anim {
  transition: transform 0.1s steps(2);
}

.score-display {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  max-width: 100%;
  display: inline-block;
}

.score-pop-up {
  transform: scale(1.15) translateY(-5px);
}

.score-pop-down {
  transform: scale(0.85) translateY(5px);
}

.toolbar-visible {
  opacity: 1;
  transform: translateY(0);
}

.toolbar-hidden {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.toolbar-collapsed {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

#toolbar.toolbar-floating {
  left: auto;
  right: 1rem;
  bottom: 1rem;
  transform: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

#toolbar.toolbar-floating #config-btn {
  padding: 0;
  gap: 0;
}

#toolbar.toolbar-floating #config-btn span {
  display: none;
}

/* High contrast text */
.text-adaptive-light {
  color: #ffffff;
  text-shadow: 4px 4px 0 #000;
}

.text-adaptive-dark {
  color: #000000;
  text-shadow: 4px 4px 0 #fff;
}

/* Custom NES adjustments for the scoreboard layout */
.color-btn {
  image-rendering: pixelated;
  box-shadow: inset -4px -4px 0px 0px rgba(0, 0, 0, 0.5);
}

.color-btn.selected {
  box-shadow: inset 4px 4px 0px 0px rgba(0, 0, 0, 0.5), 0 0 0 4px #fff;
}
