body {
  font-family: Inter, sans-serif;
}
.tool-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.04);
}
.score-pill {
  background: #1f2937;
  border-radius: 8px;
  padding: 5px 10px;
  text-align: center;
  min-width: 52px;
}
.score-pill .label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #9ca3af;
  text-transform: uppercase;
}
.score-pill .value {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}
.diff-btn {
  border: 1px solid #e5e7eb;
  border-radius: 99px;
  padding: 4px 11px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  background: #fff;
  cursor: pointer;
  transition: all 0.15s;
}
.diff-btn:hover {
  border-color: #6ee7b7;
  color: #065f46;
  background: #f0fdf4;
}
.diff-btn.active {
  border-color: #059669;
  color: #065f46;
  background: #ecfdf5;
}

/* Hanoi board */
#hanoi-board {
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 8px 0;
  min-height: 200px;
  position: relative;
}

.peg-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 120px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.peg-wrap.selected .peg-pole {
  background: #059669;
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.5);
}
.peg-wrap:hover .peg-pole {
  background: #34d399;
}

.discs-stack {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  min-height: 160px;
  justify-content: flex-start;
  width: 100%;
  position: relative;
}

.peg-pole {
  width: 8px;
  height: 160px;
  background: #6b7280;
  border-radius: 4px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  transition: background 0.15s;
  z-index: 0;
}

.disc {
  height: 22px;
  border-radius: 11px;
  position: relative;
  z-index: 1;
  margin-bottom: 3px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
}

.peg-base {
  width: 100%;
  height: 10px;
  background: #374151;
  border-radius: 5px;
  margin-top: 2px;
  position: relative;
  z-index: 2;
}

.peg-label {
  font-size: 13px;
  font-weight: 700;
  color: #6b7280;
  margin-top: 6px;
}
.peg-wrap.selected .peg-label {
  color: #059669;
}

#win-banner {
  display: none;
  text-align: center;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 10px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #065f46;
  margin-bottom: 12px;
}
#win-banner.show {
  display: block;
}

#invalid-msg {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #dc2626;
  min-height: 20px;
  margin-top: 8px;
}

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  background: #1f2937;
  color: #fff;
  padding: 10px 20px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 0.3s,
    transform 0.3s;
  z-index: 999;
  white-space: nowrap;
}
#toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}
.related-game-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  text-decoration: none;
  color: inherit;
  transition:
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
.related-game-card:hover {
  border-color: #6ee7b7;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
  transform: translateY(-1px);
}
.related-icon {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
