/* Board Container — premium housing with glass depth */
.board {
  --tile-gap: clamp(3px, 0.3vw, 5px);
  --tile-size: calc((100vw - 4vw - 21 * var(--tile-gap)) / 22);
  --board-bezel: clamp(12px, 1.5vw, 24px);

  position: relative;
  background:
    radial-gradient(
      ellipse 80% 70% at 50% 45%,
      #0d0d0d 0%,
      #060606 50%,
      #000000 100%
    );
  border-radius: clamp(8px, 1vw, 16px);
  padding: var(--board-bezel);
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 -1px 0 rgba(255, 255, 255, 0.01),
    inset 1px 0 0 rgba(255, 255, 255, 0.02),
    inset -1px 0 0 rgba(255, 255, 255, 0.02);
}

/* Vignette overlay — simulates glass edge darkening */
.board::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(
      ellipse 85% 80% at 50% 50%,
      transparent 60%,
      rgba(0, 0, 0, 0.4) 100%
    );
  pointer-events: none;
  z-index: 2;
}

/* Tile Grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(var(--grid-cols, 22), var(--tile-size));
  grid-template-rows: repeat(var(--grid-rows, 5), calc(var(--tile-size) * 1.5));
  gap: var(--tile-gap);
  justify-content: center;
}

/* Accent Indicators — subtle LED-style hardware status lights */
.accent-bar {
  position: absolute;
  top: var(--board-bezel, 16px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
}

.accent-bar-left {
  left: var(--board-bezel, 16px);
}

.accent-bar-right {
  right: var(--board-bezel, 16px);
}

.accent-segment {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: background-color 0.8s ease, box-shadow 0.8s ease;
  box-shadow:
    0 0 6px currentColor,
    0 0 12px currentColor;
}

/* Keyboard Shortcut Indicator — frosted glass circle */
.keyboard-hint {
  position: absolute;
  bottom: 12px;
  left: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 5;
}

.keyboard-hint:hover {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

/* Shortcuts Overlay — dialog with frosted glass */
.shortcuts-overlay {
  display: none;
  position: absolute;
  bottom: 48px;
  left: 16px;
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  z-index: 10;
  min-width: 200px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.shortcuts-overlay:focus {
  outline: 2px solid rgba(255, 255, 255, 0.4);
  outline-offset: 2px;
}

.shortcuts-overlay.visible {
  display: block;
}

.shortcuts-list {
  margin: 0;
}

.shortcuts-list div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.shortcuts-list dt {
  font-weight: 400;
}

.shortcuts-list dd {
  margin: 0;
}

.shortcuts-overlay kbd {
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 12px;
  margin-left: 16px;
  color: rgba(255, 255, 255, 0.9);
}

/* Subtle top-edge ambient highlight — glass catching light */
.board::after {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.06) 30%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.06) 70%,
    transparent 100%
  );
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
}
