/* Gridlock: sliding-vehicle traffic-jam puzzle */

.gl-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.gl-tabs {
  display: flex;
  gap: 8px;
}

.gl-tab-btn.is-active {
  background: var(--color-primary);
  color: #0e0f13;
  border-color: var(--color-primary);
}

.gl-level-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 420px;
}

.gl-level-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--color-border, rgba(255,255,255,0.15));
  background: var(--color-surface, #181a20);
  color: var(--color-text, #f2f2f2);
  font-weight: 700;
  cursor: pointer;
}

.gl-level-btn.is-current {
  outline: 2px solid var(--color-primary);
}

.gl-level-btn.is-locked {
  opacity: 0.4;
  cursor: not-allowed;
}

.gl-board-wrap {
  position: relative;
  width: min(420px, 92vw);
}

.gl-board {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background:
    repeating-linear-gradient(
      to right,
      rgba(255,255,255,0.06) 0,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent calc(100% / var(--gl-size, 6))
    ),
    repeating-linear-gradient(
      to bottom,
      rgba(255,255,255,0.06) 0,
      rgba(255,255,255,0.06) 1px,
      transparent 1px,
      transparent calc(100% / var(--gl-size, 6))
    ),
    #23262f;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.12);
  overflow: hidden;
}

.gl-exit {
  position: absolute;
  right: 0;
  width: 8px;
  background: var(--color-primary);
  box-shadow: 0 0 12px var(--color-primary);
}

.gl-vehicle {
  position: absolute;
  border: none;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(14px, 4vw, 24px);
  cursor: pointer;
  transition: left 0.15s ease, top 0.15s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35) inset, 0 2px 4px rgba(0,0,0,0.3);
  padding: 2px;
}

.gl-vehicle.is-goal {
  z-index: 3;
}

.gl-vehicle.is-selected {
  outline: 3px solid #fff;
  outline-offset: -2px;
}

.gl-slide-target {
  position: absolute;
  background: rgba(79, 216, 224, 0.22);
  border: 1px dashed rgba(79, 216, 224, 0.6);
  border-radius: 4px;
  cursor: pointer;
  padding: 0;
}

.gl-win-banner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 15, 19, 0.75);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  border-radius: 12px;
  text-align: center;
  padding: 16px;
}

.gl-actions {
  min-height: 40px;
}

.gl-skin-picker {
  text-align: center;
}

.gl-skin-picker h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
}

.gl-skin-row {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.gl-skin-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  cursor: pointer;
}

.gl-skin-swatch.is-active {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.gl-skin-swatch.is-locked {
  opacity: 0.3;
  cursor: not-allowed;
}

.gl-daily-panel {
  text-align: center;
  max-width: 420px;
}

.gl-share-text {
  white-space: pre-wrap;
  background: var(--color-surface, #181a20);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 10px;
  margin-top: 8px;
  font-size: 0.85rem;
  text-align: left;
}
