/* File 2 of 3: this is the CSS - the looks */
/* Dark theme so it's not white! */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #0b0f19;              /* dark navy background */
  user-select: none;                /* stops the blue text highlighting when you click & hold */
  -webkit-user-select: none;        /* same, for Safari */
  -moz-user-select: none;           /* same, for Firefox */
  color: #e5e7eb;
  font-family: Arial, Helvetica, sans-serif;
  padding: 24px;
  max-width: 800px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: #ffffff;
}

/* ---- category buttons ---- */
#category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 24px;
}

#category-buttons button {
  background: #1e293b;
  color: #e5e7eb;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 1rem;
  cursor: pointer;
}

#category-buttons button:hover {
  background: #334155;
}

#category-buttons button.active {
  background: #6366f1;   /* indigo for the chosen tab */
  border-color: #818cf8;
}

/* ---- the tier list ---- */
.tier {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.tier-label {
  width: 70px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  border-right: 3px solid rgba(0, 0, 0, 0.3);
}

.tier-items {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #111827;
  min-height: 70px;
}

/* each little item card */
.item {
  background: #1f2937;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  cursor: grab;              /* show a grab-hand cursor = you can pick it up! */
  touch-action: none;        /* let touch drags work on tablets/phones */
}

.item:active {
  cursor: grabbing;          /* while holding, show a closed grab hand */
}

/* the card that is currently being dragged (the original, under the clone) */
.item.dragging {
  opacity: 0.3;              /* fade it out a bit while dragged */
}

/* the little copy that follows the mouse while dragging */
.drag-clone {
  position: fixed;
  pointer-events: none;      /* so it never blocks the mouse */
  z-index: 1000;
  background: #1f2937;
  border: 2px solid #6366f1; /* indigo border so you can see it clearly */
  border-radius: 8px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -60%); /* center it on the cursor */
}

.drag-clone .emoji {
  font-size: 1.4rem;
}

/* the tier box that you are hovering over (it lights up to say 'drop here!') */
.tier-items.hover-target {
  outline: 3px dashed #6366f1;
  outline-offset: -3px;
  background: #1e293b;
}

.item .emoji {
  font-size: 1.4rem;
}

/* ---- tier colors: S -> F ---- */
.tier-S .tier-label { background: #f43f5e; }   /* red   */
.tier-A .tier-label { background: #fb923c; }   /* orange */
.tier-B .tier-label { background: #facc15; }   /* yellow */
.tier-C .tier-label { background: #4ade80; }   /* green */
.tier-D .tier-label { background: #38bdf8; }   /* blue  */
.tier-E .tier-label { background: #a78bfa; }   /* purple */
.tier-F .tier-label { background: #64748b; }   /* gray  */

/* shown when a tier has nothing in it */
.empty-tier {
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
  align-self: center;
}

/* makes the empty note a drop target too, so you can drag into an empty tier */
.empty-tier {
  pointer-events: none;
}
.tier-items:has(.empty-tier) {
  min-height: 70px;
}
