/* Light Detective - a detective's testing bench at dusk */

html,
body {
  height: 100%;
}

body {
  background: linear-gradient(180deg, #37474F 0%, #546E7A 45%, #78909C 100%);
  overflow: hidden;
}

.game-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 0 10px;
}

.shelf[hidden] {
  display: none;
}

.shelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 6px;
}

.shelf-item {
  position: relative;
  width: 52px;
  height: 52px;
  min-width: 48px;
  min-height: 48px;
  font-size: 1.6rem;
  line-height: 1;
  background: var(--color-paper);
  border: var(--border-width) solid var(--border-color);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
}

.shelf-item:disabled {
  opacity: 0.45;
}

.shelf-item:not(:disabled):active {
  transform: scale(0.92);
}

.shelf-item.current {
  background: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.shelf-item .badge {
  position: absolute;
  right: -6px;
  top: -8px;
  font-size: 0.95rem;
}

#canvas-container {
  position: relative;
  flex: 1;
  min-height: 200px;
  margin: 0 auto;
  width: min(100%, 900px);
  border: var(--border-width) solid var(--border-color);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: linear-gradient(180deg, #263238 0%, #37474F 100%);
}

#canvas-container canvas {
  display: block;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 8px 0 max(10px, env(safe-area-inset-bottom));
}

#bins[hidden] {
  display: none;
}

#bins {
  display: flex;
  gap: 10px;
}

.bin-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 88px;
  min-height: 56px;
  padding: 6px 12px;
  background: var(--color-paper);
  border: var(--border-width) solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-heading);
}

.bin-btn:active {
  transform: scale(0.94);
}

.bin-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

.bin-label {
  font-size: 0.85rem;
  color: var(--color-text);
}

@media (max-height: 480px) {
  .gravity-prompt {
    margin-bottom: 4px;
    padding: 4px 10px;
  }

  .shelf {
    gap: 5px;
  }

  .shelf-item {
    width: 44px;
    height: 44px;
    font-size: 1.35rem;
  }

  .bin-btn {
    min-width: 72px;
    min-height: 48px;
    padding: 4px 8px;
  }

  .controls {
    padding: 5px 0 max(6px, env(safe-area-inset-bottom));
  }

  #canvas-container {
    min-height: 140px;
  }
}
