/* styles/ui.css */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;  /* 🚫 disables scrollbars */
    font-family: 'Silkscreen', cursive;
  }

/* Container around the whole app */
#app {
    position: relative;
    width: 1240px;          /* = CANVAS_W = MAP_W (1000) + SIDEBAR_W (240) */
    margin: 20px auto;
  }
  
  #toolbar {
    position: absolute;
    top: 10px;
    right: 300px;

    display: flex;
    flex-direction: column;   /* stack rows: input, then button row */
    gap: 10px;

    background: rgba(255,255,255,0.9);
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 10;
  }
  
  #toolbar textarea {
    width: 240px;
    min-height: 50px;     /* starting height */
    font-size: 14px;
    padding: 6px 8px;
    resize: none;         /* prevent manual resize (optional) */
    overflow: hidden;     /* hide scrollbars while it grows */
    box-sizing: border-box;
    font-family: 'Silkscreen', cursive;
  }

  #toolbar textarea::placeholder {
    font-size: 11px;
  }
  
  /* Button row */
  #button-row {
    display: flex;
    gap: 8px;              /* space between Start and Reset */
  }
  
  #button-row button {
    flex: 1;               /* make both buttons equal width */
    padding: 8px;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Silkscreen', cursive;
  }
  
/* Leaderboard */
#leaderboard {
  position: absolute;
  top: 240px;
  right: 300px;

  background: rgba(255, 255, 255, 0.95);
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  z-index: 10;
  width: 304px;
  box-sizing: border-box;
  font-family: 'Silkscreen', cursive;
}

#leaderboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 6px;
}

#leaderboard-title {
  font-size: 14px;
  font-weight: bold;
}

#copy-leaderboard-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

#copy-leaderboard-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

#leaderboard-list {
  font-size: 12px;
  line-height: 20px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 4px 12px;
  max-height: 420px;
}

#leaderboard-list div {
  padding: 2px 0;
  color: #333;
  flex: 0 0 auto;
  width: calc(50% - 6px);
}

#leaderboard-list div.finished {
  color: #000;
  font-weight: bold;
}

#leaderboard-list .checkmark {
  color: #00aa00;
  margin-left: 4px;
  font-weight: bold;
}

/* Canvas Cursor Hover */
canvas {
    cursor: grab; /* looks like a hand */
}

canvas:active {
    cursor: grabbing; /* looks like you're dragging */
}